Solution
Introduction
There is sometimes a requirement for a further customized health check / ping status page than what is provided out-of-the-box for monitoring capabilities of the API Gateway. The attached policy (pinghealth.xml) is an example policy that can use to create a customized health check status page for such an environment.
About the policy
The policy includes a context variable called "disabledHost" which represents a node's FQDN. This context variable is then used later in the policy. An "At least one assertion must evaluate to true" folder is beneath the context variable. It then holds two more folders which are "All assertions must evaluate to true". In the first folder, it compares the variable to see if it contains the value of the ${request.tcp.localhost} variable, and if it does then it passes with a particular response. If it does not pass, then it moves to the last folder in which it returns a different response.
<Please see attached file for image>

How to use
Attached to this article is an example policy that can be used in-place or further customized to meet the needs of a custom health check for an environment. To use this policy, perform the following steps:
- Download the attached XML file titled "pinghealth.xml" to a workstation.
- In Policy Manager, create the new web API policy to be used for this new health check status page.
- While viewing the newly created policy, click the Import Policy button and choose the file that was downloaded in step one above.
- Customize the various fields needed by the environment, such as the value of the "disabledHost" context variable.
For the out-of-the-box health check / ping status page, please refer to the Layer 7 Installation and Maintenance Manual.
Attachments: