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 check_bgp_snmp.pl into nagios/libexec directory. Then, add the following to Nagios config

define command{       
command_name    check_bgp_snmp
command_line    $USER1$/check_bgp_snmp.pl -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
}

Download check_bgp_snmp.pl

7 comments:

  1. really great plugin very usefulthank check_bgp

    ReplyDelete
  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!

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

    ReplyDelete
  4. This comment has been removed by the author.

    ReplyDelete
  5. Sorry, fixed the link

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

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

    ReplyDelete