diff options
author | lain <lain@soykaf.club> | 2020-11-04 16:52:30 +0100 |
---|---|---|
committer | lain <lain@soykaf.club> | 2020-11-04 16:52:30 +0100 |
commit | 7bbc328d66aaac8d680f52521c6823aea42821af (patch) | |
tree | 5fa2ef3e91fd880e9170c718cca8245d73dc4ca3 /docs/API/prometheus.md | |
parent | de2499e54b33a1746e5f6a5b79f1422d31c11570 (diff) | |
parent | 78cea44553c936813ffc2c4c47984a64255096ef (diff) | |
download | pleroma-7bbc328d66aaac8d680f52521c6823aea42821af.tar.gz pleroma-7bbc328d66aaac8d680f52521c6823aea42821af.zip |
Merge branch 'develop' of git.pleroma.social:pleroma/pleroma into stats-genserver-fix
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) ``` |