I have a setup were we are using config files in the /usr/local/nagios/etc/static folder. When we check the "Service Details" it shoulds only 181 hosts, but we have over 800 hosts. The only way we found to get the number some what close is to restart ndo2db and nagios services. We have also noticed that if we view the Service Details in the Nagios Core View, it shows all the hosts.
Can you let us know what we need to do in order to have Nagios XI Service Details to display correctly when not using Nagios Core View?
Nagios Core 4.1.1
Copyright (c) 2009-present Nagios Core Development Team and Community Contributors
Copyright (c) 1999-2009 Ethan Galstad
Last Modified: 08-19-2015
License: GPL
Are you actively restarting nagios when you make changes to the static folder? To be clear, simply dropping a config in that folder will not be enough - nagios will not notice the new configs until you restart the process.
I was looking through the profile and I noticed that there were errors connecting to your remote MYSQL server.
Can you login to the MYSQL server and check the logs for any error information and post it here?
Also, can you login to the XI server, run the following command and post it's output?
I will verify that nagios is being restarted after a configuration get changed. I am reaching out to our database team about the errors in the logs. Below is the command you requested the output for.
Below is the error and warning we are getting in the Remote MySQL server.
2016-05-03 00:45:16 4923 [Warning] Aborted connection 6089678 to db: '<DB Schema>' user: '<DB User>' host: '<DB Server>' (Got an error reading communication packets)
2016-05-03 00:50:13 4923 [Warning] Aborted connection 6089679 to db: '<DB Schema>' user: '<DB User>' host: '<DB Server>' (Got an error reading communication packets)
2016-05-03 00:55:16 4923 [Warning] Aborted connection 6090566 to db: '<DB Schema>' user: '<DB User>' host: '<DB Server>' (Got an error reading communication packets)
2016-05-03 01:00:14 4923 [Warning] Aborted connection 6090565 to db: '<DB Schema>' user: '<DB User>' host: '<DB Server>' (Got an error reading communication packets)
2016-05-03 01:10:02 4875 [ERROR] Invalid default value for 'last_modified'
2016-05-03 01:10:02 4875 [ERROR] Invalid default value for 'last_modified'
2016-05-03 01:10:02 4875 [ERROR] Invalid default value for 'entry_time'
2016-05-03 01:10:02 4875 [ERROR] Invalid default value for 'entry_time'
2016-05-03 01:10:02 4875 [ERROR] Invalid default value for 'entry_time'
2016-05-03 01:10:02 4875 [ERROR] Invalid default value for 'entry_time'
2016-05-03 01:10:02 4875 [ERROR] Invalid default value for 'entry_time'
2016-05-03 01:10:02 4875 [ERROR] Invalid default value for 'entry_time'
2016-05-03 01:10:02 4875 [ERROR] Invalid default value for 'connect_time'
2016-05-03 01:10:02 4875 [ERROR] Invalid default value for 'connect_time'
2016-05-03 01:10:02 4875 [ERROR] Invalid default value for 'start_time'
2016-05-03 01:10:02 4875 [ERROR] Invalid default value for 'start_time'
2016-05-03 01:10:02 4875 [ERROR] Invalid default value for 'start_time'
2016-05-03 01:10:02 4875 [ERROR] Invalid default value for 'start_time'
2016-05-03 01:10:02 4875 [ERROR] Invalid default value for 'status_update_time'
2016-05-03 01:10:02 4875 [ERROR] Invalid default value for 'status_update_time'
2016-05-03 01:10:03 4875 [ERROR] Invalid default value for 'status_update_time'
2016-05-03 01:10:03 4875 [ERROR] Invalid default value for 'entry_time'
2016-05-03 01:10:03 4875 [ERROR] Invalid default value for 'status_update_time'
2016-05-03 01:10:03 4875 [ERROR] Invalid default value for 'start_time'
2016-05-03 01:10:03 4875 [ERROR] Invalid default value for 'entry_time'
2016-05-03 01:10:03 4875 [ERROR] Invalid default value for 'event_time'
2016-05-03 01:10:03 4875 [ERROR] Invalid default value for 'entry_time'
Thanks for the information, it looks like the Nagios server is having problems connecting and staying connected to the MYSQL server.
Can you provide any information about the MYSQL server and also post the configuration files for it?
Can you run a repair of the mysql database?
Also, there are a lot of stuck messages in the queue in the XI server, login as root to the server, run the following commands to clear them out.
service nagios stop
service ndo2db stop
for i in `ipcs -q | grep nagios |awk '{print $2}'`; do ipcrm -q $i; done
service ndo2db start
service nagios start
Be sure to check out our Knowledgebase for helpful articles and solutions!
I did a check on the repair_database.sh script in the /usr/local/nagiosxi/scripts, it is designed specifically to handle the database on the localhost and not an offloaded server or am I incorrect and can you provide the specific adjustments or options I need to use?