Nagios Redundancy

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
samuel
Posts: 55
Joined: Wed Jan 16, 2013 4:44 pm

Nagios Redundancy

Post 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
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: Nagios Redundancy

Post 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.
samuel
Posts: 55
Joined: Wed Jan 16, 2013 4:44 pm

Re: Nagios Redundancy

Post 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?
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: Nagios Redundancy

Post 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?
samuel
Posts: 55
Joined: Wed Jan 16, 2013 4:44 pm

Re: Nagios Redundancy

Post 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.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Nagios Redundancy

Post 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
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
samuel
Posts: 55
Joined: Wed Jan 16, 2013 4:44 pm

Re: Nagios Redundancy

Post by samuel »

Will these work with nagios xi?
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: Nagios Redundancy

Post by slansing »

Yes these should work fine with XI, core is the underlying engine of Nagios xi and the same command still apply.
samuel
Posts: 55
Joined: Wed Jan 16, 2013 4:44 pm

Re: Nagios Redundancy

Post 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?
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: Nagios Redundancy

Post 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
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