Monitoring

Prometheus

OPA exposes an HTTP endpoint that can be used to collect performance metrics for all API calls. The Prometheus endpoint is enabled by default when you run OPA as a server.

You can enable metric collection from OPA with the following prometheus.yml config:

  1. global_config:
  2. scrape_interval: 15s
  3. scrape_configs:
  4. - job_name: "opa"
  5. metrics_path: "/metrics"
  6. static_configs:
  7. - targets:
  8. - "localhost:8181"

Health Checks

OPA exposes a /health API endpoint that can be used to perform health checks. See Health API for details.

Diagnostics (Deprecated)

The diagnostics feature is deprecated. If you need to monitor OPA decisions, see the Decision Log API.