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
Nagios Redundancy
-
slansing
- Posts: 7698
- Joined: Mon Apr 23, 2012 4:28 pm
- Location: Travelling through time and space...
Re: Nagios Redundancy
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.
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
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
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
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.
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
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
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
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
Yes these should work fine with XI, core is the underlying engine of Nagios xi and the same command still apply.
Re: Nagios Redundancy
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
You will need to have your script pass one of the commands to the nagios command pipe file on the XI server in question:
See these documents for the specifics:
http://nagios.sourceforge.net/docs/3_0/extcommands.html
http://nagios.sourceforge.net/docs/3_0/ ... mmand_file
Code: Select all
DISABLE_HOSTGROUP_HOST_NOTIFICATIONS
ENABLE_HOSTGROUP_HOST_NOTIFICATIONS 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.
"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.