Page 3 of 3

Re: XI local backups not running

Posted: Mon Jul 22, 2019 5:24 pm
by rferebee
When I try to create a check for the 'nagiosxi' database, I get the following error:

[nagios@nagiosxi ~]$ /usr/local/nagios/libexec/box293_check_mysql_table_status nagiosxi root nagiosxi Database "nagiosxi" = ERROR 1049 (42000) at line 1: Unknown database 'nagiosxi'

Could it be using a different name or a different username/password combination?

Re: XI local backups not running

Posted: Mon Jul 22, 2019 5:59 pm
by rferebee
Sorry the 'nagiosql' database works. I didn't notice there was only one 's' in the name.

Here's what I get when I list the databases running on one of my XI servers:

mysql> show databases;
+--------------------+
| Database |
+--------------------+
| information_schema |
| mysql |
| nagios |
| nagiosql |
+--------------------+
4 rows in set (0.00 sec)

I don't see 'nagiosxi' listed.

Re: XI local backups not running

Posted: Tue Jul 23, 2019 9:50 am
by benjaminsmith
Hi @rferebee,

We used to use postgres for the nagiosxi database and the upgrade script will just maintain this database.

If you'd like to verify this, the following command will let you know which database you have.

Code: Select all

awk '/"nagiosxi" => array\(/{getline;print}' /usr/local/nagiosxi/html/config.inc.php
You can use the Postgres Database Wizard built into Nagios XI to monitor it. To can view the db credentials open up /usr/local/nagiosxi/html/config.inc.php in a text editor.

Let me know if you have any other questions.

Re: XI local backups not running

Posted: Tue Jul 23, 2019 10:10 am
by rferebee
So, looking at the config.inc.php file. There appears to be 3 different Postgres DBs.

'nagiosxi'
'ndoutils'
'nagiosql'

Would we want to monitor each one of those individually? They all have different usernames and passwords.

Thank you.

Re: XI local backups not running

Posted: Tue Jul 23, 2019 11:54 am
by benjaminsmith
Hello,
So, looking at the config.inc.php file. There appears to be 3 different Postgres DBs.
Looking at your profile, nagios and nagiosql are using mysql and nagiosxi is using postgres. You have the checks setup for nagios and nagiosql, so I would recommend using the postgres wizard to check the nagiosxi database.

Re: XI local backups not running

Posted: Tue Jul 23, 2019 1:13 pm
by rferebee
Ok, great. Go ahead and lock this thread then. Thank you.

Re: XI local backups not running

Posted: Tue Jul 23, 2019 1:23 pm
by mbellerue
Excellent, glad to hear everything is working!