Health Check
The Health Check feature in Babel Licensing Service provides a comprehensive mechanism to monitor the health and operational status of the service and its components. This feature is essential for ensuring system reliability, facilitating troubleshooting, and enabling integration with infrastructure monitoring tools.
Configuration
Health Check behavior is configured through the Application
section in the appsettings.json
file:
HealthCheckEndPoint
This setting specifies the URL path where the health check endpoint will be accessible. The default value is /health
.
Example: If your service is running at https://licensing.example.com
and the HealthCheckEndPoint
is set to /health
, the full health check URL would be https://licensing.example.com/health
.
HealthCheckResponseType
This setting determines the format of the health check response. Two formats are supported:
JSON: Returns a structured JSON response (default)
TEXT: Returns a human-readable plain text response
JSON Response Format
When HealthCheckResponseType
is set to "JSON"
, the health check endpoint produces a structured JSON response like this:
This format is ideal for:
Automated monitoring systems
Integration with orchestration platforms like Kubernetes
Programmatic health status evaluation
Third-party monitoring tools that can parse JSON data
TEXT Response Format
When HealthCheckResponseType
is set to "TEXT"
, the health check endpoint produces a human-readable format:
This format is better suited for:
Manual inspection by system administrators
Command-line tools and simple status checks
Situations where the response needs to be easily readable without additional parsing
Log file entries and console output
Health Check Components
The Babel Licensing Service health check monitors several critical components:
Service Health: Provides information about the main service, including server time, license edition, active tokens, and maximum allowed tokens.
Database Health: Verifies connectivity and operational status of the database.
Webhook Processor: Checks if the webhook processing system is functioning correctly.
Geo Location Service: Confirms that the configured geolocation service (like IpApiIs) is operational.
Status Values
Health checks will report one of the following statuses:
Healthy: The component is functioning normally
Degraded: The component is operational but with reduced functionality or performance
Unhealthy: The component is not functioning properly
Integration with Monitoring Systems
The health check endpoint can be integrated with various monitoring systems:
Load Balancers: Can use the health check to determine if the service should receive traffic
Container Orchestration: Platforms like Kubernetes can use the endpoint for readiness and liveness probes
Monitoring Tools: Systems like Prometheus, Nagios, or Zabbix can periodically check the endpoint
Custom Dashboards: The JSON format can be consumed by custom monitoring dashboards
Best Practices
Regular Monitoring: Configure your monitoring system to check the health endpoint at regular intervals.
Alerting: Set up alerts for when the service transitions from Healthy to Degraded or Unhealthy.
Response Format Selection: Choose JSON for automated systems and TEXT for human operators.
Custom Endpoint: Consider changing the default endpoint for security reasons in production environments.
Firewall Configuration: Ensure your firewall allows access to the health check endpoint from your monitoring systems.
The Health Check feature is an essential tool for maintaining the reliability and stability of your Babel Licensing Service deployment by providing real-time insights into the operational status of the system and its components.
Last updated