How to synchronize Mysql Database on 2 Nagios Master(Host)

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
Johnsmit
Posts: 95
Joined: Thu Apr 19, 2018 2:03 pm

How to synchronize Mysql Database on 2 Nagios Master(Host)

Post by Johnsmit »

hello,

i have Nagios installed, up and running. I would like to design High availability of nagios with the databases, files/folders synchronized. Currently, my site1 nagios XI is up and running, i would like to install nagiosXi on site 2 and synchronize database of site 1 to site 2, as i can have all of my monitoring stuff onto site 2. Is there any document or process to do so ?

Thanks in advance.
User avatar
mcapra
Posts: 3739
Joined: Thu May 05, 2016 3:54 pm

Re: How to synchronize Mysql Database on 2 Nagios Master(Hos

Post by mcapra »

Here's the official documentation regarding high-availability within Nagios XI:
https://assets.nagios.com/downloads/nag ... ios-XI.pdf

I believe it is intentionally vague. High-availability with MyISAM is best done with an intermediary of some sort (like Heartbeat).
Former Nagios employee
https://www.mcapra.com/
User avatar
cdienger
Support Tech
Posts: 5045
Joined: Tue Feb 07, 2017 11:26 am

Re: How to synchronize Mysql Database on 2 Nagios Master(Hos

Post by cdienger »

Additioanlly https://assets.nagios.com/downloads/nag ... ios-XI.pdf and https://www.linbit.com/en/576-ha-nagios ... -on-rhel7/ may help. The former is for manually migrating data to a new server while the later provides detailed steps for setting up HA *Note that this is a third party solution.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Johnsmit
Posts: 95
Joined: Thu Apr 19, 2018 2:03 pm

Re: How to synchronize Mysql Database on 2 Nagios Master(Hos

Post by Johnsmit »

Hello,

Can i get the full schema layout of Databases NagiosXi using? Helps a lot for database replication.

Thanks,
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: How to synchronize Mysql Database on 2 Nagios Master(Hos

Post by scottwilkerson »

We do not provide this as it can change version to version. You can get a list of tables form the 3 databases
nagios
nagiosql
nagiosxi

but that is all that can be provided.

Code: Select all

 echo "show tables;"|mysql -pnagiosxi nagios
 echo "show tables;"|mysql -pnagiosxi nagiosql
 echo "show tables;"|mysql -pnagiosxi nagiosxi
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
gormank
Posts: 1114
Joined: Tue Dec 02, 2014 12:00 pm

Re: How to synchronize Mysql Database on 2 Nagios Master(Hos

Post by gormank »

You can dump the DB and import it on another host to duplicate. On the latest system I did this didn't like something so I had to remove the user table before importing. Once the DB is imported, you can remove the config files, then run the reconfigure script. It's a bit crude, but it works.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: How to synchronize Mysql Database on 2 Nagios Master(Hos

Post by scottwilkerson »

Yes this does work but is not realtime replication
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
Locked