Page 1 of 1

how to force to write service status in nagios.log

Posted: Fri Jun 12, 2015 2:14 pm
by zaji_nms
Dear Forum

while checking found every day at 00:00hrs all the Host & Service status get written to /usr/local/nagios/var/nagios.log and after that no entries got written unless there is change in status.

How we can force Nagios or XI to write the log entry even there is no change in service status?

Is there any option in NagiosXI 2014R2.0 or is there any script can do that?

Regards

Re: how to force to write service status in nagios.log

Posted: Mon Jun 15, 2015 9:27 am
by tgriep
Here are the configuration options in the /usr/local/nagios/etc/nagios.cfg file that you can edit to get more information logged.

Code: Select all

log_external_commands
log_host_retries
log_initial_states
log_notifications
log_passive_checks
log_service_retries
Here is the link to the documentation that describes what those setting do.
http://nagios.sourceforge.net/docs/nagi ... gmain.html

Do you have anything specific you want to be logged?

Re: how to force to write service status in nagios.log

Posted: Mon Jun 15, 2015 9:43 am
by tmcdonald
You might also look into state stalking:

http://nagios.sourceforge.net/docs/3_0/stalking.html

Though if the exit code and output are exactly the same, it still will not log. This might not be exactly what you are looking for, but let us know if either of these solutions work out for you.