[patch] Workaround for 'Host DOWN' false-positives

Joerg Linge pitchfork at ederdrom.de
Sun May 21 16:08:40 CEST 2006


Hi Jan,
the other way is to use "on-demand Macros" like check_cluster does.
Have a look on http://nagios.sourceforge.net/docs/2_0/clusters.html

An Example:

Every Host has an Service called "Connectivity" witch reflects the Host State.
This Services is executed periodicaly every 2 minutes.

The Host check_command is defined in this way:

define command{
        command_name    check-host-adaptive
        command_line    $USER1$/check_dummy $ARG1$ "$ARG2$"
        }

The command in your hosts.cfg looks like

define host{
.....
        check_command           check-host-adaptive!$SERVICESTATEID:server1:Connectivity$!$SERVICEOUTPUT:server1:Connectivity
        host_name              server1
        alias                   server1
        address                 172.0.0.1
.....
}

In this way the host check_command produces the same state as the "Connectivity" Service on the same Host.
This is done by the "on-demand" Macros.

This ist still a quick hack, but it works ;-)
This is IMHO the fastest way without parsing status.dat.

Greets from Germany
Jörg Linge


-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid0709&bid&3057&dat1642
_______________________________________________
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