Categorygithub.com/kilnfi/near-validator-watcher
modulepackage
0.6.0
Repository: https://github.com/kilnfi/near-validator-watcher.git
Documentation: pkg.go.dev

# README

Near Validator Watcher

License

Near Validator Watcher is a Prometheus exporter to help you monitor missed blocks & chunks of your validator.

Near Validator Watcher Grafana Dashboard (Prometheus Exporter)

✨ Usage

Example on mainnet using the default RPC endpoint.

Via compiled binary

Compiled binary can be found on the Releases page.

near-validator-watcher \
  --node https://rpc.mainnet.near.org \
  --validator kiln-1.poolv1.near

Via Docker

Latest Docker image can be found on the Packages page.

docker run --rm ghcr.io/kilnfi/near-validator-watcher:latest \
  --node https://rpc.mainnet.near.org \
  --validator kiln-1.poolv1.near

Available options

near-validator-watcher --help

NAME:
   near-validator-watcher - NEAR validators monitoring tool

USAGE:
   near-validator-watcher [global options] command [command options] [arguments...]

COMMANDS:
   help, h  Shows a list of commands or help for one command

GLOBAL OPTIONS:
   --http-addr value                        http server address (default: ":8080")
   --log-level value                        log level (debug, info, warn, error) (default: "info")
   --namespace value                        prefix for Prometheus metrics (default: "near_validator_watcher")
   --no-color                               disable colored output (default: false)
   --node value                             rpc node endpoint to connect to (default: "https://rpc.mainnet.near.org")
   --refresh-rate value                     how often to call the rpc endpoint (default: 10s)
   --validator value [ --validator value ]  validator pool id to track
   --help, -h                               show help
   --version, -v                            print the version

❇️ Endpoints

  • /metrics exposed Prometheus metrics (see next section)
  • /ready responds OK when the node is synced
  • /live responds OK as soon as server is up & running correctly

📊 Prometheus metrics

All metrics are by default prefixed by near_validator_watcher but this can be changed through options.

Metrics (without prefix)Description
block_numberThe number of most recent block
chain_idNear chain id
current_proposals_stakeCurrent proposals
epoch_lengthNear epoch length as specified in the protocol
epoch_start_heightNear epoch start height
next_validator_stakeThe next validators
prev_epoch_kickoutNear previous epoch kicked out validators
protocol_versionCurrent protocol version deployed to the blockchain
seat_priceValidator seat price
sync_stateSync state
validator_blocks_expectedCurrent amount of validator expected blocks
validator_blocks_producedCurrent amount of validator produced blocks
validator_chunks_expectedCurrent amount of validator expected chunks
validator_chunks_producedCurrent amount of validator produced chunks
validator_rankCurrent rank of validator based on stake
validator_slashedValidators slashed
validator_stakeCurrent amount of validator stake
version_buildThe Near node version build

📃 License

MIT License.

# Packages

No description provided by the author

# Variables

generated at build time.