Configure Internal Server
Block: internal.server
Mermin provides HTTP Server endpoints for health checks and Prometheus metrics. This page documents how to configure the HTTP server and health probes; for the Prometheus metrics server (port, endpoints, debug metrics), see Metrics.
Configuration
A full configuration example may be found in the Default Configuration.
internal.server block
internal.server blockenabledattributeEnable or disable the HTTP server. When disabled, health check endpoints are not available.
Type: Boolean
Default:
trueExample: Disable HTTP server
internal "server" { enabled = false }Disabling the HTTP server prevents Kubernetes liveness and readiness probes from functioning, which may cause pods to be restarted.
listen_addressattributeIP address the HTTP server binds to.
Type: String
Default:
"0.0.0.0"Common Values:
"0.0.0.0": Listen on all interfaces (default, recommended for Kubernetes)"127.0.0.1": Listen only on localhost (for local testing)Specific IP: Listen on specific interface
Example: Listen on localhost only
internal "server" { listen_address = "127.0.0.1" }portattributeTCP port the HTTP server listens on.
Type: Integer
Default:
8080Example: Custom listening port
internal "server" { port = 9090 }
Metrics Server
The metrics server (Prometheus scrape endpoint) is configured via the internal "metrics" block. Options include enabled, listen_address, port (default 10250), and debug_metrics_enabled. See Metrics for full configuration and available endpoints.
Health Check Endpoints
Health endpoints return JSON (Content-Type: application/json) with a status field ("ok" or "unavailable") and a checks object with detailed state.
/livezendpoint (Liveness Probe)Indicates whether Mermin is alive and running.
Request:
Response:
200 OK: Mermin is alive
503 Service Unavailable: Mermin is not responsive
Response body (JSON):
Use Case: Kubernetes liveness probe, enabled by default in the Helm chart.
/readyzendpoint (Readiness Probe)Indicates whether Mermin is ready to accept traffic.
Request:
Response:
200 OK: Mermin is ready (eBPF programs loaded, Kubernetes informers synced, pipeline ready to process)
503 Service Unavailable: Mermin is not ready
Response body (JSON):
Use Case: Kubernetes readiness probe, enabled by default in the Helm chart.
/startupendpoint (Startup Probe)Indicates whether Mermin has completed initial startup.
Request:
Response:
200 OK: Startup complete
503 Service Unavailable: Still starting up
Response body (JSON):
Use Case: Kubernetes startup probe, enabled by default in the Helm chart.
Security Considerations
Network Policies
Restrict access to HTTP and metrics endpoints:
Adjust the matchLabels (e.g. name: monitoring) to match the namespace where your Prometheus runs.
Authentication
Currently, the HTTP and metrics endpoints do not support authentication. Use network policies or service mesh policies to restrict access.
For production environments:
Use network policies to limit access
Do not expose endpoints externally
Use port-forwarding for manual access:
kubectl port-forward pod/mermin-xxx 8080:8080
Troubleshooting
HTTP Endpoints Not Responding
Symptoms: Health check requests timeout
Steps:
Verify
server.enabled = trueCheck port is not blocked by firewall
Verify pod is running:
kubectl get podsCheck Mermin pod events:
kubectl describe pod mermin-xxxCheck logs:
kubectl logs <pod-name>
Next Steps
Configure Prometheus Metrics: Expose metrics for scraping
Enable Internal Tracing: Debug Mermin itself
Tune Flow Generation: Configure timeouts and thresholds
Configure OTLP Export: Send flows to your backend
Need Help?
Troubleshoot Issues: Diagnose health check failures
GitHub Discussions: Ask about server configuration
Last updated