RunReveal

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:

  • /metrics for Prometheus metrics
  • /debug/pprof/ for Go profiling endpoints

When pprof is unset, the server doesn't start and the service exposes no metrics.

ServiceConfig keyReference
RRQstream.pprofRRQ Configuration Guide
RRSCHschedule.pprofScheduler Types
RRWriterwriter.pprofRRWriter metrics

For example, in the RRSCH config.json:

{
  "schedule": {
    "pprof": "0.0.0.0:6065",
    "schedulers": [
      { "type": "query" },
      { "type": "notification-send" }
    ]
  }
}

And in the RRQ config.json:

{
  "stream": {
    "pprof": "0.0.0.0:6060",
    "sources": []
  }
}

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:

ServiceValues keyDefault port
RRQrrq.metrics.port6060
RRSCHrrsch.metrics.port6065
RRWriterrrwriter.metrics.port6060

You can override the default port in your Helm values file:

runreveal:
  rrq:
    metrics:
      port: 7070

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

scrape_configs:
  - job_name: rrsch
    static_configs:
      - targets: ['rrsch.runreveal.svc:6065']
  - job_name: rrq
    static_configs:
      - targets: ['rrq.runreveal.svc:6060']

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:

global:
  metrics:
    enabled: true
    podAnnotations:
      k8s.grafana.com/scrape: "true"
 
rrq:
  metrics:
    podAnnotations:
      k8s.grafana.com/metrics.portNumber: "6060"
      k8s.grafana.com/job: "rrq"
 
rrsch:
  metrics:
    podAnnotations:
      k8s.grafana.com/metrics.portNumber: "6065"
      k8s.grafana.com/job: "rrsch"
 
rrwriter:
  metrics:
    podAnnotations:
      k8s.grafana.com/metrics.portNumber: "6060"
      k8s.grafana.com/job: "rrwriter"

How the values combine:

  • metrics.enabled defaults to false globally and for each service. A service adds annotations when its own metrics.enabled or global.metrics.enabled is true. A service-level value takes precedence over the global one.
  • A service's metrics.podAnnotations are merged with global.metrics.podAnnotations. If both set the same key, the service value wins.
  • Set metrics.portNumber to the same value as the service's metrics.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/port to the port from the service's pprof setting:

    metadata:
      annotations:
        prometheus.io/scrape: "true"
        prometheus.io/port: "6065"
        prometheus.io/path: "/metrics"
  • Prometheus Operator. Create a PodMonitor that 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:

On this page