Skip to content

a prometheus exporter for Findora Network

License

Notifications You must be signed in to change notification settings

FindoraNetwork/findora-exporter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

findora-exporter

ci status

a Prometheus exporter for Findora Network

Features

Findora is using tendermint for its own consensus network. tendermint already exposed a lot of wonderful metrics but there have some customize requests that needs to be monitored.

This exporter has below custom metrics right now!

name help
ConsensusPower percentage of the current consensus network voting power
NetworkFunctional subtraction of seconds of the latest block time with the current time
TotalCountOfValidators the total number of validators from the consensus network
TotalBalanceOfRelayers the total balance value of relayers from the specific bridge ( this metric displays with 6 digits as the fractional part so need to divide the metric value by 10 to the power of 6 )
BridgedBalance the specific token balance of reserving safe on source chain ( this metric displays with 6 digits as the fractional part so need to divide the metric value by 10 to the power of 6 )
BridgedSupply the token supply total minted on the destination chain ( this metric displays with 6 digits as the fractional part so need to divide the metric value by 10 to the power of 6 )
NavtiveBalance the native balance of reserving safe on source chain ( this metric displays with 6 digits as the fractional part so need to divide the metric value by 10 to the power of 6 )
GetPrice the close price of the related currency pair from gate.io ( this metric displays with 6 digits as the fractional part so need to divide the metric value by 10 to the power of 6 )

Installation

Please download the suitable asset from

findora-exporter prebuilt

This project follows Semantic Versioning

From Deb Package

Install it by below command

dpkg --install findora-exporter_x.x.x_amd64.deb

After that

  • An executable binary will be put into /usr/local/bin/findora-exporter
  • A systemd findora-exporter.service will be loaded
  • expecting a config file at /etc/prometheus/findora_exporter_config.json
  • expecting an user named ubuntu
$ systemctl status findora-exporter.service
● findora-exporter.service - Findora Exporter for Prometheus
     Loaded: loaded (/lib/systemd/system/findora-exporter.service; enabled; vendor preset: enabled)
     Active: inactive (dead)

From Tarball

Extracting it by below command

tar -xzf findora-exporter-x.x.x-x86_64-unknown-linux-musl.tar.gz

From Container Runner

# docker is also the same!
podman pull ghcr.io/findoranetwork/findora-exporter:latest
podman run --rm -v ./config.json:/config.json -p 9090:9090 ghcr.io/findoranetwork/findora-exporter --config /config.json 

From Source Code

Installing Rust

  • Running test by
$ cargo test --all --all-features --no-fail-fast
test result: ok. x passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s
  • Building it by
cargo build --release

Default Configuration Behavior

  • listening 127.0.0.1:9090 address for Prometheus scraping
  • crawling http://127.0.0.1:26657 and doing task NetworkFunctional every 15 seconds
  • displaying trace level information

Specific A Configuration

for example

{
    "log_level": "error",
    "server": {
        "listen_addr": "127.0.0.1:8080"
    },
    "crawler": {
        "targets": [
            {
                "host_addr": "https://prod-testnet.prod.findora.org:26657",
                "task_name": "ConsensusPower",
                "registry": 
                    {
                        "prefix": "findora_exporter",
                        "env": "prod-testnet"
                    }
            },
            {
                "host_addr": "https://prod-mainnet.prod.findora.org:26657",
                "task_name": "NetworkFunctional",
                "registry": 
                    {
                        "prefix": "findora_exporter",
                        "env": "prod-mainnet"
                    }
            }
        ]
    }
}

Contributing

This project's goal is to provide the custom metrics by

  • Small size of binary as possible
  • Reasonable responding time for Prometheus
  • Reliable value for monitoring and alerting

I'd very admire the ureq project's this maxim.

so, welcomes any kind of suggestions or ideas please just create an issue or make a PR!