Page 1 of 1

How often the nagios.log file upates?

Posted: Fri Sep 06, 2013 6:22 am
by chitrangada
Hi,

I want know how often does the nagios.log updates? What criteria does nagios follow to update it?

Thanks in advance.

Re: How often the nagios.log file upates?

Posted: Fri Sep 06, 2013 10:31 am
by sreinhardt
This is entirely dependent on the system. It updates with notifications and state changes, plugin errors, if the daemon is stopped or started. There are many things that can cause an entry into the nagios.log. Is there something specific you are looking for?

Re: How often the nagios.log file upates?

Posted: Mon Sep 09, 2013 12:44 am
by chitrangada
Hi, I want to read data from this file through my script, so just wanna know how frequently it has been updated?

Re: How often the nagios.log file upates?

Posted: Mon Sep 09, 2013 10:41 am
by slansing
Once again that is up to you, depending on how often logs are written to the file you may want to opt to reap that data faster or slower as doing it faster may not matter due to a slow log.

Re: How often the nagios.log file upates?

Posted: Tue Sep 10, 2013 12:46 am
by chitrangada
Okay.

So what i understand is that the lowest check_interval is 1m then I should read the log file after every minute so that i would not lose any information/check status.
Please correct if i am wrong anyway.

Thanks for the time. :)

Re: How often the nagios.log file upates?

Posted: Tue Sep 10, 2013 9:40 am
by sreinhardt
Unless you have thousands of checks with 1 min intervals, you should not need to read it that often. You certainly can, but it does not overwrite itself that quickly. 5 to 10 minute intervals would likely me often enough. What might I ask are you attempting to gain by checking the log file? Most information you could likely get built in apis instead.

Re: How often the nagios.log file upates?

Posted: Wed Sep 11, 2013 5:47 am
by chitrangada
Well, i am using an API which generates the log data in xml format i.e. Status XML generator (http://exchange.nagios.org/directory/Ad ... or/details). I just want to know that after how many minutes/seconds does nagios updates this log file. I have observed the page-loader rotating after certain minutes in title bar of the nagios tab.

I apologies if confused you.

Thanks.

Re: How often the nagios.log file upates?

Posted: Wed Sep 11, 2013 11:54 am
by abrist
The nagios.log file should be written to almost immediately. Nagios leaves the file open and writes to it constantly.

Re: How often the nagios.log file upates?

Posted: Wed Sep 11, 2013 11:27 pm
by chitrangada
Okay.
Thank you so much.

Re: How often the nagios.log file upates?

Posted: Thu Sep 12, 2013 9:45 am
by sreinhardt
Locking thread since the question seems answered. If you have more difficulties, feel free to open a new one!