You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
└── low-liquidity.json # Custom email format for low liquidity alerts
57
74
```
58
75
59
76
## Alert Details
@@ -74,6 +91,18 @@ docker-compose/monitoring/
74
91
-**Trigger**: When log contains "Alert! - Subject: LPS has been penalized"
75
92
-**Purpose**: Alerts when the Liquidity Provider has been penalized for failing to fulfill quote commitments
76
93
94
+
### Hot Wallet Low Liquidity Warning Alert
95
+
-**Trigger**: When log contains "Alert! - Subject: Hot wallet: Low liquidity, refill recommended"
96
+
-**Purpose**: Alerts when the hot wallet liquidity is below the warning threshold
97
+
-**Dynamic extraction**: Uses LogQL `regexp` to extract `network`, `current`, and `threshold` from the log body and includes them in the notification via `{{ $labels.xxx }}`
98
+
-**Custom contact point**: Routed to `lps-email-low-liquidity` via `__contact_point__` for a tailored email format
99
+
100
+
### Hot Wallet Critical Low Liquidity Alert
101
+
-**Trigger**: When log contains "Alert! - Subject: Hot wallet: Critical low liquidity, refill required"
102
+
-**Purpose**: Alerts when the hot wallet liquidity is critically low and an immediate refill is required
103
+
-**Dynamic extraction**: Same as the warning alert -- extracts `network`, `current`, and `threshold` via `regexp`
104
+
-**Custom contact point**: Shares `lps-email-low-liquidity` with the warning alert via `__contact_point__`
105
+
77
106
## Configuration Details
78
107
79
108
### Alert Rule Settings
@@ -91,19 +120,33 @@ The alert JSON files use `"datasourceUid": "loki-uid"` by default.
91
120
92
121
The import script automatically replaces the datasource UID if you specify a different one via the `datasource_uid` parameter, making it portable across different Grafana instances.
- jq for JSON processing (optional, for verification)
125
+
In Grafana, a **contact point** bundles together the delivery channel (email, Slack, etc.), the recipient address, and the message template (subject, body format). In our setup the recipient is always the same (`ALERT_RECIPIENT_EMAIL`), so custom contact points are used solely to provide different **email formats** per alert type -- not different recipients.
126
+
127
+
The import script automatically:
128
+
- Creates a default `lps-email` contact point for all alerts, using the `ALERT_RECIPIENT_EMAIL` environment variable as the recipient
129
+
- Imports custom contact points from the `contact-points/` directory (e.g., `lps-email-low-liquidity` with a tailored subject/message format)
130
+
- Builds child routes from alert rules that declare a `__contact_point__` field, routing them to the named contact point
131
+
- Configures the notification policy with:
132
+
- A root route that sends all alerts to `lps-email` (default Grafana email format)
133
+
- Child routes that match specific alerts to their custom contact points (matched by `alertname`)
0 commit comments