I'm afraid I can't give you full script as it is fully integrated into our own in-house monitoring system so it wouldn't make much sense
but to give you an idea assuming you have multiple IDCs (else you can take away while loop)
currTime=`date +%s`
pdp conn idc | grep ^[1-9] > idc.tmp
while read line; do
if [ `echo $line | grep -c "No events received in the last hour" ` -eq 0 ]; then
lastEvent=`echo $line | awk '{print $5" "$6}'`
lastEvent=`date --date="$lastEvent" +%s`
let diff=$currTime-$lastEvent
if [ $diff -gt 120 ]; then
do something here if no events seen in last 2 minutes
fi
fi
done < idc.tmp