Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

A Prometheus Exporter for monitoring Ethereum Gas prices in Gwei

License

NotificationsYou must be signed in to change notification settings

WesleyCharlesBlake/eth-gas-exporter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

To build the Go code, run the following command:

go build

To test the Go code, run the following command:

go test ./...

Run the Docker image

To run the Docker image, run the following command:

docker build -t gwei_exporter .docker run -p 9100:9100 gwei_exporter

The exporter will listen on port9100 and the path/metrics by default.

Be sure to exportETHERSCAN_API_KEY if you wish to not be rate limited

export ETHERSCAN_API_KEY=xxxxxxx.....
curl http://localhost:9100/metrics# HELP eth_gas_price The current gas price of ETH in gwei# TYPE eth_gas_price gaugeeth_gas_price{type="average"} 143eth_gas_price{type="fast"} 530eth_gas_price{type="fastest"} 530eth_gas_price{type="safeLow"} 143

Include scrape configs

To include scrape configs in Prometheus, add the following to your Prometheus configuration file:

scrape_configs:  - job_name: "gwei"    scrape_interval: 10s    static_configs:      - targets: ["localhost:9100"]

This will tell Prometheus to scrape the exporter every 10 seconds.

About

A Prometheus Exporter for monitoring Ethereum Gas prices in Gwei

Topics

Resources

License

Code of conduct

Stars

Watchers

Forks

Sponsor this project

    Packages

     
     
     

    [8]ページ先頭

    ©2009-2025 Movatter.jp