Page 1 of 1

Nagios XI Failover/DR/HA Scenarios

Posted: Tue Jul 07, 2015 1:49 pm
by emartine
I understand that there are HA options:

https://assets.nagios.com/downloads/nag ... ios-XI.pdf

But neither of these work as HA scenarios since we monitor VMware and the distance/security for our DR server is too great to do any shared storage.

I understood that there was something in the works for an HA/DR solution. Was there any movement?


At this time I have our primary Nagios XI server sending a daily backup of its configuration to an off site Nagios XI server (DR server) that is monitoring the primary server. Once the offsite DR server notices that the primary is down, notifications become enabled and it sends us an alert telling us that the primary is down/reconfigurs the gearman workers to point to the new server. I have not restored the primary server configuration on the DR because of the fact that the configuration has the name of the primary server. So I have a manual failover scenario at this time.

Any ideas or solutions that are in the works would be greatly appreciated. I'm looking for direction on this.

Re: Nagios XI Failover/DR/HA Scenarios

Posted: Tue Jul 07, 2015 1:53 pm
by jolson
Once the offsite DR server notices that the primary is down, notifications become enabled and it sends us an alert telling us that the primary is down/reconfigurs the gearman workers to point to the new server.
Would it be possible to include restoring the backup as part of this script? That would complete the automation of what you're trying to accomplish - the secondary notices that the primary is down, enables notifications, and restores the primary backup.

Re: Nagios XI Failover/DR/HA Scenarios

Posted: Tue Jul 07, 2015 2:18 pm
by emartine
Yes. But as I mentioned, restoring the backup has the name of the primary server. The secondary server has a different name which will require manually reconfiguring the hostname in the "General Program Settings" for the URL. The secondary server has its own SSL Certificate.

Re: Nagios XI Failover/DR/HA Scenarios

Posted: Tue Jul 07, 2015 3:06 pm
by abrist
emartine wrote:The secondary server has a different name which will require manually reconfiguring the hostname in the "General Program Settings" for the URL.
This change can actually be scripted by updating the proper postgres table/row:
List the current settings:

Code: Select all

echo "select * from xi_options where name = 'url';" | psql nagiosxi nagiosxi
echo "select * from xi_options where name = 'external_url';" | psql nagiosxi nagiosxi
Set a different url:

Code: Select all

echo "update xi_options set value = 'http://<ip or hostname>/nagiosxi/' where name = 'url';" | psql nagiosxi nagiosxi
echo "update xi_options set value = 'http://<ip or hostname>/nagiosxi/' where name = 'external_url';" | psql nagiosxi nagiosxi
emartine wrote:The secondary server has its own SSL Certificate.
You should be able to script this as well with a simple scp or cp.