Re: [Nagios-devel] Important check_command functionality

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
Guest

Re: [Nagios-devel] Important check_command functionality

Post by Guest »

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





This post was automatically imported from historical nagios-devel mailing list archives
Original poster: [email protected]
Locked