This support forum board is for support questions relating to
Nagios XI , our flagship commercial network monitoring solution.
sigmainformatique
Posts: 74 Joined: Mon Apr 23, 2018 8:11 am
Post
by sigmainformatique » Wed Oct 31, 2018 3:20 am
[INF_S01LX01SA@infnxdsup020 ~]$ echo "select * from nagios_objects where is_active=1;" | mysql -t -h X.X.X.X -unagios -pnagios nagios|wc -l
8538
Example of line without wc command:
| 117579 | 4 | 2 | xxxxxx.xxx | perf-uly2prod
As I said, ndo tables seems to be popoulated correctly. It's like Nagios XI can't solve some tables joins (?).
Regards
sigmainformatique
Posts: 74 Joined: Mon Apr 23, 2018 8:11 am
Post
by sigmainformatique » Wed Oct 31, 2018 6:54 am
I have made some comparaisons between our prod environment and dev (which have the issue). I have noticed that the id in instance table is '4' (1 in our prod) :
Code: Select all
MariaDB [nagios]> select * from nagios_instances;
+-------------+---------------+----------------------+
| instance_id | instance_name | instance_description |
+-------------+---------------+----------------------+
| 4 | localhost | |
+-------------+---------------+----------------------+
1 row in set (0.00 sec)
Could it be related?
lmiltchev
Bugs find me
Posts: 13589 Joined: Mon May 23, 2011 12:15 pm
Post
by lmiltchev » Wed Oct 31, 2018 2:32 pm
Hmm, the instance_id should be 1... Yours is 4, perhaps because you deleted bunch of stuff.
Code: Select all
MariaDB [nagios]> select * from nagios_instances;
+-------------+---------------+----------------------+
| instance_id | instance_name | instance_description |
+-------------+---------------+----------------------+
| 4 | localhost | |
+-------------+---------------+----------------------+
1 row in set (0.00 sec)
Try changing the following line in the
/usr/local/nagiosxi/html/config.inc.php from this:
Code: Select all
$cfg['default_instance_id'] = 1; // default ndoutils instance to read from
to this:
Code: Select all
$cfg['default_instance_id'] = 4; // default ndoutils instance to read from
Save, exit.
Did this resolve your issue?
Be sure to check out our
Knowledgebase for helpful articles and solutions!
sigmainformatique
Posts: 74 Joined: Mon Apr 23, 2018 8:11 am
Post
by sigmainformatique » Mon Nov 05, 2018 6:14 am
Hello,
Changing default_instance_id from 1 to 4 did not solve the issue, althoug I think it s a part of the solution.
Tried to restart httpd, Nagios then ndo2db, but nothing more.
Is there another config file that contain this ID?
sigmainformatique
Posts: 74 Joined: Mon Apr 23, 2018 8:11 am
Post
by sigmainformatique » Mon Nov 05, 2018 7:16 am
Hello,
My issue was solved by changing instance_id from 4 to 1 in DB :
Code: Select all
MariaDB [nagios]> select * from nagios_instances;
+-------------+---------------+----------------------+
| instance_id | instance_name | instance_description |
+-------------+---------------+----------------------+
| 4 | localhost | |
+-------------+---------------+----------------------+
1 row in set (0.00 sec)
Code: Select all
MariaDB [nagios]> [b]update nagios_instances set instance_id=1;[/b]
Query OK, 1 row affected (0.00 sec)
Rows matched: 1 Changed: 1 Warnings: 0
Code: Select all
MariaDB [nagios]> select * from nagios_instances;
+-------------+---------------+----------------------+
| instance_id | instance_name | instance_description |
+-------------+---------------+----------------------+
| 1 | localhost | |
+-------------+---------------+----------------------+
Worked immediately.
Regards
Guillaume
lmiltchev
Bugs find me
Posts: 13589 Joined: Mon May 23, 2011 12:15 pm
Post
by lmiltchev » Mon Nov 05, 2018 10:15 am
Great! I am glad I could help!
I am closing this thread.
Be sure to check out our
Knowledgebase for helpful articles and solutions!