Page 2 of 2

Re: Nagios logging of new client

Posted: Mon Nov 17, 2014 12:19 pm
by itzforu
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".

Re: Nagios logging of new client

Posted: Mon Nov 17, 2014 5:37 pm
by abrist
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.
Sometimes. Depends on the plugin and the agent. You may see a socket timeout, connection refused, etc as well.
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".
This is most likely because you have state retention turned off. What is the output of:

Code: Select all

grep retain_state_information /usr/local/nagios/etc/nagios.cfg

Re: Nagios logging of new client

Posted: Mon Nov 17, 2014 10:08 pm
by itzforu
Thanks for the reply.
You may see a socket timeout, connection refused, etc as well.
if so, how can I check these errors? on nagios log file?

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

Re: Nagios logging of new client

Posted: Tue Nov 18, 2014 11:34 am
by slansing
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

Posted: Tue Nov 18, 2014 12:32 pm
by itzforu
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

Posted: Tue Nov 18, 2014 5:30 pm
by abrist
The check should log. Does the second check log (even if ok)?

Re: Nagios logging of new client

Posted: Tue Nov 18, 2014 11:57 pm
by itzforu
no, its not logging. is there anything to do for that on nagios conf?

Re: Nagios logging of new client

Posted: Wed Nov 19, 2014 5:12 pm
by sreinhardt
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?