Nagios database is not getting updated while nagiosql is

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: Nagios database is not getting updated while nagiosql is

Post 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.
Be sure to check out our Knowledgebase for helpful articles and solutions!
pratik.patel
Posts: 77
Joined: Wed Apr 19, 2017 10:51 am

Re: Nagios database is not getting updated while nagiosql is

Post by pratik.patel »

Please find the attached log.
You do not have the required permissions to view the files attached to this post.
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: Nagios database is not getting updated while nagiosql is

Post 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
Be sure to check out our Knowledgebase for helpful articles and solutions!
pratik.patel
Posts: 77
Joined: Wed Apr 19, 2017 10:51 am

Re: Nagios database is not getting updated while nagiosql is

Post 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
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: Nagios database is not getting updated while nagiosql is

Post 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.
Be sure to check out our Knowledgebase for helpful articles and solutions!
pratik.patel
Posts: 77
Joined: Wed Apr 19, 2017 10:51 am

Re: Nagios database is not getting updated while nagiosql is

Post 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.
dwhitfield
Former Nagios Staff
Posts: 4583
Joined: Wed Sep 21, 2016 10:29 am
Location: NoLo, Minneapolis, MN
Contact:

Re: Nagios database is not getting updated while nagiosql is

Post 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
Locked