Databse Problems with Nagios XI After Swapping IPs
Posted: Fri Aug 29, 2014 5:24 pm
CentOS release 6.5 / 64 Bit / Manual Install / Remote DB for MySQL
Hello! I'm in the process of standing up a new Nagios server on our network. Its a VM that is replacing a physical server.
The process I've used is: create a VM with the same RAM/CPUs as the physical, install a clean CentOS, install the latest Nagios XI (2014R1.3), and import the configs from the physical server's Nagios into the VM's Nagios. Both servers are configured to use a remote MySQL server, each with their own database of course. (I can attach the profile information for each server if needed.)
This process worked well as the new install came up fine and was able to start monitoring with the same hosts, groups, configs, services, etc as the original install.
Because many of our checks use SNMP that is tied to the IP of the original install, the plan was to swap IPs with the servers once the new server was up and running. This one IP change would prevent us from having to change potentially hundreds of SNMP checks and/or servers to work with an unknown IP.
So I did just that; swapped IPs and DNS and brought the servers back online.
At that point, both servers appeared to be running Nagios Core OK but Nagios XI would not load due to what looked like a database error.
The screen's read "Message: A databse connection error has been detected, we are attempting to repair the server, if the repair does not resolve the issue, 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" (see attached for graphic of UI).
Running the script didn't fix the problem, though.
I also confirmed that the DB settings were valid by connecting to the target DB server using the credentials for both the old and new Nagios servers.
On the DB server, I also started mysql and ran "flush hosts" to see if that might resolve the issue. That step also didn't resolve the problem.
At that point I reverted my IP and DNS changes which returned both servers to an operational state.
So my question is, is there anything else I need to consider where the DB is concerned before swapping IP addresses?
Cheers,
Michael
Hello! I'm in the process of standing up a new Nagios server on our network. Its a VM that is replacing a physical server.
The process I've used is: create a VM with the same RAM/CPUs as the physical, install a clean CentOS, install the latest Nagios XI (2014R1.3), and import the configs from the physical server's Nagios into the VM's Nagios. Both servers are configured to use a remote MySQL server, each with their own database of course. (I can attach the profile information for each server if needed.)
This process worked well as the new install came up fine and was able to start monitoring with the same hosts, groups, configs, services, etc as the original install.
Because many of our checks use SNMP that is tied to the IP of the original install, the plan was to swap IPs with the servers once the new server was up and running. This one IP change would prevent us from having to change potentially hundreds of SNMP checks and/or servers to work with an unknown IP.
So I did just that; swapped IPs and DNS and brought the servers back online.
At that point, both servers appeared to be running Nagios Core OK but Nagios XI would not load due to what looked like a database error.
The screen's read "Message: A databse connection error has been detected, we are attempting to repair the server, if the repair does not resolve the issue, 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" (see attached for graphic of UI).
Running the script didn't fix the problem, though.
I also confirmed that the DB settings were valid by connecting to the target DB server using the credentials for both the old and new Nagios servers.
On the DB server, I also started mysql and ran "flush hosts" to see if that might resolve the issue. That step also didn't resolve the problem.
At that point I reverted my IP and DNS changes which returned both servers to an operational state.
So my question is, is there anything else I need to consider where the DB is concerned before swapping IP addresses?
Cheers,
Michael