Random Project

this is a nice one

this works well for checking our bgp-speakers.
it would be even nicer if the “-n” parameter could be ignored so only one command definition would be needed in case you have a different number of neighbors on some devices.

Also we had to fix one line:

last_output=`/bin/cat /tmp/check_bgp_all.$hostname|grep $neighbor`

changed to:

last_output=`/bin/cat /tmp/check_bgp_all.$hostname|grep $neighbor:`

the “:” is needed to match only exact neighbor IPs, we for example hat x.y.c.2 and x.y.c.20 as neighbors to one bgp-speaker therefore the grep without “:” made for some bad responses which lead to expr-errors later in the script.