Page 1 of 2
NagiosXI HA using NRDP
Posted: Tue Feb 02, 2016 12:36 pm
by alokispandey
Hi,
Not sure if its possible.
I am trying to configure two node Nagiox XI active/passive server using NRDP. Plan is to enroll all clients on XI-master-node1 and cofigure NRDP outbond to transfer data to Xi-slave-node2 so that when master is down, i can use salve to monitor whole INFRA.
Just enabling NDRP-outbond in MAster and NDRP-inbound in Slave will be enough or its require more effort on db level ( like replication) to achieve my goal?
Please suggest..!
Also, i am assuming NDRP will sync all hosts configure on MASTER to slave of it own? Correct me if i am wrong.
Re: NagiosXI HA using NRDP
Posted: Tue Feb 02, 2016 5:39 pm
by rkennedy
so that when master is down, i can use salve to monitor whole INFRA.
With your logic, when the master is down, how will the slave get data? Are you planning to use a load balancer in front of the XI machines to push NRDP data accordingly?
Re: NagiosXI HA using NRDP
Posted: Wed Feb 03, 2016 1:23 am
by alokispandey
That is exactly where i am confused. That scenario says either i have to setup client such a way so that they can send passive data to both hosts. Or i have to write a script which will activate the "active check" on slave when master is down.
Any suggestion is welcome..but setting up clustering is not an feasible option here. Though i am free to use custom scripts.
Re: NagiosXI HA using NRDP
Posted: Wed Feb 03, 2016 10:46 am
by rkennedy
For reference, are you following instructions for this, or is this a scenario you are creating?
I believe this could be done a few different ways though, here's one way I thought of -
NRDP passive checks send to master (normally), on the slave you create a bash script to run on cron that checks if the master is alive. If so, it does nothing. If no reply from the host is made, then have your script start the Nagios service. This will start the monitoring engine, where your configured active checks will go out on the slave now. You'll need to figure out how you'd like to stop the process once master comes back up.
Is that what you're looking for?
Re: NagiosXI HA using NRDP
Posted: Thu Feb 04, 2016 1:24 am
by alokispandey
Yeah kind off..!
Till now i have manged to replicate host/services details by replicating nagiosql db. Now i am trying to control fail over.
Plan is to ..:
keep active checks, notification OFF and nagiosql Db in RO mode on salve till master is up and running
Monitor master ( as you suggested by cron ) and when its reported down:
start Active checks, notification on slave, nagiosql db will still remain in RO as we are not allowing and addition/removal of hosts on slave node.
--Monitor Master and as soon it come up..again disable active checks and notifications on salve.
Seeking help with:-
: How to sync historic alerts/notification/data back to master till the duration slave will preform active checks ?
: Every time a new hosts is added, i need to preform "Apply configuration" on slave. Is there any way execute nagisoql commands from bash/command line?
Re: NagiosXI HA using NRDP
Posted: Thu Feb 04, 2016 12:10 pm
by hsmith
Can you perhaps take a look at this video and see if this helps you out at all?
https://www.youtube.com/watch?v=KW5Qkl8brcA
Re: NagiosXI HA using NRDP
Posted: Thu Feb 11, 2016 1:42 am
by alokispandey
Thank you for the video, but I've already gone through it. Still looking out for help.
Re: NagiosXI HA using NRDP
Posted: Thu Feb 11, 2016 5:45 pm
by tmcdonald
There's a company named Linbit that does a lot of HA work, and recently we started officially recommending them for such setups. I've forwarded this thread onto my contact there and he should be able to help out more with this. Look for a response from him within the next day, and if you do not hear back feel free to post again and I'll see about giving some more information.
Strictly speaking though, HA setups are outside of what we typically support.
Re: NagiosXI HA using NRDP
Posted: Thu Feb 11, 2016 8:07 pm
by jrust
Thanks Trevor, My name is Jeremy and while I am not very familiar with NRDP, I do know a bit about clustering and think I can help clear some things up.
I have manged to replicate host/services details by replicating nagiosql db. Now i am trying to control fail over.
and
Any suggestion is welcome..but setting up clustering is not an feasible option here. Though i am free to use custom scripts.
Replicating a database from a primary machine to a secondary machine and allowing for switchover between them is what the community calls a cluster. From what was described, i think you desire to have a High Availability cluster where the machines are up to date and can switch services between them and have these services be up to date with the same date; this will require replication of the data in some method.
"Control fail over" can be done in many many, different ways: Setting up Nagios checks like how rkennedy described or Andy covered in his video with scripts and cron jobs were already discussed earlier in the thread.
Other tools such as load balancers, and the CRM Pacemaker, Corosync and Heartbeat are described at
http://clusterlabs.org/ LINBIT helps develop these tools and use them with the software we create, DRBD, for High Availability or live Disaster Recovery. This could certainly be used here.
If the goal is to prevent downtime by having a primary and secondary set up for your NagiosXI install I would recommend checking out:
http://www.linbit.com/en/resources/tech ... centos-6-5 While I am not certain this guide will apply to your particular configuration it may still prove useful should you want to investigate using a proper clustered resource manager.
Or you can contact us at
[email protected] or the Nagios Sales team to learn more about LINBIT's clustering offerings and the LINBIT engineers can find and build an HA solution for you. HA clusters can be tricky, so we include a tailored install via ssh or vpn with some levels of our support.
Re: NagiosXI HA using NRDP
Posted: Fri Feb 12, 2016 2:20 am
by alokispandey
thank you very much for your time and response ..!
I will also share my solution if managed any working..!