Adaptive Monitoring: Broken?

Patrick Morris patrick.morris at hp.com
Tue Apr 7 20:26:18 CEST 2009


Here are the important stats:

Nagios Version: Version 3.1.0
Proficiency Level: Pretty damned high

It's been a long time since I had a question to ask here, but I've run
into an issue that's had me ripping my hair out for the first time in
many, many years of working with Nagios.

For various convoluted reasons, I have some services with a notification
command that includes the following:

/usr/bin/printf "[%lu] PROCESS_SERVICE_CHECK_RESULT;$HOSTNAME;$SERVICE;0;OK - Not a real check\n" $DATE > $CMDFILE

/usr/bin/printf "[%lu] CHANGE_SVC_EVENT_HANDLER;$HOSTNAME;$SERVICE;check_ok\n" $DATE > $CMDFILE

/usr/bin/printf "[%lu] CHANGE_SVC_CHECK_COMMAND;$HOSTNAME;$SERVICE;check_ok\n" $DATE > $CMDFILE

check_ok is defined like so:

define command {
        command_name    check_ok
        command_line    $USER1$/check_dummy 0 "Not a real service"
}

While the first command works fine, and sets the service to an OK state,
the next two (which I've tried in various combinations) show up in the
Nagios logs as having been sent, but do nothing. The check that appears
in the config files keeps running instead of my check_ok check.

Here's how it shows up in the logs:

[1239128528] EXTERNAL COMMAND: CHANGE_SVC_EVENT_HANDLER;dummy-host;DNS;check_ok
[1239128528] EXTERNAL COMMAND: CHANGE_SVC_CHECK_COMMAND;dummy-host;DNS;check_ok

I've noticed the message is different if I use an invalid command, so
I'm relatively sure I'm using the right ones; they just don't do
anything.

Event handlers are enabled for these services, but even if they weren't
the check command should change, right?

Am I doing something wrong here, or have I run into a bug?

------------------------------------------------------------------------------
This SF.net email is sponsored by:
High Quality Requirements in a Collaborative Environment.
Download a free trial of Rational Requirements Composer Now!
http://p.sf.net/sfu/www-ibm-com
_______________________________________________
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