Skip to content

Commit bad6eb7

Browse files
Ingest New Documentation (#2833)
Co-authored-by: Ancairon <70198089+Ancairon@users.noreply.github.com>
1 parent 3f443fc commit bad6eb7

3 files changed

Lines changed: 62 additions & 85 deletions

File tree

docs/Alerts & Notifications/Alert Configuration Reference.mdx

Lines changed: 58 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -545,13 +545,13 @@ lookup: METHOD(GROUPING OPTIONS) AFTER [at BEFORE] [every DURATION] [OPTIONS] [o
545545

546546
**Optional Parameters:**
547547

548-
| Parameter | Purpose | Details |
549-
|--------------------|-----------------------------|----------------------------------------------------------------------|
548+
| Parameter | Purpose | Details |
549+
|--------------------|-----------------------------|----------------------------------------------------------------------------|
550550
| `GROUPING OPTIONS` | Conditional processing | `CONDITION VALUE` where condition is `!=`, `=`, `==`, `\<=`, `<`, `>`, `>=` |
551-
| `at BEFORE` | End of lookup timeframe | Default is 0 (now) |
552-
| `every DURATION` | Update frequency | Supports `s`, `m`, `h`, `d` units |
553-
| `OPTIONS` | Processing modifiers | See options table below |
554-
| `of DIMENSIONS` | Which dimensions to include | Space-separated list, supports patterns |
551+
| `at BEFORE` | End of lookup timeframe | Default is 0 (now) |
552+
| `every DURATION` | Update frequency | Supports `s`, `m`, `h`, `d` units |
553+
| `OPTIONS` | Processing modifiers | See options table below |
554+
| `of DIMENSIONS` | Which dimensions to include | Space-separated list, supports patterns |
555555

556556
**Processing Options:**
557557

@@ -905,7 +905,7 @@ How to write calculations and use variables in your alert definitions. Essential
905905
|------------|----------------------------------------|---------------------------|
906906
| Arithmetic | `+`, `-`, `*`, `/` | Numeric values |
907907
| Comparison | `<`, `==`, `\<=`, `<>`, `!=`, `>`, `>=` | `1` (true) or `0` (false) |
908-
| Logical | `&&`, `||`, `!`, `AND`, `OR`, `NOT` | `1` (true) or `0` (false) |
908+
| Logical | `&&`, `||`,`!`,`AND`,`OR`,`NOT` | `1` (true) or `0` (false) |
909909

910910
**Special Functions:**
911911

@@ -1499,6 +1499,7 @@ warn: $this > (($status >= $WARNING) ? (75) : (80))
14991499
**Debug Steps:**
15001500

15011501
1. **Check Available Variables:**
1502+
15021503
```
15031504
http://NODE:19999/api/v1/alarm_variables?chart=CHART_NAME
15041505
```
@@ -1517,12 +1518,14 @@ warn: $this > (($status >= $WARNING) ? (75) : (80))
15171518
**Safe Testing Process:**
15181519

15191520
1. **Create Test File:**
1521+
15201522
```bash
15211523
sudo touch health.d/test-alert.conf
15221524
sudo ./edit-config health.d/test-alert.conf
15231525
```
15241526

15251527
2. **Write Simple Alert:**
1528+
15261529
```text
15271530
alarm: test_ram
15281531
on: system.ram
@@ -1533,12 +1536,14 @@ warn: $this > (($status >= $WARNING) ? (75) : (80))
15331536
```
15341537

15351538
3. **Reload and Monitor:**
1539+
15361540
```bash
15371541
sudo netdatacli reload-health
15381542
# Watch dashboard for test alert appearance
15391543
```
15401544

15411545
4. **Remove When Done:**
1546+
15421547
```bash
15431548
sudo rm health.d/test-alert.conf
15441549
sudo netdatacli reload-health
@@ -1570,16 +1575,19 @@ warn: $this > (($status >= $WARNING) ? (75) : (80))
15701575
When seeking help, include:
15711576

15721577
1. **Alert Configuration:**
1578+
15731579
```text
15741580
# Your complete alert definition
15751581
```
15761582

15771583
2. **Chart Information:**
1584+
15781585
```
15791586
http://your-server:19999/api/v1/alarm_variables?chart=chart_name
15801587
```
15811588

15821589
3. **Current Status:**
1590+
15831591
```
15841592
http://your-server:19999/api/v1/alarms?all
15851593
```
@@ -1590,6 +1598,49 @@ When seeking help, include:
15901598
- [Netdata Community Forum](https://community.netdata.cloud)
15911599
- [Netdata Discord](https://discord.com/invite/2mEmfW735j)
15921600

1601+
### Alert Notification Variables
1602+
1603+
The following variables are available in alert notification templates and custom notification scripts:
1604+
1605+
| Variable name | Description |
1606+
|:---------------------------:|:---------------------------------------------------------------------------------------------------------------------------------------------|
1607+
| `${alarm}` | Like "name = value units" |
1608+
| `${status_message}` | Like "needs attention", "recovered", "is critical" |
1609+
| `${severity}` | Like "Escalated to CRITICAL", "Recovered from WARNING" |
1610+
| `${raised_for}` | Like "(alarm was raised for 10 minutes)" |
1611+
| `${host}` | The host generated this event |
1612+
| `${url_host}` | Same as `${host}` but URL encoded |
1613+
| `${unique_id}` | The unique id of this event |
1614+
| `${alarm_id}` | The unique id of the alarm that generated this event |
1615+
| `${event_id}` | The incremental id of the event, for this alarm id |
1616+
| `${when}` | The timestamp this event occurred |
1617+
| `${date}` | The date and time the event occurred (local timezone) |
1618+
| `${date_utc}` | The date and time the event occurred (UTC) |
1619+
| `${name}` | The name of the alarm, as given in netdata health.d entries |
1620+
| `${url_name}` | Same as `${name}` but URL encoded |
1621+
| `${chart}` | The name of the chart (type.id) |
1622+
| `${url_chart}` | Same as `${chart}` but URL encoded |
1623+
| `${status}` | The current status: REMOVED, UNINITIALIZED, UNDEFINED, CLEAR, WARNING, CRITICAL |
1624+
| `${old_status}` | The previous status: REMOVED, UNINITIALIZED, UNDEFINED, CLEAR, WARNING, CRITICAL |
1625+
| `${value}` | The current value of the alarm |
1626+
| `${old_value}` | The previous value of the alarm |
1627+
| `${src}` | The line number and file the alarm has been configured |
1628+
| `${duration}` | The duration in seconds of the previous alarm state |
1629+
| `${duration_txt}` | Same as `${duration}` for humans |
1630+
| `${non_clear_duration}` | The total duration in seconds this is/was non-clear. For repeating alerts in WARNING or CRITICAL state, Netdata sends `${duration}` instead. |
1631+
| `${non_clear_duration_txt}` | Same as `${non_clear_duration}` for humans |
1632+
| `${units}` | The units of the value |
1633+
| `${info}` | A short description of the alarm |
1634+
| `${value_string}` | Friendly value (with units) |
1635+
| `${old_value_string}` | Friendly old value (with units) |
1636+
| `${image}` | The URL of an image to represent the status of the alarm |
1637+
| `${color}` | A color in #AABBCC format for the alarm |
1638+
| `${goto_url}` | The URL the user can click to see the netdata dashboard |
1639+
| `${calc_expression}` | The expression evaluated to provide the value for the alarm |
1640+
| `${calc_param_values}` | The values of the variables in the evaluated expression |
1641+
| `${total_warnings}` | The total number of alarms in WARNING state on the host |
1642+
| `${total_critical}` | The total number of alarms in CRITICAL state on the host |
1643+
15931644
## Related Pages
15941645

15951646
- [Alerts Automation](/docs/netdata-ai/alerts-automation) - Create and tune alerts using natural language with AI assistance (no manual configuration needed)

docs/Alerts & Notifications/Notifications/Agent Dispatched Notifications/AWS SNS.mdx

Lines changed: 3 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ You can send notifications through Amazon SNS using Netdata's Agent alert notifi
3232
## Limitations
3333

3434
- While Amazon SNS supports sending differently formatted messages for different delivery methods, Netdata does not currently support this functionality.
35-
- For email notification support, we recommend using Netdata's email notifications, as it is has the following benefits:
35+
- For email notification support, we recommend using Netdata's email notifications, as it has the following benefits:
3636
- In most cases, it requires less configuration.
3737
- Netdata's emails are nicely pre-formatted and support features like threading, which requires a lot of manual effort in SNS.
3838
- It is less resource intensive and more cost-efficient than SNS.
@@ -68,50 +68,13 @@ The following options can be defined for this notification
6868
|:-----|:------------|:--------|:---------:|
6969
| aws path | The full path of the aws command. If empty, the system `$PATH` will be searched for it. If not found, Amazon SNS notifications will be silently disabled. | | yes |
7070
| SEND_AWSNS | Set `SEND_AWSNS` to YES | YES | yes |
71-
| [AWSSNS_MESSAGE_FORMAT](#option-awssns-message-format) | Set `AWSSNS_MESSAGE_FORMAT` to to the string that you want the alert to be sent into. | $\{status} on $\{host} at $\{date}: $\{chart} $\{value_string} | yes |
71+
| [AWSSNS_MESSAGE_FORMAT](#option-awssns-message-format) | Set `AWSSNS_MESSAGE_FORMAT` to the string that you want the alert to be sent into. | $\{status} on $\{host} at $\{date}: $\{chart} $\{value_string} | yes |
7272
| [DEFAULT_RECIPIENT_AWSSNS](#option-default-recipient-awssns) | Set `DEFAULT_RECIPIENT_AWSSNS` to the Topic ARN you noted down upon creating the Topic. | | yes |
7373

7474
<a id="option-awssns-message-format"></a>
7575
##### AWSSNS_MESSAGE_FORMAT
7676

77-
The supported variables are:
78-
79-
| Variable name | Description |
80-
|:---------------------------:|:---------------------------------------------------------------------------------|
81-
| `${alarm}` | Like "name = value units" |
82-
| `${status_message}` | Like "needs attention", "recovered", "is critical" |
83-
| `${severity}` | Like "Escalated to CRITICAL", "Recovered from WARNING" |
84-
| `${raised_for}` | Like "(alarm was raised for 10 minutes)" |
85-
| `${host}` | The host generated this event |
86-
| `${url_host}` | Same as $\{host} but URL encoded |
87-
| `${unique_id}` | The unique id of this event |
88-
| `${alarm_id}` | The unique id of the alarm that generated this event |
89-
| `${event_id}` | The incremental id of the event, for this alarm id |
90-
| `${when}` | The timestamp this event occurred |
91-
| `${name}` | The name of the alarm, as given in netdata health.d entries |
92-
| `${url_name}` | Same as $\{name} but URL encoded |
93-
| `${chart}` | The name of the chart (type.id) |
94-
| `${url_chart}` | Same as $\{chart} but URL encoded |
95-
| `${status}` | The current status : REMOVED, UNINITIALIZED, UNDEFINED, CLEAR, WARNING, CRITICAL |
96-
| `${old_status}` | The previous status: REMOVED, UNINITIALIZED, UNDEFINED, CLEAR, WARNING, CRITICAL |
97-
| `${value}` | The current value of the alarm |
98-
| `${old_value}` | The previous value of the alarm |
99-
| `${src}` | The line number and file the alarm has been configured |
100-
| `${duration}` | The duration in seconds of the previous alarm state |
101-
| `${duration_txt}` | Same as $\{duration} for humans |
102-
| `${non_clear_duration}` | The total duration in seconds this is/was non-clear |
103-
| `${non_clear_duration_txt}` | Same as $\{non_clear_duration} for humans |
104-
| `${units}` | The units of the value |
105-
| `${info}` | A short description of the alarm |
106-
| `${value_string}` | Friendly value (with units) |
107-
| `${old_value_string}` | Friendly old value (with units) |
108-
| `${image}` | The URL of an image to represent the status of the alarm |
109-
| `${color}` | A color in AABBCC format for the alarm |
110-
| `${goto_url}` | The URL the user can click to see the netdata dashboard |
111-
| `${calc_expression}` | The expression evaluated to provide the value for the alarm |
112-
| `${calc_param_values}` | The value of the variables in the evaluated expression |
113-
| `${total_warnings}` | The total number of alarms in WARNING state on the host |
114-
| `${total_critical}` | The total number of alarms in CRITICAL state on the host |
77+
For the complete list of supported notification variables, see the [Alert Notification Variables](/docs/alerts-&-notifications/alert-configuration-reference#alert-notification-variables) section in the Health Reference.
11578

11679

11780
<a id="option-default-recipient-awssns"></a>

0 commit comments

Comments
 (0)