Page 1 of 2
Click Apply Configuration but it still shows "Not Applied"
Posted: Thu Dec 22, 2016 3:15 pm
by xlin125
I have Nagios XI 5.2.3 running on Redhat 6.8. I noticed that when I created a new Nagios service to monitor the Nagios XI server itself (localhost) and then Apply Configuration, it returned fine, and the new Nagios service started doing monitoring as well. However, Under the Service, it still showed "Changes detected! Apply Configuration for new changes to take effect.", and the status of that service is still "Not Apllied". I tried to Apply Configuration, and this issue remains the same. I did not see this problem on this Nagios XI server before. What went wrong and how to fix it? Thanks!
Re: Click Apply Configuration but it still shows "Not Applie
Posted: Thu Dec 22, 2016 3:23 pm
by avandemore
XI > Configure > Core Config Manager > Config File Management > Delete Files > Write Configs > Verify Files > Restart Nagios Core
Please report your result. Also note, this commands have been renamed slightly so you may need to adjust the steps.
Re: Click Apply Configuration but it still shows "Not Applie
Posted: Thu Dec 22, 2016 3:43 pm
by xlin125
Thanks for the quick response.
I can not find "Config File Management" under "Core Config Manager". Please see the attached for the two screen shots under Configure:
Re: Click Apply Configuration but it still shows "Not Applie
Posted: Thu Dec 22, 2016 3:52 pm
by xlin125
Under XI > Configure > Core Config Manager > Tools > Write Config Files, I found the something similar. Please see the attached. Am I get it right on my XI 5.2.3?
Re: Click Apply Configuration but it still shows "Not Applie
Posted: Thu Dec 22, 2016 4:03 pm
by avandemore
Yes, please do Delete > Write > Verify > Restart.
Re: Click Apply Configuration but it still shows "Not Applie
Posted: Thu Dec 22, 2016 4:13 pm
by xlin125
Do I need to be nagiosadmin to perform these steps or just my XI ID with admin privilege is good enough to perform these steps and restart Nagios Core? Restarting Nagios Core means "service nagios restart"?
Re: Click Apply Configuration but it still shows "Not Applie
Posted: Thu Dec 22, 2016 4:18 pm
by ssax
Admin privileges is fine.
After you're done doing that, please run this tail command (and let it run):
Code: Select all
tail -F /usr/local/nagiosxi/var/cmdsubsys.log /var/log/httpd/*error_log
Then try applying configuration and send us the entire output.
Thank you
Re: Click Apply Configuration but it still shows "Not Applie
Posted: Thu Dec 22, 2016 5:04 pm
by xlin125
I did the Delete > Write > Verify > Restart. Then tail the two files, then Apply Configuration. It restarted successfully, but XI still shows the new services are still "Not Applied", even these services are doing monitoring ok. Please see the entire output attached from the tail command. Thanks!
Re: Click Apply Configuration but it still shows "Not Applie
Posted: Thu Dec 22, 2016 5:14 pm
by rkennedy
If apply config ran successfully now, but still shows not applied, this is usually related to system time and SQL time not being aligned. What is the output of these commands?
Code: Select all
grep "date.timezone" /etc/php.ini
ls -l /etc/localtime
php -r 'echo date("D M j G:i:s T Y")."\n";'
date
mysql -unagiosxi -pn@gweb -e "SELECT NOW();"
If any of these do not line up, then you'll need to adjust them. As for if SQL is offloaded, you'll want to make sure the SQL time set in the DB aligns to Nagios.
Re: Click Apply Configuration but it still shows "Not Applie
Posted: Thu Dec 22, 2016 5:34 pm
by xlin125
$ grep "date.timezone" /etc/php.ini
;
http://www.php.net/manual/en/datetime.c ... e.timezone
date.timezone = America/New_York
$ ls -l /etc/localtime
lrwxrwxrwx 1 root root 26 Oct 17 20:42 /etc/localtime -> /usr/share/zoneinfo/US/UTC
$ date
Thu Dec 22 22:19:14 UTC 2016
$ ./mysql -unagiosxi -pn@gweb -e "SELECT NOW();"
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)
$ ls -l /opt/app/mysql/mysql.sock
srwxrwxrwx 1 mysql mysql 0 Dec 22 16:00 /opt/app/mysql/mysql.sock
The mysql.lock file is in /opt/app/mysql/ directory. How should I run mysqls command to point to the correct path for this lock file (syntax?)?
I also noticed the time/clock issue because under the Home > Service Detail, the Duration shows a negative time for the new services.