Using adaptive monitoring
Nagios provides a very powerful feature called adaptive monitoring that allows the modification of various check-related parameters on the fly. This is done by sending a command to the Nagios external command pipe.
The first thing that can be changed on the fly is the command to be executed by Nagios, along with the attributes that will be passed to it-an equivalent of the check_command
directive in the object definition. In order to do that we can use the CHANGE_HOST_CHECK_COMMAND
or CHANGE_SVC_CHECK_COMMAND
command. These require the hostname, or the hostname and service description, and the check command as arguments.
This can be used to actually change how hosts or services are checked, or to only modify parameters ...
Get Learning Nagios - Third Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.