Support constants in alarm configuration #10

Closed
opened 2026-06-23 10:55:56 +02:00 by minimons · 0 comments
Owner

Title: Support constants in alarm configuration

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.
minimons added the enhancement label 2026-06-23 10:55:56 +02:00
minimons self-assigned this 2026-06-23 10:55:56 +02:00
minimons added this to the AssetAZ project 2026-06-23 10:55:56 +02:00
minimons moved this to In Progress in AssetAZ on 2026-06-23 10:57:24 +02:00
minimons moved this to Done in AssetAZ on 2026-06-23 12:24:43 +02:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: r35157/com_r35157_nenjim-hubd-impl_ref#10