Unable to use check_bgp

Cosmin Neagu cosmin.neagu at omnilogic.ro
Mon Oct 31 09:22:01 CET 2011


Hello,
I'm trying to monitor bgp session, and i came upon the following script 
check_bgp.
When i run it manually, it checks the bgp session OK:

/nagios at mon2:/usr/local/nagios/libexec$ ./check_bgp.pl -H X.X.X.X -C xxx 
-p Y.Y.Y.Y
OK - Y.Y.Y.Y (AS12345) state is established(6). Established for 
69d9h34m43s. Last error "Hold Timer Expired".
/

But, when i define the command, and add a service for it, it does not 
work. In nagios, i get CRITICAL status and /null/ Status information.
Using nagios 3.2.3




/define command {
         command_name check_bgp
         command_line $USER1$/check_bgp.pl -H $HOSTADDRESS$ $ARG1$
}/
/define service {
         use                             generic-service
         host_name                  EDGE
         service_description     eBGP to AS12345
         check_command           check_bgp!-C abcd -p Y.Y.Y.Y
}/

So, what am i doing wrong? I have about 300 diferent services, and all 
checks works fine, this is the first time when a script works when 
invoked manually but not when invoked by nagios. Please help.



-- 
  Cosmin Neagu


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.monitoring-lists.org/archive/users/attachments/20111031/dca91580/attachment.html>
-------------- next part --------------
------------------------------------------------------------------------------
Get your Android app more play: Bring it to the BlackBerry PlayBook 
in minutes. BlackBerry App World™ now supports Android™ Apps 
for the BlackBerry® PlayBook™. Discover just how easy and simple 
it is! http://p.sf.net/sfu/android-dev2dev
-------------- next part --------------
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null


More information about the Users mailing list