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@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


------------------------------------------------------------------------------
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
_______________________________________________
Nagios-users mailing list
[email protected]
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

Reply via email to