Important check_command functionality
Andreas Ericsson
exon at op5.com
Wed May 20 00:53:42 CEST 2009
Ton Voon wrote:
> 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?
>
I like it, and I can think of at least three users of this feature
off the top of my head.
/Andreas
------------------------------------------------------------------------------
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
More information about the Developers
mailing list