lido-exporter

command
v1.7.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 1, 2024 License: Apache-2.0 Imports: 2 Imported by: 0

README

Lido Exporter

Lido Exporter is a service that exports data from the Lido CSM smart contracts as Prometheus metrics.

Features

  • Collects metrics for penalties, exit requests, node operator info, keys info, bond info, and rewards info
  • Supports Holesky network (Mainnet support can be easily added)
  • Exports metrics in Prometheus format

Usage

Running with Docker

You can easily run the Lido Exporter using Docker. There is a published Docker image available, which eliminates the need to build the image yourself.

  1. Pull the Docker image:

    docker pull nethermindeth/lido-exporter:latest
    
  2. Run the Docker container with the necessary environment variables:

    docker run -d -p 8080:8080 \
      -e LIDO_EXPORTER_NODE_OPERATOR_ID=<your_node_operator_id> \
      -e LIDO_EXPORTER_NETWORK=<network_name> \
      nethermindeth/lido-exporter:latest
    
  • The container listens on port 8080 by default, but you can change this using the LIDO_EXPORTER_PORT environment variable.
  • The metrics will be available at http://localhost:8080/metrics.
Running as a CLI Application
  1. Build the application:

    go build -o lido-exporter cmd/lido-exporter/main.go
    
  2. Run the application:

    ./lido-exporter --node-operator-id <your_node_operator_id> --network <network_name>
    

Configuration

The service can be configured using the following methods (in order of precedence):

  1. Environment variables
  2. Command-line flags

Available settings:

  • LIDO_EXPORTER_NODE_OPERATOR_ID (required): Node Operator ID
  • LIDO_EXPORTER_REWARD_ADDRESS (optional): Reward address of Node Operator. It is used to calculate Node Operator ID if not set
  • LIDO_EXPORTER_NETWORK: Network name (default: "holesky")
  • LIDO_EXPORTER_RPC_ENDPOINTS: Comma-separated list of Ethereum RPC endpoints
  • LIDO_EXPORTER_WS_ENDPOINTS: Comma-separated list of Ethereum WebSocket endpoints
  • LIDO_EXPORTER_PORT: Port to listen on (default: "8080")
  • LIDO_EXPORTER_SCRAPE_TIME: Scrape interval (default: 30s)
  • LIDO_EXPORTER_LOG_LEVEL: Log level (default: "info")

Documentation

Overview

Copyright 2022 Nethermind

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL