[Nagiosplug-help] Mr Morgan , Almost done with check_bgpstate

Gothard, Morgan Morgan.Gothard at SUG.com
Fri Oct 1 22:28:15 CEST 2010


Here is my configuration.  Note that my install directory is /srv/nagios, many of these options are not needed.  	

define command {
       command_name  check_bgpstate
       command_line  /srv/nagios/libexec/check_bgpstate.pl $HOSTADDRESS$ -c $USER5$
}

define service {
        host_name                       internet-router1
        service_description             BGP
        check_command                   check_bgpstate
        is_volatile                     0
        max_check_attempts              5
        check_interval                  10
        retry_interval                  1
        active_checks_enabled           1
        passive_checks_enabled          1
        check_period                    24x7
        obsess_over_service             1
        check_freshness                 0
        event_handler_enabled           1
        flap_detection_enabled          1
        retain_status_information       1
        retain_nonstatus_information    1
        notification_interval           120
        notification_period             24x7
        notification_options            w,u,c,r,f
        notifications_enabled           1
        contact_groups                  router-admin
        icon_image                      Router.gif
        icon_image_alt                  AS 99999
        register                        1
}


I have a feeling your problem may be in either your use of the $USER1$ variable, or that you are calling a perl script from within Nagios directly.  The execute bit for the nagios user would have to be set.  You may want to try calling perl binary directly like this:

 command_line perl $USER1$/check_bgpstate.pl $HOSTADDRESS$ -c $ARG1$

~ Morgan

-----Original Message-----
From: Leandro Roggerone [mailto:leandro_roggerone at dmcwireless.com] 
Sent: Friday, October 01, 2010 1:11 PM
To: nagiosplug-help at lists.sourceforge.net
Subject: [Nagiosplug-help] Mr Morgan , Almost done with check_bgpstate

  Hi, I downloaded and isntalled the check_bgpstate plugin.

It works from cli:

[root at mdz-dns2 libexec]# ./check_bgpstate 172.24.254.65
OK: host '172.24.254.65', sessions up: 1, down: 0, shutdown: 0


but, when I make it work on nagios it returns:
(Return code of 127 is out of bounds- plugin may be missing)

Here is my command and host definition.

  define command{
   command_name check_bgpstate
   command_line $USER1$/check_bgpstate.pl  $HOSTADDRESS$ -c $ARG1$

define service{
         host_name               ASN1002
         service_description     BGP
         check_command           check_bgpstate!public
         max_check_attempts      3
         retry_check_interval    1
         notification_interval   10
         notification_options    w,u,c,r,f
         check_period            24x7
         notification_interval   10
         notification_period     24x7
        contact_groups          localadmins
}

Would you show me you setings to compare ?
I also change the the owner of the check_bgpstate.pl file from root to 
nagios.
I dont know what else to do.

thanks, bye.
LEO.



Private and confidential as detailed here: http://www.sug.com/disclaimers/default.htm#Mail . If you cannot access the link, please e-mail sender.




More information about the Help mailing list