Nagios issue fix - 'obsessive_host_handler' is not defined anywhere!

joseph symon jsymonkj at gmail.com
Fri Oct 26 11:44:44 CEST 2007


Hi Kausal,

I have found an issue ('obsessive_host_handler' is not defined anywhere!) in

the nagios mailing list
http://www.mail-archive.com/nagios-users@lists.sourceforge.net/msg07094.html.

But there is no fix mentioned in the thread.

The exact fix which I have done is specified below:

Create the file obsessive_host_handler with the following content:
+++++++++++++++++++++++++++
# Based on
# OBSESSIVE_SVC_HANDLER
# Written by Ethan Galstad (nagios at nagils.org)
# Last Modified: 07-19-2001
#
# This script is intended to run as the OCSP command
# on a distributed monitoring server.  The script calls
# submit_check_result_via_nsca to send the service check
# results to the central monitoring server.
#
# Arguments:
#  $1 = host_name (Short name of host that the service is
#       associated with)
#  $2 = state_string (A string representing the status of
#       the given service - "OK", "WARNING", "CRITICAL"
#       or "UNKNOWN")
#  $3 = plugin_output (A text string that should be used
#       as the plugin output for the service checks)
#

# Location of the submit_check_result_via_nsca script
SubmitCmd="/usr/local/nagios/libexec/eventhandlers/submit_check_result"

# Convert the state string to the corresponding return code
return_code=-1

case "$2" in
        UP)
                return_code=0
                ;;
        DOWN)
                return_code=1
                ;;
        UNREACHEBLE)
                return_code=2
                ;;
esac

# Send the service check results to the central monitoring server
$SubmitCmd "$1" $return_code "$3"
+++++++++++++++++++++++++++

You need to specify the exact location of SubmitCmd. Here it
is /usr/local/nagios/libexec/eventhandlers/submit_check_result.

Add the command in commands configuration file according to nagios.cfg. The
define part of command is specified below:
+++++++++++++++++++++++++++
define command{
        command_name obsessive_host_handler
        command_line    /usr/local/nagios/libexec/obsessive_host_handler
$HOSTNAME$ $SERVICESTATEID$ '$SERVICEOUTPUT$'
}
+++++++++++++++++++++++++++

Reload the nagios. This will fix the issue. Here the exact location of
obsessive_host_handler is /usr/local/nagios/libexec/obsessive_host_handler.
Modify it as per your requirement.

-- 
Regards,
Joseph Symon
Bobcares.com <http://bobcares.com/>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.monitoring-lists.org/archive/users/attachments/20071026/894ae54b/attachment.html>
-------------- next part --------------
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
-------------- 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