Adding New Plugins to Health Monitor
You can add new plugins that add additional checks that might affect the application’s health. For example, you can create a plugin that interacts with an external integration, such as an ESB (Enterprise Service Bus) or payment gateway.
Create a Spring configuration file in the
Add beans for each of the new
StatusCheckerTargetclasses to this file.
To register the new beans, add them to one of the two lists used by the
You must add them to the
<WEBAPP>is name of your webapp, that is available only in your webapp. You must also add this file to your
Spring does merge lists. To add new values you must override the existing list, including all of its default values. The default values are:
<util:list id="loadBalancerStatusCheckerTargetList" scope="prototype"> <ref bean="applicationStatusCheckerTarget"/> <ref bean="databaseStatusCheckerTarget"/> </util:list> <util:list id="additionalInfoStatusCheckerTargetList" scope="prototype"> </util:list>
Do not add the new beans to the
ep-health-monitoring-plugin.xml file, because each webapp might have a different list of the touch points.
When a load balancer starts the status checker, using the URL
/status/lb, only the status checker targets in
loadBalancerStatusCheckerTargetList are examined. This list should therefore only contain status checker targets that can instruct a load balancer to stop sending traffic to a given node.
When any of the info URLs are invoked, such as
/status/info.json, the status checker targets in both lists are examined.
You can add a new monitoring plugin to monitor a webapp based on the availability of specific resource to declare that the webapp is down if resource is unavailable.
/status/lb URL is requested for a webapp, if a health monitoring plug-in is available to check resource, the plug-in is configured for webapp,and the resource is available, an HTTP status
200 is returned.
/status/lb URL is requested for webapp, if a health monitoring plugin is available to check the resource, the plugin is configured for webapp, and resource is unavailable, an HTTP status
503 is returned.
You can use health monitoring to diagnose the infrastructure issues by querying a webapp to determine the availability of a specific resource.
An information plug-in affects only the info requests
/status/info.html, and has no effect on monitoring requests.
When the webapp requests the
/status/info.html URL,if a health monitoring plug-in is available to check the resource and the plug-in is configured for the webapp:
- If the resource is available: An HTTP page is returned showing that the resource is available
- If the resource is unavailable: An HTTP page is returned showing that the resource is unavailable
- If the resource in unavailable and does not affect monitoring: An HTTP status