Page 1 of 2
Nagios Redundancy
Posted: Mon Feb 25, 2013 3:31 pm
by samuel
What is the simplest way to set up a nagios redundancy between two nagios servers? The plan is to have nagios monitor a two different locations. There will be one nagios servers in each location. Both servers will be monitoring both locations, but only alerting on hosts in the same location. Is there a way to set it up so that if one nagios server goes down then the other picks up the slack and alerts on all the hosts.
What version of Nagios XI are you using? Nagios XI 2012R1.6
Linux Distribution and version? centos 6.3
32 or 64bit? 32bit
VMware Image or Manual Install of XI? VMware Image
Are there specials configurations on your system, ie; is Gnome installed? Are you using a proxy? Are you using SSL? none
Re: Nagios Redundancy
Posted: Mon Feb 25, 2013 5:15 pm
by slansing
Hey Samuel,
Have you taken a look at this piece of documentation yet?:
http://assets.nagios.com/downloads/nagi ... ptions.pdf
If you have questions let me know, it should cover failover networking with XI.
Re: Nagios Redundancy
Posted: Tue Feb 26, 2013 2:06 pm
by samuel
I read that documentation and I don't think its the way to go. I think it would be simpler to use event handlers instead. A have a few questions to pass by you about them. Is there a way to make it so that an event handler can target a hostgroup? Is there an event handler that can disable notifications for that hostgroup, not the entire nagios server? And when that happens will the notifications of the services associated with those hosts also be disabled?
Re: Nagios Redundancy
Posted: Tue Feb 26, 2013 4:38 pm
by slansing
Can you walk us through the chain of events you are looking to set up with event handlers and how it fits into your redundancy plans?
Re: Nagios Redundancy
Posted: Wed Feb 27, 2013 1:23 pm
by samuel
Okay lets establish some things.
nagios 1 is at location 1.
nagios 2 is at location 2.
Both nagios servers will be monitoring everything.
nagios 1 will only alert on location 1.
nagios 2 will only alert on location 2.
I want to set it up so that if nagios 2 goes down, nagios 1 will be able to alert on location 2.
I also want to set up nagios 2 the same way. If nagios 1 goes down, nagios 2 will be able to alert on location 1.
I know that there is a way to write an event handler that enables or disables global notifications.
But I need to find one that enables or disables host or hostgroup notifications, preferably hostgroup.
I am unsure whether the services assigned to the hosts will also be enabled or disabled.
Re: Nagios Redundancy
Posted: Wed Feb 27, 2013 5:53 pm
by scottwilkerson
you can do this with external commands
http://old.nagios.org/developerinfo/ext ... ndlist.php
I believe
DISABLE_HOSTGROUP_HOST_NOTIFICATIONS
ENABLE_HOSTGROUP_HOST_NOTIFICATIONS
is what you are looking for
Re: Nagios Redundancy
Posted: Fri Mar 01, 2013 10:58 am
by samuel
Will these work with nagios xi?
Re: Nagios Redundancy
Posted: Fri Mar 01, 2013 12:01 pm
by slansing
Yes these should work fine with XI, core is the underlying engine of Nagios xi and the same command still apply.
Re: Nagios Redundancy
Posted: Fri Mar 01, 2013 12:26 pm
by samuel
I figured out what code I want to implement, but where do I put the file and what format should it be in?
Re: Nagios Redundancy
Posted: Fri Mar 01, 2013 4:44 pm
by abrist
You will need to have your script pass one of the commands to the nagios command pipe file on the XI server in question:
Code: Select all
DISABLE_HOSTGROUP_HOST_NOTIFICATIONS
ENABLE_HOSTGROUP_HOST_NOTIFICATIONS
See these documents for the specifics:
http://nagios.sourceforge.net/docs/3_0/extcommands.html
http://nagios.sourceforge.net/docs/3_0/ ... mmand_file