Skip to content

Prometheus Metrics

Pleroma includes support for exporting metrics via the prometheus_ex library.

Config example:

config :prometheus, Pleroma.Web.Endpoint.MetricsExporter,
  enabled: true,
  auth: {:basic, "myusername", "mypassword"},
  ip_whitelist: [""],
  path: "/api/pleroma/app_metrics",
  format: :text
  • enabled (Pleroma extension) enables the endpoint
  • ip_whitelist (Pleroma extension) could be used to restrict access only to specified IPs
  • auth sets the authentication (false for no auth; configurable to HTTP Basic Auth, see prometheus-plugs documentation)
  • format sets the output format (:text or :protobuf)
  • path sets the path to app metrics page


Exports Prometheus application metrics

  • Method: GET
  • Authentication: not required by default (see configuration options above)
  • Params: none
  • Response: text


Config example

The following is a config example to use with Grafana

  - job_name: 'beam'
    metrics_path: /api/pleroma/app_metrics
    scheme: https
    - targets: ['']