distributed monitoring setup - ocsp_command not being executed

jason jchambers at shaw.ca
Wed Oct 29 22:39:13 CET 2003


>
> Thanks marc,
> I've tried embedding the obsess_over_service even at a per service
> definition and still don't see desired results
> (don't see updates on the central server), but when I run the
> submit_check_result command via command line I do see the update...
>
> here is the services.cfg:

Again, this looks good. Back to absolute basics- You've restarted nagios
since making the changes and verified that you don't have any stray
processes running around, right? I would recommend putting some kind of
debugging into the submit_check_result script to see if it's even being
called. Something as simple as echoing the date/time/host to a file
would be sufficient. Just for grins, what does your submit_check_result
script contain? Maybe there's a clue there.

--
Marc


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).

#!/bin/sh

# 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 should be used
#       as the plugin output for the service checks)
#

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

case "$3" in
        OK)
                return_code=0
                    ;;
        WARNING)
                return_code=1
                    ;;
        CRITICAL)
                return_code=2
                    ;;
        UNKNOWN)
                return_code=-1
                    ;;
esac

# 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




-------------------------------------------------------
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