Hey guys welcome to the nagios party !!! so new situation here and need your suggestions.
I have two nagios servers with same hosts and services, but at different data centers. Nagios1 is the main monitoring server and Nagios2 is the backup one. Right now only Nagios1 is sending all the alerts. I just wanna configure in the nagios that if one anyone datacenter goes down or failover so other nagios start alerting. Any advice will be appreciated
Thanks
2 Nagios server alerting only 1 nagios server.
-
cesar.garza
- Posts: 80
- Joined: Mon Aug 19, 2013 3:14 pm
Re: 2 Nagios server alerting only 1 nagios server.
Party in the datacenter, hazaa!
The most direct method to do this is through the external command pipe: http://nagios.sourceforge.net/docs/3_0/extcommands.html
Essentially, you create an event handler on the backup. Assign this event handler to the ping check or whatever you use to see if the main is up. When it is down, submit a command to enable notifications on the backup. Once the master is back up, disable notifications on the backup with another command. You will have to write an event handler script to check the state and type of the master server and then proceed to run the relevant command below:
http://old.nagios.org/developerinfo/ext ... mmand_id=7
http://old.nagios.org/developerinfo/ext ... mmand_id=8
This can be a bit complex to setup if you are new to the command pipe or event handlers, so don't be shy if you need further help or clarification.
The most direct method to do this is through the external command pipe: http://nagios.sourceforge.net/docs/3_0/extcommands.html
Essentially, you create an event handler on the backup. Assign this event handler to the ping check or whatever you use to see if the main is up. When it is down, submit a command to enable notifications on the backup. Once the master is back up, disable notifications on the backup with another command. You will have to write an event handler script to check the state and type of the master server and then proceed to run the relevant command below:
http://old.nagios.org/developerinfo/ext ... mmand_id=7
http://old.nagios.org/developerinfo/ext ... mmand_id=8
This can be a bit complex to setup if you are new to the command pipe or event handlers, so don't be shy if you need further help or clarification.
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.
Re: 2 Nagios server alerting only 1 nagios server.
There are a few different options that you can use. I would recommend watching the following youtube video from the Nagios World Conference North America 2012:
https://www.youtube.com/watch?v=rFoXtswFVGE
It should give you some ideas.
https://www.youtube.com/watch?v=rFoXtswFVGE
It should give you some ideas.
Be sure to check out our Knowledgebase for helpful articles and solutions!