Giter Site home page Giter Site logo

hunterlong / gethexporter Goto Github PK

View Code? Open in Web Editor NEW
114.0 6.0 54.0 13 KB

Monitor your Geth Ethereum Server with Prometheus and Grafana

Home Page: https://grafana.com/dashboards/6976

Go 91.58% Dockerfile 8.42%
prometheus prometheus-exporter grafana-dashboard ethereum geth eth ethereum-blockchain grafana-prometheus prometheus-metrics

gethexporter's Introduction

Geth Server Prometheus Exporter

Monitor your Ethereum Geth server with Prometheus and Grafana. Checkout the Grafana Dashboard to implement a beautiful geth server monitor for your own server, or you can just import Dashboard ID: 6976 once you have GethExporter up and running.

Docker

Run this Prometheus Exporter in a Docker container! Include your Geth server endpoint as GETH environment variable.

docker run -it -d -p 9090:9090 \
  -e "GETH="http://mygethserverhere.com:8545" \
  hunterlong/gethexporter

Features

  • Current and Average Gas Price
  • Total amount of ERC20 Token Transfers
  • Total amount of ETH transactions
  • Watch balance on specific addresses
  • Pending Transaction count

Environment Variables

You can add the environment variable ADDRESSES with a comma delimited list of ethereum addresses.

  • GETH = http://eth.mygethserver.com:8545 Ethereum node endpoint
  • ADDRESSES = 0x867fFB5a3871b500f65BdFafe0136f9667Deae06,0xF008E2c7A7F16ac706C2E0EBD3F015D442016420
  • DELAY = 500 millisecond delay between requests

Prometheus Response

geth_block 7042028
geth_seconds_last_block 0.50
geth_block_transactions 48
geth_block_value 59.48321713266354
geth_block_gas_used 1243863
geth_block_gas_limit 8000000
geth_block_nonce 7516583072599285197
geth_block_difficulty 2606288773636567
geth_block_uncles 0
geth_block_size_bytes 6680
geth_gas_price 2000000000
geth_pending_transactions 136
geth_network_id 1
geth_contracts_created 0
geth_token_transfers 10
geth_eth_transfers 35
geth_load_time 0.5302
geth_address_balance{address="0x867fFB5a3871b500f65BdFafe0136f9667Deae06"} 86.99212193
geth_address_nonce{address="0x867fFB5a3871b500f65BdFafe0136f9667Deae06"} 1
geth_address_balance{address="0xF008E2c7A7F16ac706C2E0EBD3F015D442016420"} 0.1605609476
geth_address_nonce{address="0xF008E2c7A7F16ac706C2E0EBD3F015D442016420"} 95623

gethexporter's People

Contributors

hunterlong avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

gethexporter's Issues

N/A values on Geth node Raspberry Pi

Dear Developer;

i have installed and fully synced my raspberry pi 4 eth node from this build;

https://ethereum.org/fr/developers/tutorials/run-node-raspberry-pi/

it comes with prometheus app. I'm importing your following application into prometheus;

https://github.com/hunterlong/gethexporter

when i visit the dashboard all values comes with N/A values. What should i do to use your application? Just installed docker and runned the the commandline code. It came with hunterlog / getexplorer not found error.

thank you!

Wrong Erc token transfer monitoring

Actually, if you use this method to count ERC-20 transfers, you skip more than 50% of all Token transfers, because quite a few transfers are done via transfer method. The correct way is to monitor Transfer event in the transaction log.

Cannot Access from External IP

I seem to be having an issue accessing the dashboard from the external IP, As far as I can see the node is connected and the dashboard is running it the docker container.

Any help would be greatly appreciated!

Service fails when request is made

curl localhost:9090/metrics

2019/01/10 08:12:08 http: panic serving [::1]:41566: runtime error: invalid memory address or nil pointer dereference

Error when importing as a Prometheus source in Grafana

I started the Docker container, and binded the ports

It seems to work, and querying curl http://gethexplorer:9090/metrics does return the expected data.
However, when I try to add this as a datasource in grafana, I get the following error:

Error reading Prometheus: client_error: client error: 404

Not that if I target another host/port, I get a different error (dial tcp 172.18.0.7:9091: connect: connection refused). My understanding is that Grafana is expecting the /api/v1/query to be available, but that is not the case.

Is this docker image using an old version of prometheus that grafana doesn't support ? Is there another way to configure grafana ?

Docker build fails on arm64

OS: Ubuntu 21.10 arm64

Attempted steps:

  • clone repo
  • enter/cd into repo
  • docker build -t mytag

I get the following failure:

# github.com/ethereum/go-ethereum/common/math
../../ethereum/go-ethereum/common/math/integer.go:84:21: undefined: bits.Sub64
../../ethereum/go-ethereum/common/math/integer.go:90:19: undefined: bits.Add64
../../ethereum/go-ethereum/common/math/integer.go:96:12: undefined: bits.Mul64
# github.com/ethereum/go-ethereum/rlp
../../ethereum/go-ethereum/rlp/encode.go:353:43: val.Field(fields[lastField].index).IsZero undefined (type reflect.Value has no field or method IsZero)
# github.com/ethereum/go-ethereum/params
../../ethereum/go-ethereum/params/config.go:60:36: syntax error: unexpected _150_000, expecting comma or )
../../ethereum/go-ethereum/params/config.go:61:36: syntax error: unexpected _920_000, expecting comma or )
../../ethereum/go-ethereum/params/config.go:63:36: syntax error: unexpected _463_000, expecting comma or )
../../ethereum/go-ethereum/params/config.go:65:36: syntax error: unexpected _675_000, expecting comma or )
../../ethereum/go-ethereum/params/config.go:66:36: syntax error: unexpected _675_000, expecting comma or )
../../ethereum/go-ethereum/params/config.go:67:36: syntax error: unexpected _370_000, expecting comma or )
../../ethereum/go-ethereum/params/config.go:68:36: syntax error: unexpected _280_000, expecting comma or )
../../ethereum/go-ethereum/params/config.go:69:36: syntax error: unexpected _280_000, expecting comma or )
../../ethereum/go-ethereum/params/config.go:70:36: syntax error: unexpected _069_000, expecting comma or )
../../ethereum/go-ethereum/params/config.go:71:36: syntax error: unexpected _200_000, expecting comma or )
../../ethereum/go-ethereum/params/config.go:71:36: too many errors
# github.com/ethereum/go-ethereum/rpc
../../ethereum/go-ethereum/rpc/http.go:179:14: undefined: http.NewRequestWithContext
../../ethereum/go-ethereum/rpc/http.go:188:25: hc.headers.Clone undefined (type http.Header has no field or method Clone)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.