Log ALL Polls

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
dward
Posts: 1
Joined: Tue Feb 02, 2021 7:58 am

Log ALL Polls

Post by dward »

Hello fellow Nagios users/admins,

I am writing this post in the search of guidance in regards to the logging capabilities of Nagios (Core v4.3.4, hosted on RHEL 7.4).

My specific question is relating to a configuration within Nagios itself, as I currently have two monitoring servers:
srv-nag-01
srv-nag-02

Within each Nagios server, I have a plethora of devices which are monitored (switches, firewalls, servers, etc...).

On 'srv-nag-01', I can see in the file '/var/log/nagios/nagios.log' (default log file) that every poll of devices is being written.
On 'srv-nag-02', I can see in the file '/var/log/nagios/nagios.log' that polls of devices are only being written if the status has changed.

Example for 'srv-nag-02':
Status OK -> Status WARNING
Status OK -> Status CRITICAL
Status WARNING -> OK
Status WARNING -> CRITICAL
Status CRITICAL -> OK
Status CRITICAL -> WARNING

If a device has not made a state change like the above example, then it is not written to the log file on 'srv-nag-02'.

My question: Is there a way that this can be configured? If so, where would I look?

I have tried searching for differences in 'nagios.cfg', and the only inconsistency between them is:

On 'srv-nag-01' -> log_initial_states=1
On 'srv-nag-02' -> log_initial_states=0

Aside from the above, there are no config settings which differ between servers.

My question is: Which configuration file, and which parameter should be modified on srv-nag-02 so that the polled data from every poll appears in the log file(s)?

The following configurations are present on both servers:
log_notifications=1
log_service_retries=1
log_host_retries=1
log_event_handlers=1
log_current_states=1
log_external_commands=1
log_passive_checks=1

Any/All advice will be greatly appreciated!
Locked