Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Closes #166 .
This PR adds support for Prometheus, while giving an example of its integration with Grafana as well.
Summary
metrics
that holds information about the Prometheus metrics and that can be used in a singleton way;docker-compose.yml
file to examplify how to deploy floresta+prometheus+grafana infra;Example of added metrics in Grafana:
Testing
Run
docker-compose up -d --build
, wait for it to start all services and then go to http://localhost:3000/, where you can log into Grafana using the given credentials found in thedocker-compose.yml
file.There, you can go to Dashboards on the left, add New, select Prometheus as the data source (should be pre-selected) and then choose one of the metrics, the data visualization type and run the queries to see it in action.
Improvements
I'm not too familiar with the codebase, therefore adding metrics to the best places would be better done by someone who has.
During the tests with the deployment of the infra with
docker-compose.yml
noticed that there is something off going on with the system, probably related to this, that it was driving the CPU usage over 100% and the memory at around 8GB, maintaining this last one during the initial block downloading at least.The high CPU and memory usage would go off the roofs around this part.