archway-network / relayer_exporter

Prometheus exporter for ibc metrics

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

relayer_exporter

Prometheus exporter for ibc clients and wallet balance. Returns metrics about clients expiration date. Returns wallet balance for configured addresses.

Configuration

Exporter needs config file in yaml format like following

rpc:
  - chainName: archway
    chainId: archway-1
    url: https://rpc.mainnet.archway.io:443
  - chainName: agoric
    chainId: agoric-3
    url: https://main.rpc.agoric.net:443
  - chainName: archwaytestnet
    chainId: constantine-3
    url: https://rpc.constantine.archway.tech:443
    timeout: 2s

github:
  org: archway-network
  repo: networks
  dir: _IBC
  testnetsDir: testnets/_IBC

accounts:
  - address: archway1l2al7y78500h5akvgt8exwnkpmf2zmk8ky9ht3
    chainName: archwaytestnet
    denom: aconst

During startup it fetches IBC paths from github based on provided config. If env var GITHUB_TOKEN is provided it will be used to make authenticated requests to GitHub API. Using provided RPC endpoints it gets clients expiration dates for fetched paths. Each RCP endpoint can have a different timeout specified. If env var GLOBAL_RPC_TIMEOUT (default 5s) is provided, it specifies the timeout for endpoints without having it defined.

For provided accounts it fetches wallet balances using endpoints defined in rpc list.

Metrics

# HELP cosmos_ibc_client_expiry Returns light client expiry in unixtime.
# TYPE cosmos_ibc_client_expiry gauge
cosmos_ibc_client_expiry{client_id="07-tendermint-23",host_chain_id="archway-1",status="success",target_chain_id="agoric-3"} 1.698153269e+09
cosmos_ibc_client_expiry{client_id="07-tendermint-75",host_chain_id="agoric-3",status="success",target_chain_id="archway-1"} 1.698153256e+09
# HELP cosmos_wallet_balance Returns wallet balance for an address on a chain
# TYPE cosmos_wallet_balance gauge
cosmos_wallet_balance{account="archway1l2al7y78500h5akvgt8exwnkpmf2zmk8ky9ht3",chain_id="constantine-3",denom="aconst",status="success"} 4.64e+18

About

Prometheus exporter for ibc metrics

License:Apache License 2.0


Languages

Language:Go 93.3%Language:Makefile 6.0%Language:Dockerfile 0.7%