Collators metrics polkadot_node_is_active_validator
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.
- can we have
polkadot_node_is_active_validatoror a similar metric for parachain - can we remove
polkadot_node_is_active_validatorfrom relaychain part of the collator if the--validatorflag 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
- can we have
polkadot_node_is_active_validatoror 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_validatorfrom relaychain part of the collator if the--validatorflag is not provided
I would not remove metrics based on some flag. People will be confused why the flag doesn't exist.
I would not remove metrics based on some flag.
Me too, but it is current behavior of Polkadot:
- Validator node (
--validatoradded)
# 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
- 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.
Ahh yeah because the subsystem doing this is not registered.