Important check_command functionality

Ton Voon ton.voon at opsera.com
Wed May 20 00:43:00 CEST 2009


Hi!,

One neat trick that we've done in Opsview for configuring in a  
distributed environment is an "important check command".

The documentation change says:

---

Service templates can make use of a special rule which gives  
precedence to their check_command value. If the check_command is  
prefixed with an exclamation mark (!), then the template's  
check_command is marked as important and will be used over the  
check_command defined for the service.

Why is this useful? Mainly when setting a different check_command for  
distributed systems. You may want to set a freshness threshold and a  
check_command that forces the service into a failed state, but this  
doesn't work with the normal templating system. Using this  
<i>important</i> flag allows the custom check_command to be written,  
but a general distributed template can be used to overrule the  
check_command when used on a central Nagios server.

For instance:

# On master
define host{
        name                    service-distributed
        register                0
        active_checks_enabled   0
        check_freshness         1
        check_command           !set_to_stale
        }

# On slave
define host{
        name                    service-distributed
        register                0
        active_checks_enabled   1
        }

# Server configuration, used by master and slave
define host{
        host_name               host1
        check_command           check_http...
        use                     service-distributed
        ...
        }

----

The patch is attached. Would this be desired in core Nagios?

Ton

-------------- next part --------------
A non-text attachment was scrubbed...
Name: nagios_important_check_command.patch
Type: application/octet-stream
Size: 4897 bytes
Desc: not available
URL: <https://www.monitoring-lists.org/archive/developers/attachments/20090519/637c11b7/attachment.obj>
-------------- next part --------------

-------------- next part --------------
------------------------------------------------------------------------------
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensing option that enables 
unlimited royalty-free distribution of the report engine 
for externally facing server and web deployment. 
http://p.sf.net/sfu/businessobjects
-------------- next part --------------
_______________________________________________
Nagios-devel mailing list
Nagios-devel at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-devel


More information about the Developers mailing list