Page 1 of 1

Adding redundant Nagios server = issues?

Posted: Wed Jul 27, 2016 2:25 pm
by highness
I was going to try to bring this up at the NWC this year, but will have to ask this here instead:

Currently, I have a Nagios server running version 5.2.5 (which has been upgraded several times starting from version 4.x which means that it uses both MySQL and Postgres). I have offloaded the MySQL database off to a standalone (virtual) MySQL server (master) which replicates to another standalone (virtual) MySQL server (slave).

I want to stand up an additional (redundant) Nagios server that will initially be located on the same campus as the main (legacy) Nagios server, but with the intent of moving the new server to a colocated facility early next year. The redundnant server doesn't necessarily need to run DRDB or have automatic failover. We can manage that part manually, as getting the hosts and services installed on the redundant server is really the most important task at hand.

So, my question is this: How can I import the configuration of the older server into the new server (especially since the new server doesn't have Postgres installed? Is there a clean, easy, non-drama-filled way to do this?

Re: Adding redundant Nagios server = issues?

Posted: Wed Jul 27, 2016 3:50 pm
by ssax
You can't have both XI instances point to the same DB at the same time though, just want to make sure I mention that as it causes issues. Are you planning on having another offloaded DB server or just installing the DB locally?

My recommendation would be to use the backup/restore functionality, it will automatically install postgresql on the new server if it was in the backup (which it will be).

There would need to be modifications to the restore script to make it not use the current DB, once you answer the questions above we should be able to point you in the right direction.

Thank you

Re: Adding redundant Nagios server = issues?

Posted: Wed Jul 27, 2016 4:51 pm
by highness
I assumed that was the case, so my thinking on this was to keep the new server in a cold state (the box is running, but Nagios wouldn't be) and in the event that the primary Nagios server died, I would start Nagios on the new server and it could connect to the database. In the event that the primary MySQL database died, I would have the secondary MySQL database to fall back on.

Is there a way to migrate the Postgres data into MySQL so I wouldn't have to run two database apps? That would make life MUCH easier, as the remote database would have ALL of the configs/users/etc., so I wouldn't have to constantly update the Postgres database on the redundant server.

Re: Adding redundant Nagios server = issues?

Posted: Thu Jul 28, 2016 10:53 am
by mcapra
highness wrote:Is there a way to migrate the Postgres data into MySQL so I wouldn't have to run two database apps?
This has been pretty in-demand, but we haven't documented this process yet or written a script for it.

Re: Adding redundant Nagios server = issues?

Posted: Thu Jul 28, 2016 3:35 pm
by highness
mcapra wrote:This has been pretty in-demand, but we haven't documented this process yet or written a script for it.
That's what I was afraid of...

Is there any documentation on how the Postgres database is laid out and what that database looks like on the MySQL side? If I can get some access to that, I'm willing to work on a script to do that and would be happy to pass that along.

Re: Adding redundant Nagios server = issues?

Posted: Thu Jul 28, 2016 3:58 pm
by ssax
*** Note: Make sure you have good backups/vm snapshots, do it on a test server, we can't guarantee that you won't run into issues.

I think you can do it with the mysql workbench:

http://mysqlworkbench.org/2012/11/how-t ... on-wizard/