Metrics
Metrics
Mermin provides Prometheus metrics HTTP endpoints (default port 10250). This page documents metrics configuration. Endpoints available:
/metrics- All metrics (standard + debug ifmetrics.debug_metrics_enabledistrue)/metrics/standard- Standard metrics only (aggregated, no high-cardinality labels)/metrics/debug- Debug metrics only (returns 404 ifmetrics.debug_metrics_enabledisfalse)/metrics:summary- JSON summary of all available metrics with metadata (name, type, description, labels, category)
Configuration
Full configuration example may be found in the Default Config
Configuration Options
enabled
enabledType: Boolean Default: true
Enable or disable the metrics server.
Example:
metrics {
enabled = false # Disable metrics
}listen_address
listen_addressType: String (IP address) Default: "0.0.0.0"
IP address the metrics server binds to.
Example:
port
portType: Integer Default: 10250
TCP port the metrics server listens on.
Example:
debug_metrics_enabled
debug_metrics_enabledType: Boolean Default: false
Enable debug metrics
Enabling debug metrics can cause significant memory growth in production
Example:
stale_metric_ttl
stale_metric_ttlType: String (duration) Default: 5m
Time-to-live for stale metrics after resource deletion. 0s applies immediate cleanup
Example:
Authentication and Security
Currently, the metrics endpoints do not support neither authentication nor TLS encryption. Use network policies or service mesh policies to restrict access.
For production environments:
Use network policies to limit access
Do not expose metrics endpoints externally
Use port-forwarding for manual access:
kubectl port-forward pod/mermin-xxx 10250:10250
Troubleshooting
Metrics Not Scraped by Prometheus
Symptoms: No Mermin metrics in Prometheus
Solutions:
Verify
metrics.enabled = trueCheck Prometheus configuration
Verify pod annotations or
ServiceMonitor(or another K8s CRD responsible for scraping configuration)Test manual scrape:
curl http://pod-ip:10250/metricsCheck network policies
High Metrics Cardinality
Symptoms: Too many unique metric series
Solutions:
Limit labels in metrics
Use aggregation in queries
Adjust Prometheus retention
Next Steps
Mermin Application Metrics: Mermin metrics documentation
Last updated