Hosts report 'DOWN, HARD' after first attempt.

Jonathan Call jcall at verio.net
Fri Jan 16 20:50:20 CET 2009



> -----Original Message-----
> From: Patrick Morris [mailto:patrick.morris at hp.com]
> Sent: Friday, January 16, 2009 11:40 AM
> To: Jonathan Call
> Cc: nagios-users at lists.sourceforge.net
> Subject: Re: [Nagios-users] Hosts report 'DOWN, HARD' after first
attempt.
> 

...

> 
> I'm not sure exactly how you're passing check results to the central
> server, but you may want to consider modifying the process to only
send
> host check results when they are in a hard state.

That sounds like an excellent recommendation. Here is my host check
command:
$USER1$/custom/submit_host_check_result.sh $HOSTNAME$ $HOSTSTATEID$
'$HOSTOUTPUT$'

I'll need to modify it to be like this:

$USER1$/custom/submit_host_check_result.sh $HOSTNAME$ $HOSTSTATEID$
'$HOSTOUTPUT$' '$HOSTSTATETYPE$'

And then my NSCA host script would then become:

------------------------------
#!/bin/sh

# Arguments and corresponding NAGIOS API variable
#  $1 = $HOSTNAME$
#  $2 = $HOSTSTATEID$
#  $3 = $HOSTOUTPUT$
#  $4 = $HOSTSTATETYPE$
#
# The variables must be piped in as tab delimited variables
# with a newline termination

if [ "$4" = "HARD" ]; then
   /usr/bin/printf "%s\t%s\t%s\n" "$1" "$2" "$3" |
/usr/local/sbin/send_nsca XXX.XXX.XXX.XXX -c
/usr/local/etc/send_nsca.cfg
fi

# Do nothing for SOFT

------------------------------

Thank you,

Jonathan


This email message is intended for the use of the person to whom it has been sent, and may contain information that is confidential or legally protected. If you are not the intended recipient or have received this message in error, you are not authorized to copy, distribute, or otherwise use this message or its attachments. Please notify the sender immediately by return e-mail and permanently delete this message and any attachments. Verio, Inc. makes no warranty that this email is error or virus free.  Thank you.

------------------------------------------------------------------------------
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
_______________________________________________
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