send_nsca - help

Joerg Linge pitchfork at ederdrom.de
Tue Aug 19 22:31:38 CEST 2008


Murali Edula schrieb:
> Hi,
> 
>  
> 
> we are in the process of configuring Nagios monitoring tool in 
> distribution model.
> 
> So I have configured nsca daemon on centrol server and send_nsca on 
> distributed server.
> 
> *Versions : Nagios 3.0.3, nsca 2.7.2 – I hope these are latest versions.*
> 
>  
> 
>  
> 
> 1.       Daemon configured fine and listening requests.
> 
> 2.       Send_nsca also working great if I ran stand alone on 
> distribution server . Example
> 
> ./send_nsca -H 10.1.1.216 -c /usr/local/nagios/etc/send_nsca.cfg  
> abc.baytree.com 'Current Users’ 0 'User count OK’
> 
>  
> 
> But when I configure ocsp_command is not working. Nagios.log shows follows
> 
>  
> 
> ============================================
> 
> [1219176254] Warning: Attempting to execute the command 
> "/usr/local/nagios/libexec/eventhandlers/send_service_check 
> abc.baytree.com 'Current Users' 0 'USERS OK - 11 users currently logged 
> in'" resulted in a return code of 127.  Make sure the script or binary 
> you are trying to execute actually exists...
> 
>  
> 
> ===============================================
> 
>  
> 
>  
> 
> Please help me if I am missing anything here.
> 
>  
> 
> My ocsp entries Nagios.cfg – distributed server
> 
>  
> 
> obsess_over_services=1
> 
> obsess_over_hosts=1
> 
> ocsp_command=send_service_check
> 
> ochp_command=send_host_check
> 
> ocsp_timeout=5
> 
> ochp_timeout=5
> 
>  
> 
> ================================================
> 
>  
> 
> commands.cfg
> 
> define command{
> 
> command_name                   send_service_check
> 
> command_line                   $USER1$/eventhandlers/send_service_check 
> $HOSTNAME$ '$SERVICEDESC$' $SERVICESTATEID$ '$SERVICEOUTPUT$'
> 
>               }
> 
>  
> 
> =======================================================
> 
> Code – Shell script
> 
> /usr/local/nagios/libexec/eventhandles/ send_service_check 
> 
>  
> 
>  
> 
> #!/bin/bash
> 
> # Script : send_service_check
> 
> #PRINTF="/usr/bin/printf"
> 
> CMD="/usr/local/nagios/bin/send_nsca"
> 
> CFG="/usr/local/nagios/etc/send_nsca.cfg"
> 
> HOST=$1
> 
> SRV=$2
> 
> RESULT=$3
> 
> OUTPUT=$4
> 
> #
> 
> /bin/echo "$1","$2","$3","$4" | $CMD -H 10.1.1.216 -c $CFG -d ","
> 

you call eventhandlers/send_service_check but you script is named 
eventhandles/send_service_check


Regards

Joerg

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
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