distributed monitoring setup - ocsp_command not being executed

Ric Moseley ric at nkn.net
Fri Oct 31 05:16:12 CET 2003


I had a similar problem and I ended up using printf instead of echo.

/usr/bin/printf "%s\t%s\t$return_code\t%s\n" $1 "$2" "$4" |
/usr/local/nagios/sbin/nsca/send_nsca -H X.X.X.X -c /usr/local/nagi
os/sbin/nsca/send_nsca.cfg

Ric. 

-----Original Message-----
From: nagios-users-admin at lists.sourceforge.net
[mailto:nagios-users-admin at lists.sourceforge.net] On Behalf Of jason
Sent: Wednesday, October 29, 2003 4:19 PM
To: Marc Powell; nagios-users at lists.sourceforge.net
Subject: Re: [Nagios-users] distributed monitoring setup - ocsp_command not
being executed


----- Original Message ----- 
From: "Marc Powell" <mpowell at ena.com>
To: "jason" <jchambers at shaw.ca>; <nagios-users at lists.sourceforge.net>
Sent: Wednesday, October 29, 2003 3:09 PM
Subject: RE: [Nagios-users] distributed monitoring setup - ocsp_command not
being executed




> -----Original Message-----
> From: jason [mailto:jchambers at shaw.ca]
> Sent: Wednesday, October 29, 2003 3:39 PM
> To: Marc Powell; nagios-users at lists.sourceforge.net
>
> Nice.
> taking your advice I added an echo line >> /tmp/check-check
> the file gets updated every couple seconds - so the scipt is being
called,
> but I still don't see the updates on the central server (unlike when
being
> called when executed on the command line).
>
[snip]

>
> # pipe the service check info into the send_nsca program, which
> # in turn transmits the data to the nsca daemon on the central
> # monitoring server
> /bin/echo -e "$1\t$2\t$return_code\t$4\n" >> /tmp/check-check
>
> /bin/echo -e "$1\t$2\t$return_code\t$4\n" |
> /usr/local/nagios/bin/send_nsca
> 10.0.73.235 -c /usr/local/nagios/etc/send_nsca.cfg
>

Very similar to mine except I specify the port --

/bin/echo -e "$1\t$2\t$return_code\t$4\n" |
/usr/local/nagios/bin/send_nsca [host removed] -p 5668 -c
/usr/local/nagios/etc/send_nsca.cfg

I can't remember if it's mandatory to specify the port or not
actually... It's odd that it works from the command line _and_ it's
actually being called by nagios with the right information... The last
thing I can think of (besides specifying the port) would be permissions
on send_nsca.

--
Marc

Jebus!.
I added the port and its working like a charm.

many thanx.
Jason.




-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive?  Does it
help you create better code?   SHARE THE LOVE, and help us help
YOU!  Click Here: http://sourceforge.net/donate/
_______________________________________________
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



-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive?  Does it
help you create better code?   SHARE THE LOVE, and help us help
YOU!  Click Here: http://sourceforge.net/donate/
_______________________________________________
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