panic icon indicating copy to clipboard operation
panic copied to clipboard

Update Chainlink Node expire metrics/alerts to use unique redis alert store keys

Open Cherrett opened this issue 3 years ago • 0 comments

Technical Story

As the alert store, I want to avoid overwriting the gas bump increase over node gas price limit alert and the balance top up alert.

Description

Currently, we are storing the gas bump increase over node gas price limit alert and the balance top up alert in single redis keys. This is not ideal as multiple alerts of the same type within a given time frame will overwrite the previous alerts. To solve this issue, we must have a unique redis alert key for each alert (might need to use block ID). This is similar to what we have for chainlink contracts. These will be set with an expiry value and will be removed by a future component (#204).

Requirements

  • Update alert_chainlink_nodeX redis alert store keys and corresponding functions for the gas bump increase over node gas price limit alert and the top up alert to use block ID postfix
  • Add logic in alert store to cater for the new redis alert store keys
  • Update API/UI to cater for these new redis alert store keys
  • Update tests accordingly

Blocked by

N/A

Acceptance criteria

Scenario: The ChainlinkNodeStore is started Given: PANIC started When: Checking the log files inside the alerter/logs/stores and the docker-compose console Then: You can see correct startup

Scenario: The ChainlinkNodeStore has no error logs Given: PANIC is running When: Checking the log files inside the alerter/logs/stores Then: You can see no error logs

Scenario: The ChainlinkNodeStore is receiving alerts from the ChainlinkNodeAlerter Given: PANIC is running in Debug mode (by putting LOGGING_LEVEL=INFO inside the .env file and restarting panic) When: Checking the log files inside the alerter/logs/stores Then: You can see the correct alerts being received.

Scenario: The ChainlinkNodeStore is storing alerts correctly Given: PANIC is running in Debug mode (by putting LOGGING_LEVEL=INFO inside the .env file and restarting panic) When: Checking the log files inside the alerter/logs/stores Then: You can see the correct alerts stored in unique keys in Redis.

Scenario: The Telegram Commands Handler and Slack Commands Handler do not show any issues on /status and /panicstatus commands respectively. Given: PANIC is running with a Slack Commands Handler and Telegram Commands Handler When: Typing /status and /panicstatus Then: You can see that PANIC is running smoothly

Cherrett avatar May 19 '22 08:05 Cherrett