send_nsca - help

Murali Edula medula at baytree.com
Wed Aug 20 20:06:58 CEST 2008


Yes Marcel, scripts owned by nagios  and they have execute permission.

 

Thank you

 

Murali Edula

Baytree Associates, Inc. 
704.424.9723 ext. 117| 203-809-6725 Cell 
13925 Ballantyne Corporate Place Suite 190, 

Charlotte, NC 28277-2747 
medula at baytree.com |  <http://www.baytree.com> www.baytree.com

 

From: nagios-users-bounces at lists.sourceforge.net
[mailto:nagios-users-bounces at lists.sourceforge.net] On Behalf Of Marcel
Sent: Wednesday, August 20, 2008 12:11 PM
To: Joerg Linge
Cc: nagios-users at lists.sourceforge.net
Subject: Re: [Nagios-users] send_nsca - help

 

Yo,

On Tue, Aug 19, 2008 at 5:31 PM, Joerg Linge <pitchfork at ederdrom.de> wrote:

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

############################################################################
################
And make sure your script is executable by nagios user.
 

 

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