Writing debugging information to a Nagios log file
In this recipe, we'll learn how to use the debugging log file in Nagios Core to get various kinds of process information from the running program, considerably more than available in the file specified by the standard log_file
directive. This is useful not just for debugging purposes when Nagios Core is doing something unexpected at runtime, but also to get a better idea of how the server is working in general and with your particular configuration.
Getting ready
You will need a Nagios Core server with version 3.0 or greater. More debugging options are available in versions after 3.0, but these will be noted in the recipe. You will need access to change the nagios.cfg
file and to restart the server.
In this example, we'll simply log everything we possibly can, and then explain how to refine the logging behavior if necessary in the How it works… section.
How to do it...
We can enable very verbose debugging for our monitoring server as follows...