so my question is, if there is a communication issue, the nagios log should always have the status information as "NULL". right? But in my case after log rotation all the services have correct status information.
Also after adding a client to nagios server , all the services has a status as "pending" on web portal, but after two or three minutes the status will become "OK".
Nagios logging of new client
Re: Nagios logging of new client
Sometimes. Depends on the plugin and the agent. You may see a socket timeout, connection refused, etc as well.itzforu wrote:so my question is, if there is a communication issue, the nagios log should always have the status information as "NULL". right? But in my case after log rotation all the services have correct status information.
This is most likely because you have state retention turned off. What is the output of:itzforu wrote: Also after adding a client to nagios server , all the services has a status as "pending" on web portal, but after two or three minutes the status will become "OK".
Code: Select all
grep retain_state_information /usr/local/nagios/etc/nagios.cfgFormer 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.
Re: Nagios logging of new client
Thanks for the reply.
Here is the output.
if so, how can I check these errors? on nagios log file?You may see a socket timeout, connection refused, etc as well.
Here is the output.
Code: Select all
[root@Nagios-server ~]# grep retain_state_information /etc/nagios/nagios.cfg
retain_state_information=1
# This file is used only if the retain_state_information-
slansing
- Posts: 7698
- Joined: Mon Apr 23, 2012 4:28 pm
- Location: Travelling through time and space...
Re: Nagios logging of new client
On the note of pending, that is completely expected when you first set up new checks, nagios has not scheduled or ran the checks yet, it's not going to give you a false status output when they are first configured. I believe abrist was talking about all of your hosts and services showing as pending, if that is the case, that is another issue we can help track down. Yes, you will be able to see the check returns in the nagios log, you will also, of course, see them as status information on your hosts / services in XI. Solely checking your host/service statuses by watching your adagios log kind of defeats the purpose of being able to watch and monitor them through the web interface...
Re: Nagios logging of new client
There is no issue with all hosts and its services. The issue is only with the newly added client at the day of adding to nagios server and the status is pending only for few minutes before first check. After first check everything seems fine, but the first check is not logging to the log file. I need to log the first check result of every new host and its services to log file. is that possible even if the first check is "OK"?
Re: Nagios logging of new client
The check should log. Does the second check log (even if ok)?
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.
Re: Nagios logging of new client
no, its not logging. is there anything to do for that on nagios conf?
-
sreinhardt
- -fno-stack-protector
- Posts: 4366
- Joined: Mon Nov 19, 2012 12:10 pm
Re: Nagios logging of new client
We can certainly enable debugging, add a new host or service, and look for the messages that indicated it checked. Otherwise, let's first verify, the first check does not get logged, do the second, third, etc log or are all events from a newly added object still taking a full 24 hours to show, mainly after a log rotation?
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.