Allow constants to be declared in alarms.conf and reused later in alarm definitions.
Example:
{{SOL_ENTRY_PRICE}} 69.86
{{SOL_LIQ_PRICE}} 92.96
1 SOL ABOVE {{SOL_LIQ_PRICE}}-1.25% ONETIME CRITICAL "CRITICAL: Perps Solana short LIQUIDATION risk!"
2 SOL ABOVE {{SOL_ENTRY_PRICE}}+3% PERSISTENT INFO "INcrease SOL Short (buy)"
3 SOL BELOW {{SOL_ENTRY_PRICE}}-3% PERSISTENT INFO "DEcrease SOL Short (close)"
Rules for the first version:
Constants must use the format {{NAME}} value
Constants must be declared before they are used
Duplicate constants should fail parsing
Unknown constants should fail parsing
Constant substitution should happen before parsing the alarm line
Recursive constants are not required in the first version
This should make alarms.conf easier to maintain when several alarms are based on the same entry price, liquidation price, or similar shared value.
Title: Support constants in alarm configuration
Allow constants to be declared in `alarms.conf` and reused later in alarm definitions.
Example:
```text
{{SOL_ENTRY_PRICE}} 69.86
{{SOL_LIQ_PRICE}} 92.96
1 SOL ABOVE {{SOL_LIQ_PRICE}}-1.25% ONETIME CRITICAL "CRITICAL: Perps Solana short LIQUIDATION risk!"
2 SOL ABOVE {{SOL_ENTRY_PRICE}}+3% PERSISTENT INFO "INcrease SOL Short (buy)"
3 SOL BELOW {{SOL_ENTRY_PRICE}}-3% PERSISTENT INFO "DEcrease SOL Short (close)"
```
Rules for the first version:
* Constants must use the format `{{NAME}} value`
* Constants must be declared before they are used
* Duplicate constants should fail parsing
* Unknown constants should fail parsing
* Constant substitution should happen before parsing the alarm line
* Recursive constants are not required in the first version
This should make `alarms.conf` easier to maintain when several alarms are based on the same entry price, liquidation price, or similar shared value.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Title: Support constants in alarm configuration
Allow constants to be declared in
alarms.confand reused later in alarm definitions.Example:
Rules for the first version:
{{NAME}} valueThis should make
alarms.confeasier to maintain when several alarms are based on the same entry price, liquidation price, or similar shared value.