Monitoring
RunReveal services can expose Prometheus metrics over HTTP. You turn this on per service in its config.json, then point your Prometheus-compatible scraper at it.
Enable the metrics endpoint
Each service has a pprof setting that holds a listen address. When it's set, the service starts an HTTP server with:
/metricsfor Prometheus metrics/debug/pprof/for Go profiling endpoints
When pprof is unset, the server doesn't start and the service exposes no metrics.
| Service | Config key | Reference |
|---|---|---|
| RRQ | stream.pprof | RRQ Configuration Guide |
| RRSCH | schedule.pprof | Scheduler Types |
| RRWriter | writer.pprof | RRWriter metrics |
For example, in the RRSCH config.json:
And in the RRQ config.json:
Use a different port for each service that shares a host or pod. Bind to 0.0.0.0 so the scraper can reach the port from outside the pod. Binding to 127.0.0.1 only allows scraping from inside the pod.
With Helm
If you deploy with the RunReveal Helm chart, metrics are enabled by default; the pprof setting in config.json and exposing the port are handled for you.
Metrics are available on these ports by default:
| Service | Values key | Default port |
|---|---|---|
| RRQ | rrq.metrics.port | 6060 |
| RRSCH | rrsch.metrics.port | 6065 |
| RRWriter | rrwriter.metrics.port | 6060 |
You can override the default port in your Helm values file:
Note: the metrics.enabled value doesn't start or stop the endpoint. It controls whether the chart adds scrape annotations to the pod. See Kubernetes.
The same port serves /debug/pprof/, which exposes process internals and has no authentication. Don't expose it outside your cluster. Restrict access with a NetworkPolicy or security group so only your monitoring system can reach it.
Scrape the metrics
Static Prometheus configuration
Helm pod annotations
The chart can add scrape annotations to each service's pod. Turn them on globally, or per service, and set the annotations your scraper looks for:
How the values combine:
metrics.enableddefaults tofalseglobally and for each service. A service adds annotations when its ownmetrics.enabledorglobal.metrics.enabledistrue. A service-level value takes precedence over the global one.- A service's
metrics.podAnnotationsare merged withglobal.metrics.podAnnotations. If both set the same key, the service value wins. - Set
metrics.portNumberto the same value as the service'smetrics.port.
The k8s.grafana.com/* names above are the annotations that Grafana's Kubernetes monitoring (Grafana Alloy) uses to discover pods. For another scraper, put its annotations in metrics.podAnnotations instead, such as the prometheus.io/* set below.
Kubernetes
Make sure each service's pprof address is set and the container port is exposed. The Helm chart does both for you. Then choose a discovery method:
-
Annotation-based discovery. If your Prometheus (or Grafana Alloy, or an OpenTelemetry Collector) discovers pods by annotation, add these annotations to the pod template of each deployment. Set
prometheus.io/portto the port from the service'spprofsetting: -
Prometheus Operator. Create a
PodMonitorthat selects the RunReveal pods and names the metrics port.
The annotation names above are a convention, not a requirement. They only work if your scraper's relabeling rules look for them. With Helm, set them in metrics.podAnnotations, as shown in Helm pod annotations.
Available metrics
Standard Go and process metrics
Besides RunReveal's own metrics, each /metrics endpoint serves the standard go_* and process_* metrics, such as goroutine counts, memory use, GC activity, CPU time, and open file descriptors. They follow the usual Prometheus client conventions:
- Go collector (
go_*) - Process collector (
process_*) - Go
runtime/metrics, the source of the runtime values behindgo_*