Monitoring
Prometheus metrics, health checks and range status.
Every node serves metrics and the health check on its administration port (27200 by default).
Requirements
- Network access to the administration port of each node.
- For
/metrics, the client certificate of a user with theclusterMonitorrole.
/healthz
Returns 200 if the node is serving and 503 if not, with no body and no credentials. Use it in your load balancer or
orchestrator.
/metrics
It answers in the Prometheus exposition format, so any Prometheus server can read it directly. It asks for a client
certificate of a user with the clusterMonitor role; without one, the node refuses the request.
| Metric | What it measures |
|---|---|
teseladb_up | The node is running |
teseladb_ranges | Ranges with a replica on this node |
teseladb_range_applied_index{range} | Last applied entry of each replica |
teseladb_range_leader{range} | Whether this node leads that range |
teseladb admin metricsWith that command you read the same metrics from the CLI, without going through Prometheus, with the credentials in
the node's --dbpath.
Ranges
teseladb admin ranges --collection shop.ordersShows each range with its bounds, the replicas it has and the node that leads it. From mongosh, serverStatus, currentOp, $collStats and
the profiler have MongoDB's shape.
Check
curl -s -o /dev/null -w "%{http_code}\n" --cacert ca.pem https://node-01:27200/healthzThe command prints 200 if the node is serving. If it prints 503, the node is running but not taking requests yet.
Common problems
- If
/metricsrefuses the request, the client certificate is missing or its user lacks theclusterMonitorrole. - If
/healthzanswers503, the node is running but not serving yet. Your load balancer must not send it traffic until it answers200.