O'Reilly logo

Nagios, 2nd Edition by Wolfgang Barth

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

8.2 Negating Plugin Results

In some situations you may want to test the opposite of what the standard plugin normally tests, such as an interface that should not be active, a Web page or a host that should normally not be reached. In these cases the program negate, included in the Nagios plugins, provides a way of negating the return value of the original check.

Like plugins, negate has an option to specify a timeout in seconds, with -t, after which it should abort the operation. The actual command line must always contain the complete path to the plugin:

negate plugin command
negate -t timeout plugin command

negate changes the return value of 2 (CRITICAL) to 0 (OK) and vice versa. The return codes 1 (WARNING) and 3 (UNKNOWN) remain unchanged.

The ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required