Overview
The/metrics endpoint returns real-time load balancer metrics in JSON format for easy integration with monitoring systems and custom dashboards.
Endpoint: GET /metrics
Response Format: application/json
Authentication: None (configure firewall rules to restrict access)
Request
Response Format
Fields Reference
Global Metrics
Total number of requests processed since startup
Number of successful requests (2xx, 3xx status codes)
Number of failed requests (4xx, 5xx, timeouts)
Average response time in milliseconds
Minimum response time observed
Maximum response time observed
50th percentile (median) response time
95th percentile response time
99th percentile response time
Load balancer uptime in seconds
Current requests per second rate
Active load balancing algorithm
Backend Metrics
Backend server address (host:port)
Health status (true = healthy, false = unhealthy)
Current number of active connections to this backend
Total requests sent to this backend
Current failure count (resets on successful health check)
Average response time for this backend
Circuit breaker state:
closed, open, or half_openUsage Examples
Python
JavaScript/Node.js
Go
Bash/cURL
Integration Examples
Custom Dashboard
Alerting Script
Related Topics
Prometheus Endpoint
Prometheus metrics format
Monitoring Setup
Complete monitoring guide
Metrics Concept
Understanding metrics
Health Checks
Health check system