Not able to apply configuration after Mysql Offload

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
ellism
Posts: 8
Joined: Thu Jan 28, 2016 2:54 pm

Not able to apply configuration after Mysql Offload

Post by ellism »

A little history:
I have installed the latest Nagioxi on RedHat 6.7 as and evaluation prior to doing this with the production system. I have also created a separate VM with RedHat 6.7 and MySQl 5.7.10. I then followed the NagiosXi offload MySQL to remote server and things seemed to work OK. I could login, did a check configuration no issues. Now when I try to add just one host via the configuration wizard, it finds the host correctly but when I try to apply the configuration it fails every time. I have checked all the files you have to change for the offload multiple times, and I see not issues.

Tells me I have no service defined. If I go to the "Services" selection, all the hosts I had defined and loaded in to Nagiosxi are there and it says " Changes detected! Apply Configuration for new changes to take affect" When I select the "Apply Configuration" button it fails.

Any ideas or help. I have looked on the forum and loads of folks seem to have issues with offloading the Mysql database. Any help would be appreciated.
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: Not able to apply configuration after Mysql Offload

Post by rkennedy »

Does the Nagios server have proper access to the remote SQL DB (possible IP restriction)?
Former Nagios Employee
ellism
Posts: 8
Joined: Thu Jan 28, 2016 2:54 pm

Re: Not able to apply configuration after Mysql Offload

Post by ellism »

Yes. I made sure iptables is off on both servers. Also when I do a "ss dport == 3306" I can see all the connections to the remote mySQL database.
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Not able to apply configuration after Mysql Offload

Post by lmiltchev »

Can you verify that the date/time is synced between these two servers? Run the following commands from the CLI on the Nagios XI server and show the output in code wraps:

Code: Select all

cd /usr/local/nagiosxi/scripts
./reconfigure_nagios.sh
grep server /var/www/html/nagiosql/config/settings.php
echo 'select now();'|mysql -t -u <username> -p<password> -h <remote ip>
echo 'show tables;'|mysql -t -u <username> -p<password> -h <remote ip>
echo 'select count(*) from nagios_hosts;'|mysql -t -u <username> -p<password> nagios -h <remote ip>
echo 'select count(*) from nagios_services;'|mysql -t -u <username> -p<password> nagios -h <remote ip>
Be sure to check out our Knowledgebase for helpful articles and solutions!
ellism
Posts: 8
Joined: Thu Jan 28, 2016 2:54 pm

Re: Not able to apply configuration after Mysql Offload

Post by ellism »

Will do, I am off-site today and maybe tomorrow so will try as soon as I can. Thanks for the idea.
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: Not able to apply configuration after Mysql Offload

Post by rkennedy »

Sounds good, let us know when you get a chance to review.
Former Nagios Employee
ellism
Posts: 8
Joined: Thu Jan 28, 2016 2:54 pm

Re: Not able to apply configuration after Mysql Offload

Post by ellism »

Here is the output:

The clocks were not the same, one was UTC the other EST so they are now both EST for time and date.

grep server /var/www/html/nagiosql/config/settings.php
server = 192.168.7.80
+---------------------+
| now() |
+---------------------+
| 2016-02-09 06:45:01 |
+---------------------+
mysql> show tables;
+----------------------------------------+
| Tables_in_nagios |
+----------------------------------------+
| nagios_acknowledgements |
| nagios_commands |
| nagios_commenthistory |
| nagios_comments |
| nagios_configfiles |
| nagios_configfilevariables |
| nagios_conninfo |
| nagios_contact_addresses |
| nagios_contact_notificationcommands |
| nagios_contactgroup_members |
| nagios_contactgroups |
| nagios_contactnotificationmethods |
| nagios_contactnotifications |
| nagios_contacts |
| nagios_contactstatus |
| nagios_customvariables |
| nagios_customvariablestatus |
| nagios_dbversion |
| nagios_downtimehistory |
| nagios_eventhandlers |
| nagios_externalcommands |
| nagios_flappinghistory |
| nagios_host_contactgroups |
| nagios_host_contacts |
| nagios_host_parenthosts |
| nagios_hostchecks |
| nagios_hostdependencies |
| nagios_hostescalation_contactgroups |
| nagios_hostescalation_contacts |
| nagios_hostescalations |
| nagios_hostgroup_members |
| nagios_hostgroups |
| nagios_hosts |
| nagios_hoststatus |
| nagios_instances |
| nagios_logentries |
| nagios_notifications |
| nagios_objects |
| nagios_processevents |
| nagios_programstatus |
| nagios_runtimevariables |
| nagios_scheduleddowntime |
| nagios_service_contactgroups |
| nagios_service_contacts |
| nagios_service_parentservices |
| nagios_servicechecks |
| nagios_servicedependencies |
| nagios_serviceescalation_contactgroups |
| nagios_serviceescalation_contacts |
| nagios_serviceescalations |
| nagios_servicegroup_members |
| nagios_servicegroups |
| nagios_services |
| nagios_servicestatus |
| nagios_statehistory |
| nagios_systemcommands |
| nagios_timedeventqueue |
| nagios_timedevents |
| nagios_timeperiod_timeranges |
| nagios_timeperiods |
+----------------------------------------+
60 rows in set (0.00 sec)

mysql> select count(*) from nagios_hosts;
+----------+
| count(*) |
+----------+
| 78 |
+----------+
1 row in set (0.00 sec)

mysql> select count(*) from nagios_services;
+----------+
| count(*) |
+----------+
| 264 |
+----------+
1 row in set (0.00 sec)
User avatar
hsmith
Agent Smith
Posts: 3539
Joined: Thu Jul 30, 2015 11:09 am
Location: 127.0.0.1
Contact:

Re: Not able to apply configuration after Mysql Offload

Post by hsmith »

I'm going to assume fixing the time did not fix this issue then?

Did you double check to make sure that the database information is correct inside of the core configuration manager? ( Configure > Config Manager Admin > Config Manager Settings )

How much latency is there between these locations?

Can you got to Admin > System Information > Monitoring Engine Status and make sure everything looks healthy? (You can post a screenshot if you're unsure)

Anything useful in this file?

Code: Select all

tail /var/log/cron
Former Nagios Employee.
me.
ellism
Posts: 8
Joined: Thu Jan 28, 2016 2:54 pm

Re: Not able to apply configuration after Mysql Offload

Post by ellism »

The time change did not fix the issue.

Settings in core configuration manager are correct.

These VM's are on the same subnet and the same EXI server so no real latency.
When I go to Admin > System Information > Monitoring Engine Status this on the GUI is showing "Red". I select the action to start it the GUI says command submitted successfully but this never changes to "Green". I will upload two screen shots.

The tail on the /var/log/cron does not really show any useful information.
You do not have the required permissions to view the files attached to this post.
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: Not able to apply configuration after Mysql Offload

Post by rkennedy »

This could be a few different things -
- From the XI machine, can you run an nmap against the SQL machine and post the result?
- Verify the information in /usr/local/nagios/etc/ndo2db.cfg, are these the right connection settings?
Former Nagios Employee
Locked