-
-
Notifications
You must be signed in to change notification settings - Fork 388
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
Add support for instrumentation using Prometheus #87
Conversation
The term "job" is reserved in Prometheus. I renamed to "queue" because the Swar "jobs" resemble the queues in the Chia GUI.
Hey so what's the benefit of Prometheus and where can I read up on documentation of it? Do you have usecases that you'd be able to share so I can understand what's going on? |
Sure thing! Best place to find out about it is their homepage (provided in my link in the description). There's also this Medium post that explains it. But the TL;DR is that it's a toolkit for monitoring and alerting. When certain events happen, they are logged, then a Prometheus server scrapes these events and stores them. You can then query it to get insights. On its own, it's not the nicest interface, so it's usually paired with Grafana, an analytics and monitoring visualization tool. Below is the start of my dashboard. I currently have two machines plotting, one with 3 different jobs and another with only 1. At the moment, this only provides two metrics (currently running plots and number of completed plots). I didn't want to make this PR huge and difficult to review, so my intent was just to set up the framework and provide two simple metrics as examples. On its own, this PR may not add much value, but I was thinking that I'd eventually add all sorts of metrics like:
This will give users the ability to do three things:
Just to be clear though, all this does is provide the metrics to Prometheus. It's still up to the users to set up their own Prometheus instance, and Grafana or other visualization/alerting tool that hooks into Prometheus. Please let me know what you think! |
…into prometheus
I'm merging this to a separate branch so I can make some changes prior to merging it into the development branch. |
Thanks for this @swar - how would I be able to set the prometheus host IP since I have one main machine (running prometheus, grafana, etc.) and others which are harvesters/plotters? |
This adds the framework for gathering metrics using Prometheus, plus two metrics to start with.
Once metrics are gathered by Prometheus, they can be visualized using tools like Grafana.