Page 1 of 2

Daabase connection

Posted: Tue Apr 12, 2011 5:17 pm
by Arfobank
We are in the process of installin XI on our new VMs

We are going to have a single server doing all the checks (PROD) with a disaster recovery (DR) server sitting in the background in waiting...
We will be moving the database off to or MySQL cluster.

Can you tell me how to configure the PROD and DR servers to utilize one database so when/if the PROD server goes down the DR server can pick up where the PROD left off?

Thanks

Re: Daabase connection

Posted: Wed Apr 13, 2011 10:52 am
by tonyyarusso
Unfortunately this isn't something we have tested or documented yet, so I can't say for sure that it will work. However, I can tell you a few things to get started at least:
There are three databases, on two database engines, as follows:
  • nagiosxi (PostgreSQL - XI specific settings)
  • nagiosql (MySQL - Host, Service, etc. configuration)
  • nagios (MySQL - NDOUtils results)
For each of these, you would need to set the 'host' in the config file, found at /usr/local/nagiosxi/html/config.inc.php .

Re: Daabase connection

Posted: Thu Apr 14, 2011 9:46 am
by Arfobank
How do you recommend a disaster recovery/backup system be configured?

Re: Daabase connection

Posted: Thu Apr 14, 2011 11:43 am
by tonyyarusso
The main thing we're recommending currently is either a full backup/restore procedure as outlined in http://library.nagios.com/library/produ ... -nagios-xi or using virtual machines where you can easily bring up a copy on-demand.

Re: Daabase connection

Posted: Thu Apr 14, 2011 3:12 pm
by Arfobank
So, how does a company deal with fail over if the main monitoring server goes down? What tells you it is down? and how do you keep monitoring your disaster recovery servers

Re: Daabase connection

Posted: Thu Apr 14, 2011 3:30 pm
by rdedon
The secondary Nagios XI server could be configured to notify you that the primary has gone down in addition to continuing to monitor.

Re: Daabase connection

Posted: Thu Apr 14, 2011 3:54 pm
by Arfobank
but having a secondary server that is checking everything but not alerting doubles the network traffic.


The way i envision it would be that you would have two servers Primary and Disaster they are exact mirrors except for network and host names.
The databases sit in a DB cluster on a different server that use real-time mysql transaction log replication to a Disaster DB cluster

The Primary does all the checking and alerting and writing to the DBs

The Disaster server only checks the Primary server (like you suggested) until the Primary goes down... (but how in this scenario if it is configured to write to a DB)...

Then when the Disaster server finds that the Primary server is down, it runs a check command and starts actively checking and alerting....

This is totally do-able with Core and no databases... how do we do this with XI and databases?
Thoughts?

Re: Daabase connection

Posted: Fri Apr 15, 2011 2:48 pm
by rdedon
This should definitely be doable in XI since it can be done in Core. That being said, I will get some rough documentation up next week on how to accomplish this after consulting with our other team members on the most efficient way to accomplish this task. It may take a bit since I will also verifying the information by setting up and testing with multiple servers making sure that it is correct.

Re: Daabase connection

Posted: Tue Apr 19, 2011 4:25 pm
by rdedon
Just a heads up that this is still being addressed. :-)

Re: Daabase connection

Posted: Tue Apr 19, 2011 4:28 pm
by Arfobank
Awesome! Thanks!