cheat sheets.

$ cheat cpesnottrapping
#Get a list of CPE's that are pingable but not trapping (or are not Cisco's)
for ip in $( cat /tmp/devices ); do
  if [[ ! -s /var/lib/rancid/Unsorted/configs/$ip ]]; then
    echo $ip not in rancid.
  else
    grep -qL 24.73.240.173 /var/lib/rancid/Unsorted/configs/$ip
    if [[ $? -eq 1 ]]; then
      echo $ip in rancid, but missing snmp trap config.
    fi
  fi
done
Version 1, updated 427 days ago.
. o 0 ( edit | history )
( add new | see all )