Nagios XI UI showing database error after server reboot
Posted: Thu Dec 13, 2018 5:18 am
Hi,
We had a reboot on the host Nagios XI was running from to take some backups and upon startup, the Web UI page stated an error with database and suggested the following script to be run:
After running the script the Web UI still did not load and from the nagios.logs multiple entries these were observed:
mysqld.log looks fine and I was able to log in to the mysql DB from console
I am running Nagios XI 5.4.11, I assumed that the Nagios was running off mysql, but the issue was resolved after the following was run
As I inherited this Nagios setup, how can I check if it was upgraded from a version before 5 which might explain why there is a need for postgresql to be started. Lastly how can I check if this postgresql is indeed still in use and when i check the service status the below is returned.
We had a reboot on the host Nagios XI was running from to take some backups and upon startup, the Web UI page stated an error with database and suggested the following script to be run:
Code: Select all
/usr/local/nagiosxi/scripts/repair_databases.shCode: Select all
2018-12-13T09:39:17.696504+00:00 nagxi-01 nagios: wproc: GLOBAL SERVICE EVENTHANDLER job 184 from worker Core Worker 15784 is a non-check helper but exited with return code 1
2018-12-13T09:39:17.696528+00:00 nagxi-01 nagios: wproc: early_timeout=0; exited_ok=1; wait_status=256; error_code=0;
2018-12-13T09:39:17.696533+00:00 nagxi-01 nagios: wproc: stdout line 01: UNABLE TO CONNECT TO DB - EXITING!
Code: Select all
181213 09:30:28 mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended
181213 09:32:49 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
181213 9:32:49 InnoDB: Initializing buffer pool, size = 8.0M
181213 9:32:49 InnoDB: Completed initialization of buffer pool
181213 9:32:49 InnoDB: Started; log sequence number 0 44243
181213 9:32:49 [Note] Event Scheduler: Loaded 0 events
181213 9:32:49 [Note] /usr/libexec/mysqld: ready for connections.
Code: Select all
service postgresql startCode: Select all
[root@nagxi-01 mysql]# service postgresql status
postmaster dead but pid file exists