Page 2 of 2

Re: Nagios database is not getting updated while nagiosql is

Posted: Mon May 01, 2017 9:42 am
by tgriep
You should be able to disable notifications and active checks for static configurations from the Host / Service details screen but you cannot do that from the Core Config Manager as those entries are not stored in the MYSQL database.

Can you run the following as root on the Nagios server

Code: Select all

tail -f /usr/local/nagiosxi/var/cmdsubsys.log
Then disable the Active Service Check from the GUI, and post the output of the tail command so we can view the errors.

Re: Nagios database is not getting updated while nagiosql is

Posted: Tue May 02, 2017 3:12 am
by pratik.patel
Please find the attached log.

Re: Nagios database is not getting updated while nagiosql is

Posted: Tue May 02, 2017 9:46 am
by tgriep
It looks like the command was sent and Nagios processed it but there could be a php version mismatch with mysql or a corrupt mysql table.
Can you run the following as root and post the /tmp/info.txt file?

Code: Select all

php -i >/tmp/info.txt
mysql -V >>/tmp/info.txt
tail -50 /var/log/mysqld.log >>/tmp/info.txt
ps -ef --cols=300 >>/tmp/info.txt

Re: Nagios database is not getting updated while nagiosql is

Posted: Tue May 02, 2017 10:27 am
by pratik.patel
I have send PM of /tmp/info.txt and there is no such file /var/log/mysqld.log.

tail -50 /var/log/mysqld.log >>/tmp/info.txt
tail: cannot open â/var/log/mysqld.logâ for reading: No such file or directory

Re: Nagios database is not getting updated while nagiosql is

Posted: Tue May 02, 2017 11:07 am
by tgriep
Thanks for the file. It is shared with the other techs.

Is the MYSQL database server off-loaded to a remote system and not running on the Nagios XI server?
If so, can you post the MYSQL config files from the remote server so we can view them?

If the MYSQL server is still running on the Nagios XI server, it looks like it is not running correctly so run the following commands as root o the Nagios server.

Code: Select all

service nagios stop
service ndo2db stop
service crond stop
service mysqld stop
pkill -u mysql
service mysqld start
service ndo2db start
service crond start
service httpd restart
service nagios start
Wait for about 5 minutes and see if the issue is still happening.

Re: Nagios database is not getting updated while nagiosql is

Posted: Tue May 02, 2017 11:17 am
by pratik.patel
Thank you for the quick reply.

Mysql is running on the same server.

The issue has been solved as I did nagios reinstall and it was working. Right now only localhost is configured.
I think previously it did not worked because I loaded 500 hosts and 5k services and thn tried to disable the checks and my server was very slow due to load.
correct me if I am wrong.

Re: Nagios database is not getting updated while nagiosql is

Posted: Tue May 02, 2017 1:53 pm
by dwhitfield
pratik.patel wrote:my server was very slow due to load.
correct me if I am wrong.
We haven't seen any load figures, so it's impossible to say.

If you do see high load though, you probably will want to take a look at https://assets.nagios.com/downloads/nag ... ios-XI.pdf