Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

prometheus: Revive the prometheus plugin #582

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

cdecker
Copy link
Contributor

@cdecker cdecker commented Aug 13, 2024

I also added myself as maintainer in the CODEOWNERS file.

@cdecker cdecker force-pushed the 20240813-prometheus-revive branch 2 times, most recently from d8d740f to c2e8f01 Compare August 13, 2024 14:43
@chrisguida
Copy link
Collaborator

Excited to see this PR! Will try it out soon :)

@daywalker90
Copy link
Contributor

Tests are flaky, i saw some "address already in use" in one of them.

@chrisguida
Copy link
Collaborator

Interesting, looks like this is only broken on 23.11

@chrisguida
Copy link
Collaborator

Gonna update the CI to add 24.08 and remove 23.11, then this should be good to go

@chrisguida chrisguida force-pushed the 20240813-prometheus-revive branch 2 times, most recently from b6f7a3c to 78b17da Compare September 27, 2024 17:20
@chrisguida
Copy link
Collaborator

@cdecker any suggestions on how to use this? I'm not familiar with the prometheus protocol.

I think this is fine to merge since this plugin was already in the plugins repo, just archived due to failing tests, which this PR fixes.

ACK 78b17da

@cdecker
Copy link
Contributor Author

cdecker commented Oct 18, 2024

Sure, the plugin just exposes the /metrics URL on a given port (concurrent tests are causing the flakiness), and then you configure your prometheus server to scrape that endpoint, which puts the metrics in its timeseries DB. It's a very lightweight way of collecting metrics in a scalable way.

@mikemoniker
Copy link

Taking a look at this, I have a raspiblitz running cln, going to clone the prometheus plugin branch in and run prometheus and point it at the endpoint.

@mikemoniker
Copy link

I was able to install prometheus and get it to ingest the metrics and display them on port 9100. I had some difficulties with poetry and raspiblitz.

Since raspiblitz does everything with pip install --user, but I did not find an equivalent for poetry, I had to edit the shebang of the prometheus.py to use the venv python executable. @cdecker, I am curious how you run this on your system. Is there a more reproducible way? So it can be easier for future users.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants