External Commands Logic.
Posted: Tue Apr 30, 2013 1:22 pm
I have two External Commands that can enable and disable hostgroups/services notifications.
I made a misc command in nagios that can use these external commands.
There are two nagios servers in two different facilities.
They both monitor each other, but only alert on their own facilities and each others router.
Here is a map.
My goal with these external commands is to enable or disable notifications depending on the state of the routers and nagios servers.
From the view point of the nagios server in Facility 1
From the view point of the nagios server in Facility 2
My logic to set all of this up is, from Nagios1 side, to set up a service on the Router2 to ping Nagios2.
If the service is up, then disable alerts.
If the serivce is down/unknown, then enable alerts.
Then set up the same thing on Nagios2.
So from Nagios1 perspective what would happen when Router2 goes down, as well as Nagios2, would it's Event Handler overrule the services Event Handler?
What version of Nagios XI are you using? Nagios XI 2012R1.8
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
I made a misc command in nagios that can use these external commands.
Code: Select all
/usr/local/nagios/libexec/eventhandlers/handle-master-host-event $HOSTSTATE$ $HOSTSTATETYPE$They both monitor each other, but only alert on their own facilities and each others router.
Here is a map.
Code: Select all
Naigos1----Router1-----Router2----Nagios2From the view point of the nagios server in Facility 1
Code: Select all
If
Naigos1: Up ---- Router1: Up ----- Router2: Up---- Nagios2: Down
then
Nagios will enable notifications on Facility 2Code: Select all
If
Naigos1: Up ---- Router1: Up ----- Router2: Down---- Nagios2: Down
then
Nagios will disable notifications on Facility 2Code: Select all
If
Naigos2: Up ---- Router2: Up ----- Router1: Up---- Nagios1: Down
then
Nagios will enable notifications on Facility 1Code: Select all
If
Naigos2: Up ---- Router2: Up ----- Router1: Down---- Nagios1: Down
then
Nagios will disable notifications on Facility 1If the service is up, then disable alerts.
If the serivce is down/unknown, then enable alerts.
Then set up the same thing on Nagios2.
So from Nagios1 perspective what would happen when Router2 goes down, as well as Nagios2, would it's Event Handler overrule the services Event Handler?
What version of Nagios XI are you using? Nagios XI 2012R1.8
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