How often the nagios.log file upates?
-
chitrangada
- Posts: 32
- Joined: Sat Aug 10, 2013 8:20 am
How often the nagios.log file upates?
Hi,
I want know how often does the nagios.log updates? What criteria does nagios follow to update it?
Thanks in advance.
I want know how often does the nagios.log updates? What criteria does nagios follow to update it?
Thanks in advance.
-
sreinhardt
- -fno-stack-protector
- Posts: 4366
- Joined: Mon Nov 19, 2012 12:10 pm
Re: How often the nagios.log file upates?
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?
Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.
-
chitrangada
- Posts: 32
- Joined: Sat Aug 10, 2013 8:20 am
Re: How often the nagios.log file upates?
Hi, I want to read data from this file through my script, so just wanna know how frequently it has been updated?
-
slansing
- Posts: 7698
- Joined: Mon Apr 23, 2012 4:28 pm
- Location: Travelling through time and space...
Re: How often the nagios.log file upates?
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.
-
chitrangada
- Posts: 32
- Joined: Sat Aug 10, 2013 8:20 am
Re: How often the nagios.log file upates?
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.
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.
-
sreinhardt
- -fno-stack-protector
- Posts: 4366
- Joined: Mon Nov 19, 2012 12:10 pm
Re: How often the nagios.log file upates?
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.
Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.
-
chitrangada
- Posts: 32
- Joined: Sat Aug 10, 2013 8:20 am
Re: How often the nagios.log file upates?
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.
I apologies if confused you.
Thanks.
Re: How often the nagios.log file upates?
The nagios.log file should be written to almost immediately. Nagios leaves the file open and writes to it constantly.
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
-
chitrangada
- Posts: 32
- Joined: Sat Aug 10, 2013 8:20 am
Re: How often the nagios.log file upates?
Okay.
Thank you so much.
Thank you so much.
-
sreinhardt
- -fno-stack-protector
- Posts: 4366
- Joined: Mon Nov 19, 2012 12:10 pm
Re: How often the nagios.log file upates?
Locking thread since the question seems answered. If you have more difficulties, feel free to open a new one!
Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.