GithubHelp home page GithubHelp logo

bsgrigorov / ethereum-prometheus-exporter Goto Github PK

View Code? Open in Web Editor NEW

This project forked from 31z4/ethereum-prometheus-exporter

0.0 0.0 0.0 48 KB

Prometheus exporter for Ethereum client metrics

License: MIT License

Go 98.50% Dockerfile 1.50%

ethereum-prometheus-exporter's Introduction

Ethereum Prometheus Exporter

CircleCI codecov Go Report Card

This service exports various metrics from Ethereum clients for consumption by Prometheus. It uses JSON-RPC interface to collect the metrics. Any JSON-RPC 2.0 enabled client should be supported. Although, it has only been tested with OpenEthereum.

Usage

You can deploy this exporter using the 31z4/ethereum-prometheus-exporter Docker image.

docker run -d -p 9368:9368 --name ethereum-exporter 31z4/ethereum-prometheus-exporter -url http://ethereum:8545

Keep in mind that your container needs to be able to communicate with the Ethereum client using the specified url (default is http://localhost:8545).

By default the exporter serves on :9368 at /metrics. The listen address can be changed by specifying the -addr flag.

Here is an example scrape_config for Prometheus.

- job_name: ethereum
  static_configs:
  - targets:
    - ethereum-exporter:9368

Exported Metrics

Name Description
net_peers Number of peers currently connected to the client.
eth_block_number Number of the most recent block.
eth_block_timestamp Timestamp of the most recent block.
eth_gas_price Current gas price in wei. Might be inaccurate.
eth_earliest_block_transactions Number of transactions in the earliest block.
eth_latest_block_transactions Number of transactions in the latest block.
eth_pending_block_transactions The number of transactions in pending block.
eth_hashrate Hashes per second that this node is mining with.
eth_sync_starting Block number at which current import started.
eth_sync_current Number of most recent block.
eth_sync_highest Estimated number of highest block.
parity_net_active_peers Number of active peers. Available only for OpenEthereum.
parity_net_connected_peers Number of peers currently connected to this client. Available only for OpenEthereum.

Development

Go modules is used for dependency management. Hence Go 1.11 is a minimum required version.

Contributing

Contributions are greatly appreciated. The project follows the typical GitHub pull request model. Before starting any work, please either comment on an existing issue or file a new one.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Fork

In order to push docker image have to tag with

git tag v0.0.5
git push origin v0.0.5

ethereum-prometheus-exporter's People

Contributors

31z4 avatar bsgrigorov avatar legogris avatar

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.