summaryrefslogtreecommitdiff
path: root/docs/API/prometheus.md
diff options
context:
space:
mode:
authorfeld <feld@feld.me>2020-10-27 22:13:50 +0000
committerfeld <feld@feld.me>2020-10-27 22:13:50 +0000
commit03a318af9ac1cc86e1201d6f55babd06c0b5ecd9 (patch)
tree1f45ec8d85a95ea677fc1e1a5e78f64e5241f36b /docs/API/prometheus.md
parente062329a177e1a1382cb3a44ef71e6d278b4963e (diff)
parent7d31122781c27e11e9e4ab62290cb772d64472d4 (diff)
downloadpleroma-03a318af9ac1cc86e1201d6f55babd06c0b5ecd9.tar.gz
pleroma-03a318af9ac1cc86e1201d6f55babd06c0b5ecd9.zip
Merge branch 'develop' into 'feature/autofollowing'
# Conflicts: # CHANGELOG.md
Diffstat (limited to 'docs/API/prometheus.md')
-rw-r--r--docs/API/prometheus.md26
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)
```