Nagios DB error page after RHEL6 patching
Posted: Mon Mar 25, 2019 3:59 pm
Howdy friends!
We recently patched our RHEL 6 server from 6.9 to 6.10. After said patching (and rebooting of the host) nagios is presenting the following page
So, we did as told, and tried to run the repair_databases.sh script. That keeps yielding the following and even after it runs, we are still told there is a db connection error detected.
/var/log/msqld.log is empty
cleaner.log shows the following
But I'm looking at the postgres db and I don't see anything nagios related....
This is my first deeper dive with Nagios so I'm a bit wayward on which way to take my troubleshooting.
We recently patched our RHEL 6 server from 6.9 to 6.10. After said patching (and rebooting of the host) nagios is presenting the following page
Code: Select all
Databse Error
A database connection error has been detected, please follow the repair prompt below. If the issue persists, please contact Nagios support.
Run the following from the CLI as root to attempt to repair the DB:
/usr/local/nagiosxi/scripts/repair_databases.sh
Code: Select all
root@pu-nagios-01:/var/log > /usr/local/nagiosxi/scripts/repair_databases.sh
mysqld (pid 24796) is running...
mysqld (pid 24796) is running...
DATABASE: nagios
TABLE:
/proj/database/mysql/nagios /var/log
Stopping mysqld: [ OK ]
- recovering (with sort) MyISAM-table 'nagios_service_parentservices.MYI'
Data records: 0
- Fixing index 1
- Fixing index 2
Starting mysqld: [ OK ]
/var/log
===============
REPAIR COMPLETE
===============
mysqld (pid 16227) is running...
DATABASE: nagiosql
TABLE:
/proj/database/mysql/nagiosql /var/log
Stopping mysqld: [ OK ]
- recovering (with sort) MyISAM-table 'tbl_command.MYI'
Data records: 281
- Fixing index 1
- Fixing index 2
---------
- recovering (with sort) MyISAM-table 'tbl_contactgroup.MYI'
Data records: 0
- Fixing index 1
- Fixing index 2
---------
- recovering (with sort) MyISAM-table 'tbl_contact.MYI'
Data records: 51
- Fixing index 1
- Fixing index 2
---------
- recovering (with sort) MyISAM-table 'tbl_contacttemplate.MYI'
Data records: 2
- Fixing index 1
- Fixing index 2
---------
- recovering (with sort) MyISAM-table 'tbl_domain.MYI'
Data records: 1
- Fixing index 1
- Fixing index 2
---------
- recovering (with sort) MyISAM-table 'tbl_hostdependency.MYI'
Data records: 0
- Fixing index 1
- Fixing index 2
---------
- recovering (with sort) MyISAM-table 'tbl_hostescalation.MYI'
Data records: 0
- Fixing index 1
- Fixing index 2
---------
- recovering (with sort) MyISAM-table 'tbl_hostextinfo.MYI'
Data records: 0
- Fixing index 1
- Fixing index 2
---------
- recovering (with sort) MyISAM-table 'tbl_hostgroup.MYI'
Data records: 22
- Fixing index 1
- Fixing index 2
---------
- recovering (with sort) MyISAM-table 'tbl_host.MYI'
Data records: 1044
- Fixing index 1
- Fixing index 2
---------
- recovering (with sort) MyISAM-table 'tbl_hosttemplate.MYI'
Data records: 52
- Fixing index 1
- Fixing index 2
---------
- recovering (with sort) MyISAM-table 'tbl_info.MYI'
Data records: 218
- Fixing index 1
- Fixing index 2
---------
- recovering (with sort) MyISAM-table 'tbl_lnkContactgroupToContactgroup.MYI'
Data records: 0
- Fixing index 1
---------
- recovering (with sort) MyISAM-table 'tbl_lnkContactgroupToContact.MYI'
Data records: 0
- Fixing index 1
---------
- recovering (with sort) MyISAM-table 'tbl_lnkContacttemplateToCommandHost.MYI'
Data records: 2
- Fixing index 1
---------
- recovering (with sort) MyISAM-table 'tbl_lnkContacttemplateToCommandService.MYI'
Data records: 2
- Fixing index 1
---------
- recovering (with sort) MyISAM-table 'tbl_lnkContacttemplateToContactgroup.MYI'
Data records: 0
- Fixing index 1
---------
- recovering (with sort) MyISAM-table 'tbl_lnkContacttemplateToContacttemplate.MYI'
Data records: 0
- Fixing index 1
---------
- recovering (with sort) MyISAM-table 'tbl_lnkContacttemplateToVariabledefinition.MYI'
Data records: 0
- Fixing index 1
---------
- recovering (with sort) MyISAM-table 'tbl_lnkContactToCommandHost.MYI'
Data records: 6
- Fixing index 1
---------
- recovering (with sort) MyISAM-table 'tbl_lnkContactToCommandService.MYI'
Data records: 6
- Fixing index 1
---------
- recovering (with sort) MyISAM-table 'tbl_lnkContactToContactgroup.MYI'
Data records: 0
- Fixing index 1
---------
- recovering (with sort) MyISAM-table 'tbl_lnkContactToContacttemplate.MYI'
Data records: 52
- Fixing index 1
---------
- recovering (with sort) MyISAM-table 'tbl_lnkContactToVariabledefinition.MYI'
Data records: 0
- Fixing index 1
---------
- recovering (with sort) MyISAM-table 'tbl_lnkHostdependencyToHost_DH.MYI'
Data records: 0
- Fixing index 1
---------
- recovering (with sort) MyISAM-table 'tbl_lnkHostdependencyToHostgroup_DH.MYI'
Data records: 0
- Fixing index 1
---------
- recovering (with sort) MyISAM-table 'tbl_lnkHostdependencyToHostgroup_H.MYI'
Data records: 0
- Fixing index 1
---------
- recovering (with sort) MyISAM-table 'tbl_lnkHostdependencyToHost_H.MYI'
Data records: 0
- Fixing index 1
---------
- recovering (with sort) MyISAM-table 'tbl_lnkHostescalationToContactgroup.MYI'
Data records: 0
- Fixing index 1
---------
- recovering (with sort) MyISAM-table 'tbl_lnkHostescalationToContact.MYI'
Data records: 0
- Fixing index 1
---------
- recovering (with sort) MyISAM-table 'tbl_lnkHostescalationToHostgroup.MYI'
Data records: 0
- Fixing index 1
---------
- recovering (with sort) MyISAM-table 'tbl_lnkHostescalationToHost.MYI'
Data records: 0
- Fixing index 1
---------
- recovering (with sort) MyISAM-table 'tbl_lnkHostgroupToHostgroup.MYI'
Data records: 0
- Fixing index 1
---------
- recovering (with sort) MyISAM-table 'tbl_lnkHostgroupToHost.MYI'
Data records: 229
- Fixing index 1
---------
- recovering (with sort) MyISAM-table 'tbl_lnkHosttemplateToContactgroup.MYI'
Data records: 0
- Fixing index 1
---------
- recovering (with sort) MyISAM-table 'tbl_lnkHosttemplateToContact.MYI'
Data records: 1
- Fixing index 1
---------
- recovering (with sort) MyISAM-table 'tbl_lnkHosttemplateToHostgroup.MYI'
Data records: 0
- Fixing index 1
---------
- recovering (with sort) MyISAM-table 'tbl_lnkHosttemplateToHost.MYI'
Data records: 0
- Fixing index 1
---------
- recovering (with sort) MyISAM-table 'tbl_lnkHosttemplateToHosttemplate.MYI'
Data records: 50
- Fixing index 1
---------
- recovering (with sort) MyISAM-table 'tbl_lnkHosttemplateToVariabledefinition.MYI'
Data records: 1
- Fixing index 1
---------
- recovering (with sort) MyISAM-table 'tbl_lnkHostToContactgroup.MYI'
Data records: 0
- Fixing index 1
---------
- recovering (with sort) MyISAM-table 'tbl_lnkHostToContact.MYI'
Data records: 1019
- Fixing index 1
---------
- recovering (with sort) MyISAM-table 'tbl_lnkHostToHostgroup.MYI'
Data records: 22
- Fixing index 1
---------
- recovering (with sort) MyISAM-table 'tbl_lnkHostToHost.MYI'
Data records: 0
- Fixing index 1
---------
- recovering (with sort) MyISAM-table 'tbl_lnkHostToHosttemplate.MYI'
Data records: 1037
- Fixing index 1
---------
- recovering (with sort) MyISAM-table 'tbl_lnkHostToVariabledefinition.MYI'
Data records: 966
- Fixing index 1
---------
- recovering (with sort) MyISAM-table 'tbl_lnkServicedependencyToHost_DH.MYI'
Data records: 0
- Fixing index 1
---------
- recovering (with sort) MyISAM-table 'tbl_lnkServicedependencyToHostgroup_DH.MYI'
Data records: 0
- Fixing index 1
---------
- recovering (with sort) MyISAM-table 'tbl_lnkServicedependencyToHostgroup_H.MYI'
Data records: 0
- Fixing index 1
---------
- recovering (with sort) MyISAM-table 'tbl_lnkServicedependencyToHost_H.MYI'
Data records: 0
- Fixing index 1
---------
- recovering (with sort) MyISAM-table 'tbl_lnkServicedependencyToService_DS.MYI'
Data records: 0
- Fixing index 1
---------
- recovering (with sort) MyISAM-table 'tbl_lnkServicedependencyToService_S.MYI'
Data records: 0
- Fixing index 1
---------
- recovering (with sort) MyISAM-table 'tbl_lnkServiceescalationToContactgroup.MYI'
Data records: 0
- Fixing index 1
---------
- recovering (with sort) MyISAM-table 'tbl_lnkServiceescalationToContact.MYI'
Data records: 0
- Fixing index 1
---------
- recovering (with sort) MyISAM-table 'tbl_lnkServiceescalationToHostgroup.MYI'
Data records: 0
- Fixing index 1
---------
- recovering (with sort) MyISAM-table 'tbl_lnkServiceescalationToHost.MYI'
Data records: 0
- Fixing index 1
---------
- recovering (with sort) MyISAM-table 'tbl_lnkServiceescalationToService.MYI'
Data records: 0
- Fixing index 1
---------
- recovering (with sort) MyISAM-table 'tbl_lnkServicegroupToServicegroup.MYI'
Data records: 19
- Fixing index 1
---------
- recovering (with sort) MyISAM-table 'tbl_lnkServicegroupToService.MYI'
Data records: 696
- Fixing index 1
---------
- recovering (with sort) MyISAM-table 'tbl_lnkServicetemplateToContactgroup.MYI'
Data records: 0
- Fixing index 1
---------
- recovering (with sort) MyISAM-table 'tbl_lnkServicetemplateToContact.MYI'
Data records: 5
- Fixing index 1
---------
- recovering (with sort) MyISAM-table 'tbl_lnkServicetemplateToHostgroup.MYI'
Data records: 0
- Fixing index 1
---------
- recovering (with sort) MyISAM-table 'tbl_lnkServicetemplateToHost.MYI'
Data records: 0
- Fixing index 1
---------
- recovering (with sort) MyISAM-table 'tbl_lnkServicetemplateToServicegroup.MYI'
Data records: 0
- Fixing index 1
---------
- recovering (with sort) MyISAM-table 'tbl_lnkServicetemplateToServicetemplate.MYI'
Data records: 82
- Fixing index 1
---------
- recovering (with sort) MyISAM-table 'tbl_lnkServicetemplateToVariabledefinition.MYI'
Data records: 0
- Fixing index 1
---------
- recovering (with sort) MyISAM-table 'tbl_lnkServiceToContactgroup.MYI'
Data records: 0
- Fixing index 1
---------
- recovering (with sort) MyISAM-table 'tbl_lnkServiceToContact.MYI'
Data records: 12151
- Fixing index 1
---------
- recovering (with sort) MyISAM-table 'tbl_lnkServiceToHostgroup.MYI'
Data records: 3
- Fixing index 1
---------
- recovering (with sort) MyISAM-table 'tbl_lnkServiceToHost.MYI'
Data records: 12078
- Fixing index 1
---------
- recovering (with sort) MyISAM-table 'tbl_lnkServiceToServicegroup.MYI'
Data records: 295
- Fixing index 1
---------
- recovering (with sort) MyISAM-table 'tbl_lnkServiceToServicetemplate.MYI'
Data records: 9192
- Fixing index 1
---------
- recovering (with sort) MyISAM-table 'tbl_lnkServiceToVariabledefinition.MYI'
Data records: 9625
- Fixing index 1
---------
- recovering (with sort) MyISAM-table 'tbl_lnkTimeperiodToTimeperiod.MYI'
Data records: 1
- Fixing index 1
---------
- recovering (with sort) MyISAM-table 'tbl_logbook.MYI'
Data records: 2
- Fixing index 1
---------
- recovering (with sort) MyISAM-table 'tbl_mainmenu.MYI'
Data records: 7
- Fixing index 1
---------
- recovering (with sort) MyISAM-table 'tbl_servicedependency.MYI'
Data records: 0
- Fixing index 1
- Fixing index 2
---------
- recovering (with sort) MyISAM-table 'tbl_serviceescalation.MYI'
Data records: 0
- Fixing index 1
- Fixing index 2
---------
- recovering (with sort) MyISAM-table 'tbl_serviceextinfo.MYI'
Data records: 0
- Fixing index 1
- Fixing index 2
---------
- recovering (with sort) MyISAM-table 'tbl_servicegroup.MYI'
Data records: 213
- Fixing index 1
- Fixing index 2
---------
- recovering (with sort) MyISAM-table 'tbl_service.MYI'
Data records: 12016
- Fixing index 1
---------
- recovering (with sort) MyISAM-table 'tbl_servicetemplate.MYI'
Data records: 88
- Fixing index 1
- Fixing index 2
---------
- recovering (with sort) MyISAM-table 'tbl_session_locks.MYI'
Data records: 1
- Fixing index 1
---------
- recovering (with sort) MyISAM-table 'tbl_session.MYI'
Data records: 1
- Fixing index 1
---------
- recovering (with sort) MyISAM-table 'tbl_settings.MYI'
Data records: 13
- Fixing index 1
- Fixing index 2
---------
- recovering (with sort) MyISAM-table 'tbl_submenu.MYI'
Data records: 29
- Fixing index 1
---------
- recovering (with sort) MyISAM-table 'tbl_timedefinition.MYI'
Data records: 608
- Fixing index 1
---------
- recovering (with sort) MyISAM-table 'tbl_timeperiod.MYI'
Data records: 92
- Fixing index 1
- Fixing index 2
---------
- recovering (with sort) MyISAM-table 'tbl_user.MYI'
Data records: 2
- Fixing index 1
- Fixing index 2
---------
- recovering (with sort) MyISAM-table 'tbl_variabledefinition.MYI'
Data records: 17949
- Fixing index 1
Starting mysqld: [ OK ]
/var/log
===============
REPAIR COMPLETE
===============
Stopping ndo2db: done.
Starting ndo2db: done.
Running configuration check...
Stopping nagios:. done.
Starting nagios: done.
=======================
nagios database repair succeeded
nagiosql database repair succeeded
cleaner.log shows the following
Code: Select all
root@pu-nagios-01:/usr/local/nagiosxi/var > cat cleaner.log
PHP Notice: Undefined index: nagiosxi in /usr/local/nagiosxi/html/includes/db.inc.php on line 488
PHP Warning: Invalid argument supplied for foreach() in /usr/local/nagiosxi/html/includes/components/nagiosim/nagiosim.inc.php on line 489
PHP Notice: Undefined index: nagiosxi in /usr/local/nagiosxi/html/includes/db.inc.php on line 488
PHP Notice: Undefined index: nagiosxi in /usr/local/nagiosxi/html/includes/db.inc.php on line 488
PHP Warning: pg_pconnect(): Unable to connect to PostgreSQL server: FATAL: Ident authentication failed for user "nagiosxi" in /usr/local/nagiosxi/html/db/adodb/drivers/adodb-postgres64.inc.php on line 699
PHP Warning: pg_pconnect(): Unable to connect to PostgreSQL server: FATAL: Ident authentication failed for user "nagiosxi" in /usr/local/nagiosxi/html/db/adodb/drivers/adodb-postgres64.inc.php on line 699
PHP Warning: pg_pconnect(): Unable to connect to PostgreSQL server: FATAL: Ident authentication failed for user "nagiosxi" in /usr/local/nagiosxi/html/db/adodb/drivers/adodb-postgres64.inc.php on line 699
PHP Warning: pg_pconnect(): Unable to connect to PostgreSQL server: FATAL: Ident authentication failed for user "nagiosxi" in /usr/local/nagiosxi/html/db/adodb/drivers/adodb-postgres64.inc.php on line 699
PHP Warning: pg_pconnect(): Unable to connect to PostgreSQL server: FATAL: Ident authentication failed for user "nagiosxi" in /usr/local/nagiosxi/html/db/adodb/drivers/adodb-postgres64.inc.php on line 699
PHP Warning: pg_pconnect(): Unable to connect to PostgreSQL server: FATAL: Ident authentication failed for user "nagiosxi" in /usr/local/nagiosxi/html/db/adodb/drivers/adodb-postgres64.inc.php on line 699
PHP Warning: pg_pconnect(): Unable to connect to PostgreSQL server: FATAL: Ident authentication failed for user "nagiosxi" in /usr/local/nagiosxi/html/db/adodb/drivers/adodb-postgres64.inc.php on line 699
PHP Warning: pg_pconnect(): Unable to connect to PostgreSQL server: FATAL: Ident authentication failed for user "nagiosxi" in /usr/local/nagiosxi/html/db/adodb/drivers/adodb-postgres64.inc.php on line 699
PHP Warning: pg_pconnect(): Unable to connect to PostgreSQL server: FATAL: Ident authentication failed for user "nagiosxi" in /usr/local/nagiosxi/html/db/adodb/drivers/adodb-postgres64.inc.php on line 699
PHP Warning: pg_pconnect(): Unable to connect to PostgreSQL server: FATAL: Ident authentication failed for user "nagiosxi" in /usr/local/nagiosxi/html/db/adodb/drivers/adodb-postgres64.inc.php on line 699
<h3>Databse Error</h3>A database connection error has been detected, please follow the repair prompt below. If the issue persists, please contact Nagios support.<p>Run the following from the CLI as root to attempt to repair the DB:<br><pre>/usr/local/nagiosxi/scripts/repair_databases.sh</pre></p>root@pu-nagios-01:/usr/local/nagiosxi/var > psql postgres postgres
psql: FATAL: Ident authentication failed for user "postgres"
This is my first deeper dive with Nagios so I'm a bit wayward on which way to take my troubleshooting.