Val:~$ whoami

I am Val Glinskiy, network engineer specializing in data center networks. TIME magazine selected me as Person of the Year in 2006.

Search This Blog

Thursday, June 22, 2006

Nagios BGP plugin

I converted the script I wrote to monitor BGP on Cisco routers via SNMP into Nagios plugin. I did not like check_bgp plugin which comes with Nagios, because it requires username and password to access a router to be stored in plain text.

Here is how to configure Nagios to use my plugin:
copy into nagios/libexec directory. Then, add the following to Nagios config

define command{       
command_name    check_bgp_snmp
command_line    $USER1$/ -r $HOSTADDRESS$ -c $ARG1$

define service{
host_name               router1
service_description     BGP CHECK
check_command           check_bgp_snmp!public
max_check_attempts      2
normal_check_interval   5
retry_check_interval    2
check_period            24x7
notification_interval   10
notification_period     24x7
notification_options    w,u,c,r
notifications_enabled   0
contact_groups          admins



  1. really great plugin very usefulthank check_bgp

  2. Great Tool. I just thought about writing it myself :-).

    What showed up is that the error in Line 201 isn't completely correct... it's not that the neighbour doesn't send prefixes, it's that it doesn't send updates.

    Funnily there doesn't seem to be a oid that states how many prefixes one received from a peer... puzzling, I'd have expected that.

    Anyway: Great work!

  3. There is problem with nagios plugin for bgp: Page not found

  4. This comment has been removed by the author.

  5. Sorry, fixed the link

  6. It does not work for me. It shows following error message:

    ERROR: No results Net::SNMP=HASH(0xe229c8)->error