My webMethods Server 10.11 | My webMethods Server Webhelp | Administering My webMethods Server | Startup and Configuration | Using My webMethods Server with Docker | Monitoring My webMethods Server Containers | Implementing Custom Health Indicators
 
Implementing Custom Health Indicators
To add a custom health indicator in a My webMethods Server container, you must register your implementation as an OSGI service. On container start up, My webMethods Server loads custom health indicators from the MWS/volumes/libs directory of the container (if included in the image), or from a mapped directory on the host file system, and lists them at the dedicated endpoint http://container_host:port/health together with the built-in health indicators.
The high-level steps to create and register a custom health indicator for My webMethods Server containers are as follows:
*In an application project, create a class that implements IHealthIndicator.
*Add the custom code that performs the required health checks to the class.
*In the same application project, add a custom class that implements the IHealthIndicatorConfig class, with the custom code that configures your indicator properties.
*Package the application as a jar file.
*Add the new custom indicator in a healthCheck.json file, as described in Container Health Check Samples.
*Place the healthCheck.json file in an instance_cfg directory, and the compiled application in another dedicated directory, both in a volume or on the host file system.
*When starting the My webMethods Server container, mount the instance_cfg to the MWS/volumes/config directory on the container file system, and the directory that contains the CAF application to MWS/volumes/libs.