Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Collators metrics polkadot_node_is_active_validator #2644

Open
BulatSaif opened this issue May 26, 2023 · 3 comments
Open

Collators metrics polkadot_node_is_active_validator #2644

BulatSaif opened this issue May 26, 2023 · 3 comments

Comments

@BulatSaif
Copy link
Contributor

I notice that the collator does not have polkadot_node_is_active_validator metric and I did not find any alternative. But relaychain part of the collator reports polkadot_node_is_active_validator=0 which creates false positive alerts.

  1. can we have polkadot_node_is_active_validator or a similar metric for parachain
  2. can we remove polkadot_node_is_active_validator from relaychain part of the collator if the --validator flag is not provided

Example of metrics:

polkadot_node_is_active_validator{chain="ksmcc3", instance="kusama-bridge-hub-collator-ue4-1", job="parachain", node="kusama-bridge-hub-collator-ue4-1", node_role="collator"}

cli which was used to run a node, as you can see no flag --validator only --collator but it set for parachain.

/home/parity/bin/kusama-bridge-hub --base-path /opt/chain-data --detailed-log-output --name kusama-bridge-hub-collator-ue4-1 --collator  --chain /home/parity/chainspecs/kusama-bridge-hub_parachain_chainspec.json --listen-addr=/ip4/0.0.0.0/tcp/30334 --in-peers 25 --out-peers 25  --state-pruning=archive -lparachain=debug,author=debug --prometheus-external --prometheus-port 9615 --ws-port 9955 --ws-max-connections 100 --rpc-port 9943 --wasm-execution=Compiled --execution wasm -- --name kusama-bridge-hub-collator-ue4-1 --chain kusama --listen-addr=/ip4/0.0.0.0/tcp/30333  --in-peers 25 --out-peers 25 --db-cache 512  --state-pruning=1000 --prometheus-external --prometheus-port 9625 --ws-port 9944 --ws-max-connections 100 --rpc-port 9933 --execution wasm
@bkchr
Copy link
Member

bkchr commented May 28, 2023

  1. can we have polkadot_node_is_active_validator or a similar metric for parachain

Probably better to remove this entirely and move the metric to Substrate.

2. can we remove polkadot_node_is_active_validator from relaychain part of the collator if the --validator flag is not provided

I would not remove metrics based on some flag. People will be confused why the flag doesn't exist.

@BulatSaif
Copy link
Contributor Author

I would not remove metrics based on some flag.

Me too, but it is current behavior of Polkadot:

  1. Validator node (--validator added)
# docker run -p 9615:9615 -it --rm parity/polkadot:v0.9.42 --prometheus-external --validator
curl -s 127.0.0.1:9615/metrics | grep  polkadot_node_is_active_validator
  # HELP polkadot_node_is_active_validator Tracks if the validator is in the active set. Updates at session boundary.
  # TYPE polkadot_node_is_active_validator gauge
  polkadot_node_is_active_validator{chain="polkadot"} 0
  1. Normal node
# docker run -p 9615:9615 -it --rm parity/polkadot:v0.9.42 --prometheus-external 

curl -s 127.0.0.1:9615/metrics | grep  polkadot_node_is_active_validator
  # empty line

It will be nice to have constancy between the standalone relaychain and embedded relaycahin in collator.

@bkchr
Copy link
Member

bkchr commented May 28, 2023

Ahh yeah because the subsystem doing this is not registered.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants