

Your lemmy instance should have an endpoint for prometheus metrics; https://domain.com/metrics
.
Install prometheus (in a docker container) and setup lemmy as a target. From within docker, create a new network called prometheus
and add your prometheus container and lemmy to it. Then using the data that prometheus pulls, you can setup a nice looking dashboard in Grafana like this: https://i.xno.dev/4nLNK.png
The dashboard above is for my private DNS DoH stub resolver. You’ll have to make the dashboard yourself because there are no public dashboards for lemmy.
This option is preferable because it all works with docker: https://i.xno.dev/cWjtR.png
And this is what the prometheus config should look like;
[xanza@dev prometheus]$ cat *.yml
#prometheus.yml
global:
scrape_interval: 15s
evaluation_interval: 15s
scrape_configs:
- job_name: 'docker'
file_sd_configs:
- files:
- targets.yml
#targets.yml
- targets: ['blocky:4000']
labels:
job: blocky
__metrics_path__: /metrics
https://rentry.co/megathread
Thank me later.