Skip to content
This repository has been archived by the owner on Jan 24, 2020. It is now read-only.

Latest commit

 

History

History
90 lines (67 loc) · 2.37 KB

README.md

File metadata and controls

90 lines (67 loc) · 2.37 KB

Ethereum exporter

install size

Collects statistics from parity or geth node via JSON-RPC and exports it in prometheus metrics format.

Example metrics data.

Compatibility

Tested with ethereum RPC clients:

  • Geth v1.8.27
  • Parity-Ethereum v2.5.5

Installation

Docker

Put in your docker-compose.yml

  exporter:
    image: 4ops/ethereum-exporter:v0.1.0
    ports:
      - '9133:9133'
    environment:
      ETHEREUM_API_URL: http://geth:8545

See full example in docker directory.

Kubernetes

Example spec for ethereum-exporter container:

- env:
    - name: ETHEREUM_API_URL
      valueFrom:
        secretKeyRef:
          name: geth-credentials
          key: ETHEREUM_API_URL
  image: 4ops/ethereum-exporter:v0.1.0
  readinessProbe:
    httpGet:
      path: /metrics
      port: http-metrics
    timeoutSeconds: 3
    initialDelaySeconds: 5
    periodSeconds: 10
  name: metrics-exporter
  ports:
    - containerPort: 9144
      name: http-metrics
      protocol: TCP
  resources:
    requests:
      cpu: 100m
      memory: 200Mi
    limits:
      cpu: 100m
      memory: 200Mi
  securityContext:
    allowPrivilegeEscalation: false
    runAsGroup: 1000
    runAsUser: 1000
    procMount: Default

See full example in kubernetes directory.

Configuration

Ethereum exporter reads environments variables at startup. No more config files are required.

Ethereum node options

  • ETHEREUM_API_URL - path to http(s) api interface.

Metrics options

  • METRICS_URL - path for prometheus scrapes. Default: /metrics
  • METRICS_PORT - metrics server port number. Default: 9144
  • METRICS_PREFIX - prefix for naming metrics. Default: ethereum_

Logging

  • LOG_LEVEL - logging verbosity level. Maybe on of: debug, info, notice, warn, warning, error.
  • LOG_TIME - timestamp format in logs. Default - none. Any non-empty value prints timestamps (ISO 8601 format).