NSCA and host checks

stan stanb at panix.com
Mon Dec 20 21:39:27 CET 2010


On Mon, Dec 20, 2010 at 03:54:45PM +0100, Andreas Ericsson wrote:
> On 12/20/2010 03:45 PM, stan wrote:
> > I am working on geting a small distributed system up. I have the serviec
> > checks going back to the master, but have not managed to get host checks
> > passed back to the master yet.
> > 
> > With help from the list I found:
> > 
> > obsess_over_hosts and set it to 1. It appears that I also need an ochp
> > command. I tried using the script I had set p for service checks, but it
> > appears that the arguments passed to this are different. Here are the
> > arguments that are being passed the the service check comand:
> > 
> >   Arguments:
> > #  $1 = host_name (Short name of host that the service is
> > #       associated with)
> > #  $2 = svc_description (Description of the service)
> > #  $3 = state_string (A string representing the status of
> > #       the given service - "OK", "WARNING", "CRITICAL"
> > #       or "UNKNOWN")
> > #  $4 = plugin_output (A text string that
> > 									#
> > What do the one passed to the host check look like?
> > 
> 
> the same, but without the service description.

OK, here are my 2 command defs:

command_line    /usr/share/nagios/sbin/submit_service_check_result
$HOSTNAME$ '$SERVICEDESC$' $SERVICESTATEID$ '$SERVICEOUTPUT$'

and

/usr/share/nagios/sbin/submit_host_check_result $HOSTNAME$ $HOSTSTATEID$
'$HOSTOUTPUT$'

Do these look correct?

And do the *STATEID's need translating to an integer before I pass them to
send_nsca? I found an example in the web, that used a case statement to do
thism but I do not know if it is needed or not.

Thanks for the help/

-- 
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing in e-mail?

------------------------------------------------------------------------------
Lotusphere 2011
Register now for Lotusphere 2011 and learn how
to connect the dots, take your collaborative environment
to the next level, and enter the era of Social Business.
http://p.sf.net/sfu/lotusphere-d2d
_______________________________________________
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