Posted By : Amarnath
Geth refers to the command-line interface for operating an entire Ethereum node that gets implemented in Go.
Prometheus is a free software used for event monitoring and alerting. It can record and store real-time measures in a time-series database that gets developed with an HTTP pull model, providing flexible queries and real-time alerting.
Grafana is open-source analytics and interactive visualization web application. Its work is to make charts, graphs, and alerts for the web available when connected to corresponding sources of data.
Flow
Geth <-> Exporter <-> Prometheus <-> Grafana
Prerequisites
$ docker pull hunterlong/gethexporter
$ docker run -it -d -p 9090:9090 -e "GETH=http://<ipordomainofgethserver>:8545" hunterlong/gethexporter
The exporter should be able to contact your geth server to pull metrics so make sure to adjust rules in your firewall configurations accordingly if you are running it on a separate server.
You can check the metric on http://<ipordomainofgethexporterserver>:9090/metrics via browser or curl request
Add these lines to your prometheus.yml configuration and reload the configuration.
- job_name: 'gethexporter'
static_configs:
- targets: ['<ipordomainofgethexporterserver>:9090]
For verification, Prometheus is able to scrape metrics from exporter open in your browser.
http://<ipordomainofgethexporterserver>:9090/targets and check server state under 'gethexporter' block is UP.
Add this Prometheus as a data source in your Grafana dashboard by going in Configuration->Data Sources and save. In Grafana, go to Create-> Import and import the dashboard from the following id:
6976
Now, you should be able to see your Geth Ethereum Server Dashboard.
For exporter, you can also configure ethereum address to watch and delay between requests using ADDRESSES and DELAY respectively.
September 8, 2024 at 02:30 am
Your comment is awaiting moderation.