Learn F5 Technologies, Get Answers & Share Community Solutions Join DevCentral

Filter by:
  • Solution
  • Technology

Custom iRule or Monitor with GTM/LTM Integration

I have a bit of a dilemma with our LTM and integrating with intelligent DNS, e.g. GTM.


Our LTM inspects backend servers using an HTTP monitor. It checks a URI, /in.html, if the node returns with a '200 OK' in the header, the node is marked as up. If we get a timeout, 404, etc, the server is marked as down. This allows server-admins to manage node-state on the F5 by scripting changes to this file in addition to marking HTTP nodes down when they fail.

Tied to this I have an iRule applied to each virtual-server. When all nodes in a pool fail, the F5 will present an under-maintenance page hosted on the LTM. So when either planned or unplanned incidents occur on backend servers, customers are presented with a maintenance page instead of a timeout.


This works great if you only have a single site, but we are looking to run multiple sites with a GTM monitoring each public IP. I would like to implement the same behavior with the GTM as our LTM.

  1. GTM probes public LTM vip for /dns.html URI.
  2. 200 OK = Site up
  3. Timeout/404/etc. = Site down

Seems simple, but not in tandem with my maintenance configuration. We need three states.

  1. Site up, i.e. 200 OK on both /dns.html & /in.html.
  2. Planned maintenance, i.e. GTM 200 OK on /dns.html. LTM timeout on /in.html.
  3. Unplanned maintenance. This is the issue...

How can I configure my maintenance iRule so that the /dns.html times-out when GTM probes it while still providing the "Planned Maintenance" state? Currently if the servers crashed and GTM probed the VIP, it would get a 200 OK on that URI because the LTM is presenting it the maintenance page.

I know you can implement two monitors per-pool and only pass if all monitors are up, but I need logic so that it has three states, not two. Is this possible with a custom iRule monitor?

Can I check the status of monitors in an iRule? I.e. 'if monitor a = up do x, if monitor b = up do y, if monitor a & b = down do z'?

Rate this Question

Answers to this Question



Do you have your BIGIP systems configured in GTM as the Bigip redundant/standalone type? If so, a monitor is not required on the GTM side of things, as the LTM and GTM will transfer information about the state of a VIP. Your health monitors on the LTM will directly influence GTM's decision making. The iRule doesn't apply in this case. If all sites for a wideIP are down, then GTM's default behavior is to return all IP addresses, which would then hit your iRule. Users may see the maintenance page if the site they are connected to goes down, until the DNS TTL expires and they receive a different response.

If you have many LTM systems, you can control which system actually performs the checks by configuring a prober pool for the BIGIP server object. More information about prober pools could be obtained here: https://support.f5.com/kb/en-us/products/big-ip_gtm/manuals/product/gtm-implementations-11-6-0/15.html#unique_990600193

The only case we use GTM's monitoring capability for is for services that are not traversing a LTM VIP, for example, network/VPN appliances.


Comments on this Answer
Comment made 11-May-2016 by R. Clark 70
Hi Josh, The DNS devices are off-prem, so they are unaware as to the state of the individual pools/virtual-servers without monitoring them. The default-behavior works for planned maintenance, where site A & B are both in the under-maintenance state. However if one site fails, and a maintenance page is presented only on site A, the GTM would need to know that was un-planned without manual intervention. If there was a way to configure monitor awareness on the LTM side with an iRule I think that would work, however I've read this is not possible. We are unable to manage the intelligent-DNS configuration, so I would rather have the state intelligence on my local LTM side. Thanks