Just create a script, like this:

$cat ~/bin/pingtest.sh
!/bin/bash
rtt=$(ping -W 2 -c 1 $1 | grep rtt | gawk -F/ {'print $6}')
if [[ -n "$rtt" ]] ; then
echo '${color green}Up ('$rtt'ms)'
else
echo '${color red}'"Down"
aplay /usr/share/sounds/freedesktop/stereo/network-connectivity-lost.oga
fi

make it executable with:

$chmod +x ~/bin/pingtest.sh

A conky file could look like this:

$cat conky.ttxt
alignment tr
gap_y 0
maximum_width 390
minimum_size 390
update_interval 30
use_xft yes
xftfont Bitstream Vera Sans Mono:size=8
xftalpha 0.8
update_interval 10
draw_shades no
TEXT
${alignc}${time %Y-%m-%d %H:%M:%S Uhr}

${color white}8.9.9.9${alignr}9.9.9.9
${execpi 10 ~/bin/pingtest.sh 8.9.9.9}${alignr}${execpi 10 ~/bin/pingtest.sh 9.9.9.9}
${color white}8.1.1.1${alignr}1.1.1.1
${execpi 10 ~/bin/pingtest.sh 8.1.1.1}${alignr}${execpi 10 ~/bin/pingtest.sh 1.1.1.1}

Run everything:

$conky -o -c conky.ttxt

Result: