HTTP Endpoints for Health Checks
When the ActiveMatrix Service Grid - Container Edition application is started, it exposes REST API to show component status and node health on container port 9998. This endpoint can be used to configure health checks on Docker or Kubernetes-based platforms.
Checking Application Health in Docker
While running Docker container, you must bind the user defined host port with container's port 9998. After the host port is bound, start the container. You can access the following endpoint URLs to check health of an application:
http://<host>:9998/status/healthz:
- Returns "RUNNING" with HTTP 200 status code, if all the components are in running state.
- If not all the components are in running state, then it returns HTTP 503 with the list of components that are not in the running state.
http://<host>:9998/status/errors
: Returns list of components that are not in the running state.http://<host>:9998/status/swagger.json
: Returns swagger JSON specification.http://<host>:9998/status/nodehealth
: Returns status of all components running on the node.http://<host>:9998/status/apphealth
: Returns status of all user application components.
Configuring Monitoring Application port
You can configure the monitoring application port in the configuration YAML file. By default, the monitoring application uses the HTTP connector monitorHttpConnector
and port 9998.
To configure monitoring app port, update the port of monitorHttpConnector
in the application configuration YAML file:
httpConnectors: - name: monitorHttpConnector operation: ADD host: 0.0.0.0 port: '7777'
In Application Configurator, if uploaded YAML have monitorHttpConnector
, it appears in the list of resource templates. Otherwise, the monitorHttpConnector
is not created in the YAML file downloaded from Application Configurator.
If monitorHttpConnector
is not present in the configuration YAML file, then the default configuration of monitorHttpConnector
is used. Otherwise, the HTTP connector monitorHttpConnector
in the YAML file is used.
monitorHttpConnector
in the configuration YAML file or in the Application Configurator.