diff options
author | Ivan Tashkinov <ivantashkinov@gmail.com> | 2020-10-28 19:03:40 +0300 |
---|---|---|
committer | Ivan Tashkinov <ivantashkinov@gmail.com> | 2020-10-28 19:03:40 +0300 |
commit | ba50dc05a8d655deece0aa619aebe1e25dc9d4eb (patch) | |
tree | 4fd9c8ccc64de7b7ab1be6dd0659d34a6daa87d9 /docs/API/prometheus.md | |
parent | d54233760f4c006d89aa80e0ae78cb6910fc74ab (diff) | |
parent | 342c2e1bc0055b71a9772ef031eab3e8bc88d29b (diff) | |
download | pleroma-ba50dc05a8d655deece0aa619aebe1e25dc9d4eb.tar.gz pleroma-ba50dc05a8d655deece0aa619aebe1e25dc9d4eb.zip |
Merge remote-tracking branch 'remotes/origin/develop' into ostatus-controller-no-auth-check-on-non-federating-instances
# Conflicts:
# CHANGELOG.md
Diffstat (limited to 'docs/API/prometheus.md')
-rw-r--r-- | docs/API/prometheus.md | 26 |
1 files changed, 24 insertions, 2 deletions
diff --git a/docs/API/prometheus.md b/docs/API/prometheus.md index 19c564e3c..a5158d905 100644 --- a/docs/API/prometheus.md +++ b/docs/API/prometheus.md @@ -2,15 +2,37 @@ Pleroma includes support for exporting metrics via the [prometheus_ex](https://github.com/deadtrickster/prometheus.ex) library. +Config example: + +``` +config :prometheus, Pleroma.Web.Endpoint.MetricsExporter, + enabled: true, + auth: {:basic, "myusername", "mypassword"}, + ip_whitelist: ["127.0.0.1"], + 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](https://github.com/deadtrickster/prometheus-plugs#exporting) documentation) +* `format` sets the output format (`:text` or `:protobuf`) +* `path` sets the path to app metrics page + + ## `/api/pleroma/app_metrics` + ### Exports Prometheus application metrics + * Method: `GET` -* Authentication: not required +* Authentication: not required by default (see configuration options above) * Params: none -* Response: JSON +* Response: text ## Grafana + ### Config example + The following is a config example to use with [Grafana](https://grafana.com) ``` |