Monitoring your Ethereum Geth Server with Prometheus and Grafana

Posted By : Amarnath

Oct 30, 2020

What is Geth?

 

Geth refers to the command-line interface for operating an entire Ethereum node that gets implemented in Go.

 

What is Prometheus?

 

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.

 

What is Grafana?

 

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

 

  1. Geth 
  2. Prometheus
  3. Grafana
  4. Docker

 

Configuration for get exporter

 

$ 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

 

Configuration for Prometheus

 

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.

 

Configuration for Grafana

 

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. 

Leave a

Comment

Name is required

Invalid Name

Comment is required

Recaptcha is required.

blog-detail

November 21, 2024 at 12:04 pm

Your comment is awaiting moderation.

By using this site, you allow our use of cookies. For more information on the cookies we use and how to delete or block them, please read our cookie notice.

Chat with Us
Telegram Button
Youtube Button

Contact Us

Oodles | Blockchain Development Company

Name is required

Please enter a valid Name

Please enter a valid Phone Number

Please remove URL from text