Service failover dependency

Mike Lindsey mike-nagios at 5dninja.net
Thu Apr 7 23:52:28 CEST 2011


On 4/7/11 2:45 AM, Andrey Mitroshin wrote:
> I'm afraid I did not explained my problem clearly.
>
> So, I've got 2 servers.
> serverA - primary (10.0.0.1)
> serverB - backup (10.1.0.1)
>
> There is some apache vhost named www.site.com configured on both of them.
> My failover is supposed to work as follows.
>
> Usually serverA is up and www.site.com resolves to 10.0.0.1.
> when serverA.com goes down, nagios executes evenhandler, updates A
> record  and www.site.com points to 10.1.0.1 (serverB).
>
> The problem arises when both servers are down. So, evenhandler updates
> A record of www.sites.com, but serverB is down as well
>
> My goal is to avoid executing eventhandler when serverB is down.
> And the question is how to configure such a behaviour in nagios.
What you need here, is a smarter event handler.  In the event handler 
script, have it test serverB.  If serverB is up, update the A record; 
otherwise just exit (and maybe update a logfile somewhere).

-- 
Mike Lindsey


------------------------------------------------------------------------------
Xperia(TM) PLAY
It's a major breakthrough. An authentic gaming
smartphone on the nation's most reliable network.
And it wants your games.
http://p.sf.net/sfu/verizon-sfdev
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null





More information about the Users mailing list