I have a Nagios running on Linux machine and its monitoring more than 50 Linux clients using NRPE plugin. But now I am facing some issue with the logging.
For example, If I add a new client to nagios , no information available on the main nagios log file about the new client. It is available in the log file only after one day.
is there anything to configure on nagios to log everything in main log file?
Thanks in advance
Nagios logging of new client
Re: Nagios logging of new client
How often is the host being checked? And which log file specifically are you referencing?
Former Nagios employee
Re: Nagios logging of new client
If I add new client, the details will show oon portal, but not available in log file. I am not sure about host checking time. Can you please tell me how can we check that on configuration? I am referencing the main nagios log file. (/var/log/nagios/nagios.log)
-
slansing
- Posts: 7698
- Joined: Mon Apr 23, 2012 4:28 pm
- Location: Travelling through time and space...
Re: Nagios logging of new client
If it is currently scheduling, and running checks, you should see it come through the nagios.log. This also means that NDO is logging it, and it should be view-able by your reports. You are saying this is not the case?
Re: Nagios logging of new client
yes, if we add a new client today its not showing on today's log file. its showing only after one day, that means its showing tomorrow's log file.
-
slansing
- Posts: 7698
- Joined: Mon Apr 23, 2012 4:28 pm
- Location: Travelling through time and space...
Re: Nagios logging of new client
Have you moved the server across zones or changed your system time since the last time the nagios process was restarted? Do you have any way of showing us this? comparing the time that your host config file was last updated with your nagios log? Perhaps I should pose this in a question this time. Are the checks being scheduled? Do you see them actively running in the web interface, and status updates returning? Or is the host pending?
Re: Nagios logging of new client
I haven't moved the server, I restarted the nagios server every time when I adding new clients. Please let me know what you need from my side, nagios log file or conf file? Every update showing in the portal correctly, only the issue is with the log file. If I add a new client, it shows on the web portal instantly after restarting the server. Also every checks happening correctly. While adding the client, the host and service status is pending for some minutes, but after two or three minutes the status will change to OK both for hosts and services.
Re: Nagios logging of new client
You want to take a look at log_initial_statesitzforu wrote:is there anything to configure on nagios to log everything in main log file?
In the Core sample config it's disabled by default, so if the first check is OK, you wont see the new hosts/services in the logs until the logs are rotated.
Can you try setting log_initial_states=1 in nagios.cfg?
Re: Nagios logging of new client
Thanks for your reply.
I set "log_initial_states" to 1, after that if I add a new client, the information shows on the log file. But the "status information" for all services of the new client showing as "null" on the log file. so my question, is there any option to log all information about new client even if the status is "OK"?
I set "log_initial_states" to 1, after that if I add a new client, the information shows on the log file. But the "status information" for all services of the new client showing as "null" on the log file. so my question, is there any option to log all information about new client even if the status is "OK"?
-
slansing
- Posts: 7698
- Joined: Mon Apr 23, 2012 4:28 pm
- Location: Travelling through time and space...
Re: Nagios logging of new client
Well, it should log all incoming check results, no matter what state they are in. A (NULL) output typically has to do with a communication issue between the remote client and it's plugins, and is another issue all together that should have it's own thread.