how to force to write service status in nagios.log

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
zaji_nms
Posts: 616
Joined: Tue Oct 16, 2012 12:28 am

how to force to write service status in nagios.log

Post 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
Zajil NMS
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

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

Post 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?
Be sure to check out our Knowledgebase for helpful articles and solutions!
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

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

Post 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.
Former Nagios employee
Locked