2019-04-04 17:19:31 +00:00
|
|
|
# Prometheus Metrics
|
|
|
|
|
2022-07-04 02:34:54 +00:00
|
|
|
Akkoma includes support for exporting metrics via the [prometheus_ex](https://github.com/deadtrickster/prometheus.ex) library.
|
2019-04-04 17:19:31 +00:00
|
|
|
|
2020-10-18 18:22:21 +00:00
|
|
|
Config example:
|
|
|
|
|
|
|
|
```
|
2023-02-18 13:39:22 +00:00
|
|
|
config :pleroma, :instance,
|
|
|
|
export_prometheus_metrics: true
|
2020-10-18 18:22:21 +00:00
|
|
|
```
|
|
|
|
|
2023-02-18 13:39:22 +00:00
|
|
|
## `/api/v1/akkoma/metrics`
|
2020-10-18 18:22:21 +00:00
|
|
|
|
2019-04-04 17:19:31 +00:00
|
|
|
### Exports Prometheus application metrics
|
2020-10-18 18:22:21 +00:00
|
|
|
|
2019-04-04 17:19:31 +00:00
|
|
|
* Method: `GET`
|
2023-02-18 13:39:22 +00:00
|
|
|
* Authentication: required
|
2019-04-04 17:19:31 +00:00
|
|
|
* Params: none
|
2020-10-18 18:22:21 +00:00
|
|
|
* Response: text
|
2019-04-04 17:19:31 +00:00
|
|
|
|
|
|
|
## Grafana
|
2020-10-18 18:22:21 +00:00
|
|
|
|
2019-04-04 17:19:31 +00:00
|
|
|
### Config example
|
2020-10-18 18:22:21 +00:00
|
|
|
|
2019-04-04 17:19:31 +00:00
|
|
|
The following is a config example to use with [Grafana](https://grafana.com)
|
|
|
|
|
|
|
|
```
|
|
|
|
- job_name: 'beam'
|
2023-02-18 13:39:22 +00:00
|
|
|
metrics_path: /api/v1/akkoma/metrics
|
2019-04-04 17:19:31 +00:00
|
|
|
scheme: https
|
|
|
|
static_configs:
|
2022-11-14 00:01:31 +00:00
|
|
|
- targets: ['otp.akkoma.dev']
|
2019-04-04 17:19:31 +00:00
|
|
|
```
|