knightcrawler-stremio / knightcrawler

A selfhosted Stremio addon
Apache License 2.0
265 stars 38 forks source link

Monitoring with Grafana and Prometheus #48

Closed HDwayne closed 8 months ago

HDwayne commented 8 months ago

This pull request introduces a new docker-compose-metrics.yml file, which includes services for Prometheus and Grafana. The primary goal is to add RabbitMQ monitoring and visualization capabilities directly through Grafana

Changes Made:

funkypenguin commented 8 months ago

Ooh, I'm so keen on this! I've been thinking about how to setup a public grafana dashboard to geek out over the usage stats on https://torrentio.elfhosted.com - the more metrics, the better!

iPromKnight commented 8 months ago

Aye Me too tbh 😄

Gabisonfire commented 8 months ago

Thank you, this is an excellent idea. I think we could even push this to get some metrics from the database. Was talking about this just yesterday to have an endpoint on the api but prometheus makes more sense. I just want to review when Im not on mobile but it looks pretty good.

Gabisonfire commented 8 months ago

Great PR, thank you.

HDwayne commented 8 months ago

I've integrated the PostgreSQL Exporter service to enable the collection of PostgreSQL metrics within Grafana. It would be nice to modify the DATA_SOURCE_NAME variable in the docker-config-metrics to ensure that database credentials aren't hardcoded but are instead dependent on environment variables. To be honest, I'm not entirely sure how to implement this change myself.

Additionally, I'd like to highlight that having access to torrents information would be an amazing addition ! As a quick update, I've added a /statistics endpoint to the addon for debugging purposes. Please remember to disable this endpoint for production purposes.

thank you !