send_nsca - help

Murali Edula medula at baytree.com
Tue Aug 19 22:22:27 CEST 2008


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 ","

 

 

 

 

Thank you

 

Murali Edula

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.monitoring-lists.org/archive/users/attachments/20080819/b93adecb/attachment.html>
-------------- next part --------------
-------------------------------------------------------------------------
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=/
-------------- 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