Rsync scripting advice

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
User avatar
benhank
Posts: 1264
Joined: Tue Apr 12, 2011 12:29 pm

Rsync scripting advice

Post by benhank »

Hey all,

The Problem:
Every week, I do a backup of my primary server, and restore the backup to the secondary server, which is fired up if primary goes down.

The Good:
We have a server that can take temporarily over if there is an issue with the Primary until the primary is repaired.


The Bad:
when the Secondary gets fired up, it is missing a weeks worth of perfdata, acknowledgments, etc..
(we can live with losing a weeks worth of DB data)

The Ugly:
We have both servers running live with all checks enabled (notifications are disabled on secondary (I am not THAT dumb...))
but for the life of me I can't figure out why I set it up like that... Oh, wait I remember now.

Is there a way, or is it advisable to do the following:
I want to disable all checks on the secondary, since it's data will be overwritten anyway.
Have the perfdata fol...ahem I mean, directory, sync from Primary to Secondary automatically on a set schedule.
I understand that I will have to exclude the perfdata that my backup will contain, but shocking as it is, I think i can handle that...

So does this make sense? Is it doable?
Proudly running:
NagiosXI 5.4.12 2 node Prod Env 2500 hosts, 13,000 services
Nagiosxi 5.5.7(test env) 2500 hosts, 13,000 services
Nagios Logserver 2 node Prod Env 500 objects sending
Nagios Network Analyser
Nagios Fusion
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: Rsync scripting advice

Post by abrist »

You could disable active checks system-wide on the backup server. Then create a netmount for the perfdata, copy the perfdata to the netmount, and then mount the same share to both file systems. When the primary fails, enable checks on the secondary and the perfdata should still be available to be read and updated by the secondary XI server. If you do try this, please do it in a test environment first, and make sure that you do a full XI backup before implementing the share. My only concern with this method is that you may have i/o issues if your network share is not fast enough, but implementation and testing is the only way to know for sure.
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
User avatar
benhank
Posts: 1264
Joined: Tue Apr 12, 2011 12:29 pm

Re: Rsync scripting advice

Post by benhank »

Thanks man I will try it, sorry for the late response man.
Proudly running:
NagiosXI 5.4.12 2 node Prod Env 2500 hosts, 13,000 services
Nagiosxi 5.5.7(test env) 2500 hosts, 13,000 services
Nagios Logserver 2 node Prod Env 500 objects sending
Nagios Network Analyser
Nagios Fusion
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: Rsync scripting advice

Post by slansing »

Let us know what bumps you run into "if you do."
User avatar
benhank
Posts: 1264
Joined: Tue Apr 12, 2011 12:29 pm

Re: Rsync scripting advice

Post by benhank »

Hey, it's me, what could happen?
Proudly running:
NagiosXI 5.4.12 2 node Prod Env 2500 hosts, 13,000 services
Nagiosxi 5.5.7(test env) 2500 hosts, 13,000 services
Nagios Logserver 2 node Prod Env 500 objects sending
Nagios Network Analyser
Nagios Fusion
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: Rsync scripting advice

Post by abrist »

*readies tin foil hat*
*checks non-perishables in bunker*
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
Locked