Chainlink Alerting: Prometheus Balance Metric Investigation
Rationale
Recently we have released a hot-fix which caters for the following eth_balance structure found in the prometheus of Chainlink-based nodes:
eth_balance{account="0x12345",evmChainID="123"} 123.456
The evmChainID is used to get the currency moniker for the respective chain.
It was noted that on some Chainlink-based chains, this field is non-existent and is instead replaced with:
example_balance{account="0x12345",chainID="mainnet",chainSet="example",denomination="ABC"} 123.456
We must investigate the prometheus balance metric of different Chainlink-based chains/nodes to see how we should proceed.
One solution might be to search for the balance substring in all of the field names. This will then be parsed accordingly:
- Use already existing logic if we have
accountandevmChainIDfields. - Use new logic for using
denominationas the currency moniker if we don't have theevmChainIDfield and have theaccountanddenominationfields.
For ticket closure
- Have a list of different structures found in prometheus sources of various Chainlink-based chains/nodes.
- Decide on what will be done in the alerter to cater for these variations.
- Open tickets based on the point above.