[Nagiosplug-devel] Boolean Plugins

Dylan Martin dmartin at sccd.ctc.edu
Fri Jun 13 22:19:06 CEST 2008


I've actually started working on a check_or plugin and it's very
interesting.  Because I want it to act like most local operators, I've
added short-cut execution.  So, in check_or, if the first check
succeeds, the 2nd check never happens, which has interesting
implications.

> You can build complex boolean expressions in Perl syntax like
>
> state[CRITICAL]=((check_a == OK) || (check_b > check_c)) && !check_d
>
> Pattern regex against plugin outputs is also available:
>
> state[CRITICAL]=$check_a$ !~ /error|failed/

Where is that?  Is that in a nagios configuration file or in the code
of a plugin, or somwhere else?

Thanks
-Dylan




More information about the Devel mailing list