Git Product home page Git Product logo

geth-exporter's Introduction

Geth-Exporter

A prometheus exporter which scrapes geth json rpc data.

Example Usage

## SETUP

$ go run main.go --config config.yaml &


## TEST with 'balance' module

$ curl "http://localhost:8000/probe?module=balance&target=<RPC_ENDPOINT>&address=<WALLET_ADDR>&block=<BLOCK>"
# HELP balance_wei 
# TYPE balance_wei gauge
balance_wei 3.7689696e+16

## TEST with 'gas' module

$ curl "http://localhost:8000/probe?module=gas&target=<RPC_ENDPOINT>"
# HELP geth_wei 
# TYPE geth_wei gauge
geth_wei 1e+09


## TEST through prometheus:

$ docker run --rm -it -p 9090:9090 -v $PWD/examples/prometheus.yml:/etc/prometheus/prometheus.yml prom/prometheus

Then head over to http://localhost:9090/graph?g0.range_input=1h&g0.expr=example_value_active&g0.tab=1 or http://localhost:9090/targets to check the scraped metrics or the targets.

Configuration

This config file is written in YAML format, defined by the scheme described below.
Brackets indicate that a parameter is optional.
For non-list parameters the value is set to the specified default.

modules:
     [ <string>: <module> ... ]

<module>

  # The protocol over which the probe will take place (http, tcp, dns, icmp, grpc).
  prober: <prober_string>

  # The specific probe configuration - at most one of these should be specified.
  name: <metric_name>
  type: <result_type>
  method: <rpc_method>
  [ params: <array<string>> ]

The specific method could be found JSON-RPC API

Docker

$ docker run -v $PWD/config.yaml:/config.yaml -p 8000:8000 rss3/geth-exporter --config=/config.yaml

geth-exporter's People

Contributors

incubator4 avatar

Stargazers

DM|全渣攻城獅 avatar

Watchers

Henry Wang avatar polebug avatar Joshua Meteora avatar Usagi Ryu avatar Atlas avatar  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.