Forum Discussion

Jeff_McLeod's avatar
Jeff_McLeod
Icon for Nimbostratus rankNimbostratus
Sep 13, 2019

Monitor remote DNS listener, enable local DNS listener VS when remote listener is unavailable

I have 2 public DNS servers for failover. I'm able to get both listeners to work. And if i disable the listeners on the Primary DNS server, the second picks up the requests, as designed. I need the secondary server to leave the VS DNS listeners disabled while the Primary listeners are up and servicing requests.

 

How can I configure a monitor to check the remote primary server for listeners with an up status, and disable the secondary server listeners with this scenario. And how do I enable the secondary server listeners, when the primary server listeners go offline? And of course, I need to offline the secondary listeners when the primary becomes available once again.

 

Any help would be great. I've tried the reverse setting for a monitor, which disabled the secondary listeners when the primary listeners are available, but I can't get the secondary listeners to enable when I drop the listeners on the primary.

 

Thanks,

 

Mac

1 Reply

  • Unfortunately the reverse setting on monitors only really work when you get a response. For example, using a reverse http monitor that checks for the string "error" will mean the pool member is green/up as long as you get any string NOT containing "error" in it, but if you either get a string with "error" or indeed no response at all the pool member is considered down.

     

    I think your best bet is to assign an external monitor on your secondary VS, using netcat (or something more sophisticated) to check for a response from the primary VS and then setting the pool state based on the opposite of the normal based on the exit-code received, e.g. DOWN if 0 and UP if 1.

     

    If you've never worked with external monitors before you can actually get what you want by slightly tweaking the included example monitor in /usr/bin/monitors/sample_monitor