82
### Task 2: Disable Unwanted Alerts
83
84
| Method | Use Case | Configuration File | How To |
85
-|-------------------------|-------------------------------------|--------------------|------------------------------------------|
85
+| ----------------------- | ----------------------------------- | ------------------ | ---------------------------------------- |
86
| Disable all alerts | Testing/maintenance | netdata.conf | Set `enabled = no` in `[health]` section |
87
| Disable specific alerts | Remove noisy alerts | netdata.conf | Set `enabled alarms = !alert_name *` |
88
| Silence notifications | Keep monitoring, stop notifications | Alert config file | Change `to: silent` |
138
**Configuration Locations:**
139
140
| Location | Purpose | Common Tasks | How to Edit |
141
-|-----------------------------------|------------------------------|----------------------------------------------------------------------------------------------------------|------------------------------------------|
141
+| --------------------------------- | ---------------------------- | -------------------------------------------------------------------------------------------------------- | ---------------------------------------- |
142
| `netdata.conf` `[health]` section | Global health settings | • Disable all monitoring (`enabled = no`)<br />• Disable specific alerts<br />• Change check frequencies | Edit directly or use `edit-config` |
143
| `health.d/*.conf` files | Individual alert definitions | • Modify thresholds<br />• Change notification recipients<br />• Silence alerts (`to: silent`) | Use `edit-config health.d/filename.conf` |
144
223
**Use Case:** Scheduled maintenance or dynamic control
224
225
| Scenario | Solution | Method |
226
-|------------------------------------|--------------------------------------------|------------------------------------|
226
+| ---------------------------------- | ------------------------------------------ | ---------------------------------- |
227
| Disable alerts during backups | Use health management API | API calls without config changes |
228
| Suppress notifications temporarily | Keep checks running, silence notifications | API control of notification system |
229
273
**Step 3: Understand Each Component**
274
275
| Line | Purpose | This Example |
276
-|-------------|-------------------------------------------|-------------------------------------------------------|
276
+| ----------- | ----------------------------------------- | ----------------------------------------------------- |
277
| `alarm` | Entity name (alphanumeric, `.`, `_` only) | `ram_usage` |
278
| `on` | Chart to monitor | `system.ram` |
279
| `lookup` | How to process metrics | Average last 1 minute, percentage of `used` dimension |
311
### Entity Types Overview
312
313
| Type | Label | Purpose | Example Use Case |
314
-|---------------|-------------|----------------------------------|--------------------------------|
314
+| ------------- | ----------- | -------------------------------- | ------------------------------ |
315
| **Alerts** | `alarm:` | Attached to specific charts | Monitor specific server's CPU |
316
| **Templates** | `template:` | Apply to all charts of a context | Monitor all network interfaces |
317
350
### Complete Configuration Reference
351
352
| line | required | functionality |
353
-|-----------------------------------------------------|-----------------|--------------------------------------------------------------------------------------|
353
+| --------------------------------------------------- | --------------- | ------------------------------------------------------------------------------------ |
354
| [`alarm`/`template`](#alert-line-alarm-or-template) | yes | Name of the alert/template |
355
| [`on`](#alert-line-on) | yes | The chart this alert should attach to |
356
| [`class`](#alert-line-class) | no | The general alert classification |
444
**Available Classes:**
445
446
| Class | Use Case |
447
-|-------------|--------------------------------|
447
+| ----------- | ------------------------------ |
448
| Errors | Error rate monitoring |
449
| Latency | Response time issues |
450
| Utilization | Resource usage monitoring |
469
**Available Types:**
470
471
| Type | Description |
472
-|-----------------|------------------------------------------------------------------------------------------------|
472
+| --------------- | ---------------------------------------------------------------------------------------------- |
473
| Ad Filtering | Services related to Ad Filtering (like pi-hole) |
474
| Certificates | Certificate monitoring related |
475
| Cgroups | Alerts for CPU and memory usage of control groups |
529
**Required Parameters:**
530
531
| Parameter | Description | Example |
532
-|-----------|--------------------------------------------------------------------|-------------------------|
532
+| --------- | ------------------------------------------------------------------ | ----------------------- |
533
| `METHOD` | [Grouping method](/src/web/api/queries/README.md#grouping-methods) | `average`, `min`, `max` |
534
| `AFTER` | How far back to look (negative number) | `-1m`, `-1h`, `-1d` |
535
536
**Optional Parameters:**
537
538
| Parameter | Purpose | Details |
539
-|--------------------|-----------------------------|----------------------------------------------------------------------------|
539
+| ------------------ | --------------------------- | -------------------------------------------------------------------------- |
540
| `GROUPING OPTIONS` | Conditional processing | `CONDITION VALUE` where condition is `!=`, `=`, `==`, `<=`, `<`, `>`, `>=` |
541
| `at BEFORE` | End of lookup timeframe | Default is 0 (now) |
542
| `every DURATION` | Update frequency | Supports `s`, `m`, `h`, `d` units |
543
| `OPTIONS` | Processing modifiers | See options table below |
544
-| `of DIMENSIONS` | Which dimensions to include | Space-separated list, supports patterns |
544
+| `of DIMENSIONS` | Which dimensions to include | Comma- or pipe-separated list, supports patterns; prefer `user,system` over `user, system` |
545
546
**Processing Options:**
547
548
-| Option | Effect |
549
-|---------------|---------------------------------------------------------|
550
-| `percentage` | Calculate percentage of selected dimensions over total |
551
-| `absolute` | Turn all sample values positive |
552
-| `min` | Return minimum of all dimensions after time-aggregation |
553
-| `max` | Return maximum of all dimensions after time-aggregation |
554
-| `average` | Return average of all dimensions after time-aggregation |
555
-| `sum` | Return sum of all dimensions (default) |
556
-| `min2max` | Return delta between min and max of dimensions |
557
-| `unaligned` | Prevent shifting query window to multiples of duration |
558
-| `match-ids` | Match dimensions by IDs (default) |
559
-| `match-names` | Match dimensions by names |
548
+| Option | Effect |
549
+| ------------- | -------------------------------------------------------------------------------------------------------- |
550
+| `percentage` | Calculate percentage of selected dimensions over total |
551
+| `absolute` | Turn all sample values positive |
552
+| `min` | Return minimum of all dimensions after time-aggregation |
553
+| `max` | Return maximum of all dimensions after time-aggregation |
554
+| `average` | Return average of all dimensions after time-aggregation |
555
+| `sum` | Return sum of all dimensions (default) |
556
+| `min2max` | Return delta between min and max of dimensions |
557
+| `unaligned` | Prevent shifting query window to multiples of duration |
558
+| `anomaly-bit` | Query anomaly-rate percentages (0-100) instead of raw values, enabling anomaly-rate-based alerting |
559
+| `match-ids` | Match dimensions by IDs (default) |
560
+| `match-names` | Match dimensions by names |
561
+
562
+When `anomaly-bit` is used, each data point returns the anomaly rate as a percentage from 0 to 100. At native resolution this is typically 0 (normal) or 100 (anomalous), while aggregated or lower-resolution data can yield intermediate values such as 12.5. For more details and practical examples, see the [ML anomaly detection documentation](/docs/ml-ai/ml-anomaly-detection/ml-anomaly-detection.md).
563
564
**Example:**
565
694
**Parameters:**
695
696
| Parameter | Purpose | Default |
694
-|----------------|--------------------------------------------------------------|---------------|
697
+| -------------- | ------------------------------------------------------------ | ------------- |
698
| `up U` | Delay for status increases (CLEAR→WARNING, WARNING→CRITICAL) | 0 |
699
| `down D` | Delay for status decreases (CRITICAL→WARNING, WARNING→CLEAR) | 0 |
700
| `multiplier M` | Multiplies U and D when alert changes state during delay | 1.0 |
709
Starting at `00:00:00` with CLEAR status:
710
711
| Time | New Status | Delay Applied | Notification At | Reason |
709
-|----------|------------|----------------|-----------------|-------------------------------------------|
712
+| -------- | ---------- | -------------- | --------------- | ----------------------------------------- |
713
| 00:00:01 | WARNING | `up 10s` | 00:00:11 | First state switch |
714
| 00:00:05 | CLEAR | `down 15m x2` | 00:30:05 | Alert changed during delay, so multiplied |
715
| 00:00:06 | WARNING | `up 10s x2 x2` | 00:00:26 | Multiplied twice |
725
**Options:**
726
727
| Option | Effect |
725
-|---------------------|----------------------------------------------------------|
728
+| ------------------- | -------------------------------------------------------- |
729
| `off` | Turns off repeating for this alert |
730
| `warning DURATION` | Repeat interval for WARNING state (use `0s` to disable) |
731
| `critical DURATION` | Repeat interval for CRITICAL state (use `0s` to disable) |
825
**Variable Support:**
826
827
| Variable | Replaced With |
825
-|-----------------------|------------------------------|
828
+| --------------------- | ---------------------------- |
829
| `${family}` | Family instance (e.g., eth0) |
830
| `${label:LABEL_NAME}` | Chart label value |
831
854
**Variable Support:**
855
856
| Variable | Replaced With |
854
-|-----------------------|------------------------------|
857
+| --------------------- | ---------------------------- |
858
| `${family}` | Family instance (e.g., eth0) |
859
| `${label:LABEL_NAME}` | Chart label value |
860
895
**Supported Operators:**
896
897
| Type | Operators | Result |
895
-|------------|----------------------------------------|---------------------------|
898
+| ---------- | -------------------------------------- | ------------------------- |
899
| Arithmetic | `+`, `-`, `*`, `/` | Numeric values |
900
| Comparison | `<`, `==`, `<=`, `<>`, `!=`, `>`, `>=` | `1` (true) or `0` (false) |
898
-| Logical | `&&`, `||`,`!`,`AND`,`OR`,`NOT` | `1` (true) or `0` (false) |
901
+| Logical | `&&`, `||`,`!`,`AND`,`OR`,`NOT` | `1` (true) or `0` (false) |
902
903
**Special Functions:**
904
908
**Special Values:**
909
910
| Value | Purpose | Example Use |
908
-|-------|---------------------------------------|----------------|
911
+| ----- | ------------------------------------- | -------------- |
912
| `nan` | Not a number (database lookup failed) | `$this != nan` |
913
| `inf` | Infinite (division by zero) | `$this != inf` |
914
932
**How This Works:**
933
934
| Alert State | Triggers At | Clears At | Explanation |
932
-|-------------|-------------|-----------|-------------------------------------------------------------------|
935
+| ----------- | ----------- | --------- | ----------------------------------------------------------------- |
936
| Warning | 85% CPU | 75% CPU | Creates 10% buffer - CPU must drop below 75% to clear warning |
937
| Critical | 95% CPU | 85% CPU | Creates 10% buffer - CPU must drop below 85% to return to warning |
938
972
**Special Chart Variables:**
973
974
| Variable | Contains |
972
-|------------------------|-----------------------------------------------|
975
+| ---------------------- | --------------------------------------------- |
976
| `$last_collected_t` | Unix timestamp of last data collection |
977
| `$collected_total_raw` | Sum of all dimensions (last collected values) |
978
| `$update_every` | Update frequency of the chart |
1047
#### Special Variables
1048
1049
| Variable | Contains | Usage |
1047
-|-----------|------------------------|----------------------------------------|
1050
+| --------- | ---------------------- | -------------------------------------- |
1051
| `$this` | Current alert value | Result of `calc` line or current alert |
1052
| `$status` | Current alert status | Compare with status constants |
1053
| `$now` | Current unix timestamp | Time-based calculations |
1055
**Alert Status Constants:**
1056
1057
| Constant | Numeric Value | Usage |
1055
-|------------------|---------------|--------------------------------|
1058
+| ---------------- | ------------- | ------------------------------ |
1059
| `$REMOVED` | -2 | Alert deleted (SIGUSR2 reload) |
1060
| `$UNINITIALIZED` | -1 | Alert not initialized |
1061
| `$UNDEFINED` | 0 | Calculation failed |
1125
**How It Works:**
1126
1127
| Component | Purpose | This Example |
1125
-|------------|---------------------------------|------------------------------|
1128
+| ---------- | ------------------------------- | ---------------------------- |
1129
| `template` | Applies to all Apache servers | `apache_last_collected_secs` |
1130
| `on` | Chart context to monitor | `apache.requests` |
1131
| `calc` | Time since last data collection | `$now - $last_collected_t` |
1163
**How It Works:**
1164
1165
| Component | Purpose | This Example |
1163
-|-------------|----------------------------|----------------------------------------|
1166
+| ----------- | -------------------------- | -------------------------------------- |
1167
| `template` | Applies to all disks | `disk_full_percent` |
1168
| `on` | Chart context | `disk.space` |
1169
| `calc` | Calculate usage percentage | `$used * 100 / ($avail + $used)` |
1209
**How It Works:**
1210
1211
| Step | Purpose | Calculation |
1209
-|------|----------------------|----------------------------------------------------|
1212
+| ---- | -------------------- | -------------------------------------------------- |
1213
| 1 | Calculate fill rate | `(space_30min_ago - current_space) / 1800_seconds` |
1214
| 2 | Predict time to full | `current_available / fill_rate / 3600` |
1215
1240
**How It Works:**
1241
1242
| Component | Purpose | This Example |
1240
-|------------|-----------------------------------|-------------------------------|
1243
+| ---------- | --------------------------------- | ----------------------------- |
1244
| `template` | Applies to all network interfaces | `30min_packet_drops` |
1245
| `lookup` | Sum drops over 30 minutes | `sum -30m unaligned absolute` |
1246
| `crit` | Any drops trigger critical | `$this > 0` |
1284
**How It Works:**
1285
1286
| Alert | Purpose | Calculation |
1284
-|-------------------|-----------------------------|------------------------------------|
1287
+| ----------------- | --------------------------- | ---------------------------------- |
1288
| `cpu_user_mean` | Calculate average CPU usage | Mean over 60 seconds |
1289
| `cpu_user_stddev` | Calculate variability | Standard deviation over 60 seconds |
1290
| `cpu_user_zscore` | Detect anomalies | `(current - mean) / stddev` |
1314
units: %
1315
every: 30s
1316
warn: $this > (($status >= $WARNING) ? (5) : (20))
1314
- crit: $this > (($status == $CRITICAL) ? (20) : (100))
1317
+ crit: $this >= (($status == $CRITICAL) ? (20) : (100))
1318
info: rolling 5min anomaly rate for system.cpu chart
1319
```
1320
1321
**How It Works:**
1322
1323
| Component | Purpose | This Example |
1321
-|---------------|--------------------------------------------|-------------------------------------|
1324
+| ------------- | ------------------------------------------ | ----------------------------------- |
1325
| `lookup` | Average anomaly rate across CPU dimensions | 5-minute rolling window |
1326
| Hysteresis | Prevent alert flapping | Warning: 20%→5%, Critical: 100%→20% |
1324
-| `anomaly-bit` | ML-generated anomaly indicators | 0 (normal) or 1 (anomalous) |
1327
+| `anomaly-bit` | ML-generated anomaly indicators | 0 (normal) or 100 (anomalous) |
1328
1329
<br/>
1330
</details>
1344
units: %
1345
every: 30s
1346
warn: $this > (($status >= $WARNING) ? (5) : (20))
1344
- crit: $this > (($status == $CRITICAL) ? (20) : (100))
1347
+ crit: $this >= (($status == $CRITICAL) ? (20) : (100))
1348
info: rolling 5min anomaly rate for all ML enabled dims
1349
```
1350
1375
You can find chart information in two places:
1376
1377
| Method | URL | Contains |
1375
-|---------------|-----------------------------------|-------------------|
1378
+| ------------- | --------------------------------- | ----------------- |
1379
| Configuration | `http://NODE:19999/netdata.conf` | All chart details |
1380
| API | `http://NODE:19999/api/v1/charts` | JSON chart data |
1381
1497
**Possible Causes:**
1498
1499
| Problem | Check This | Solution |
1497
-|----------------------|---------------------------------|-------------------------------|
1500
+| -------------------- | ------------------------------- | ----------------------------- |
1501
| Wrong chart name | `on:` line matches actual chart | Use chart ID from dashboard |
1502
| Incorrect dimensions | Dimension names in `lookup` | Check available dimensions |
1503
| Missing data | Chart has recent data | Verify data collection |
1508
**Possible Causes:**
1509
1510
| Problem | Check This | Solution |
1508
-|---------------------------|------------------------------------------|-------------------------|
1511
+| ------------------------- | ---------------------------------------- | ----------------------- |
1512
| Wrong threshold direction | `>` vs `<` in expressions | Review logic |
1513
| Units mismatch | Comparing percentages to absolute values | Check calculation units |
1514
| Variable name errors | `$this` vs `$chart.dimension` | Verify variable names |
1518
**Possible Causes:**
1519
1520
| Problem | Solution |
1518
-|-----------------------|--------------------------------------------------------------|
1521
+| --------------------- | ------------------------------------------------------------ |
1522
| Values near threshold | Implement [hysteresis](#conditional-operator-for-hysteresis) |
1523
| Noisy data | Increase lookup time window |
1524
| Too frequent checks | Increase `every:` interval |
1593
**Alert Impact on System:**
1594
1595
| Factor | Impact | Optimization |
1593
-|----------------------------|---------------------|------------------------------------|
1596
+| -------------------------- | ------------------- | ---------------------------------- |
1597
| Check frequency (`every:`) | CPU usage | Use appropriate intervals |
1598
| Lookup timeframe | Memory/CPU | Don't use excessively long periods |
1599
| Number of alerts | Overall performance | Disable unused alerts |
1602
**Recommended Frequencies:**
1603
1604
| Alert Type | Suggested Frequency | Reason |
1602
-|-------------------------|---------------------|----------------------------------------|
1605
+| ----------------------- | ------------------- | -------------------------------------- |
1606
| Critical system metrics | 10-30s | Quick response needed |
1607
| Resource usage | 1-5m | Trends matter more than instant values |
1608
| Predictive alerts | 15m-1h | Based on longer-term patterns |
1641
1642
The following variables are available in alert notification templates and custom notification scripts:
1643
1641
-| Variable name | Description |
1642
-|:---------------------------:|:---------------------------------------------------------------------------------------------------------------------------------------------|
1643
-| `${alarm}` | Like "name = value units" |
1644
-| `${status_message}` | Like "needs attention", "recovered", "is critical" |
1645
-| `${severity}` | Like "Escalated to CRITICAL", "Recovered from WARNING" |
1646
-| `${raised_for}` | Like "(alarm was raised for 10 minutes)" |
1647
-| `${host}` | The host generated this event |
1648
-| `${url_host}` | Same as `${host}` but URL encoded |
1649
-| `${unique_id}` | The unique id of this event |
1650
-| `${alarm_id}` | The unique id of the alarm that generated this event |
1651
-| `${event_id}` | The incremental id of the event, for this alarm id |
1652
-| `${when}` | The timestamp this event occurred |
1653
-| `${date}` | The date and time the event occurred (local timezone) |
1654
-| `${date_utc}` | The date and time the event occurred (UTC) |
1655
-| `${name}` | The name of the alarm, as given in netdata health.d entries |
1656
-| `${url_name}` | Same as `${name}` but URL encoded |
1657
-| `${chart}` | The name of the chart (type.id) |
1658
-| `${url_chart}` | Same as `${chart}` but URL encoded |
1659
-| `${status}` | The current status: REMOVED, UNINITIALIZED, UNDEFINED, CLEAR, WARNING, CRITICAL |
1660
-| `${old_status}` | The previous status: REMOVED, UNINITIALIZED, UNDEFINED, CLEAR, WARNING, CRITICAL |
1661
-| `${value}` | The current value of the alarm |
1662
-| `${old_value}` | The previous value of the alarm |
1663
-| `${src}` | The line number and file the alarm has been configured |
1664
-| `${duration}` | The duration in seconds of the previous alarm state |
1665
-| `${duration_txt}` | Same as `${duration}` for humans |
1666
-| `${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. |
1644
+| Variable name | Description |
1645
+| :-------------------------: | :------------------------------------------------------------------------------------------------------------------------------------------- |
1646
+| `${alarm}` | Like "name = value units" |
1647
+| `${status_message}` | Like "needs attention", "recovered", "is critical" |
1648
+| `${severity}` | Like "Escalated to CRITICAL", "Recovered from WARNING" |
1649
+| `${raised_for}` | Like "(alarm was raised for 10 minutes)" |
1650
+| `${host}` | The host generated this event |
1651
+| `${url_host}` | Same as `${host}` but URL encoded |
1652
+| `${unique_id}` | The unique id of this event |
1653
+| `${alarm_id}` | The unique id of the alarm that generated this event |
1654
+| `${event_id}` | The incremental id of the event, for this alarm id |
1655
+| `${when}` | The timestamp this event occurred |
1656
+| `${date}` | The date and time the event occurred (local timezone) |
1657
+| `${date_utc}` | The date and time the event occurred (UTC) |
1658
+| `${name}` | The name of the alarm, as given in netdata health.d entries |
1659
+| `${url_name}` | Same as `${name}` but URL encoded |
1660
+| `${chart}` | The name of the chart (type.id) |
1661
+| `${url_chart}` | Same as `${chart}` but URL encoded |
1662
+| `${status}` | The current status: REMOVED, UNINITIALIZED, UNDEFINED, CLEAR, WARNING, CRITICAL |
1663
+| `${old_status}` | The previous status: REMOVED, UNINITIALIZED, UNDEFINED, CLEAR, WARNING, CRITICAL |
1664
+| `${value}` | The current value of the alarm |
1665
+| `${old_value}` | The previous value of the alarm |
1666
+| `${src}` | The line number and file the alarm has been configured |
1667
+| `${duration}` | The duration in seconds of the previous alarm state |
1668
+| `${duration_txt}` | Same as `${duration}` for humans |
1669
+| `${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. |
1670
| `${non_clear_duration_txt}` | Same as `${non_clear_duration}` for humans |
1668
-| `${units}` | The units of the value |
1669
-| `${info}` | A short description of the alarm |
1670
-| `${value_string}` | Friendly value (with units) |
1671
-| `${old_value_string}` | Friendly old value (with units) |
1672
-| `${image}` | The URL of an image to represent the status of the alarm |
1673
-| `${color}` | A color in #AABBCC format for the alarm |
1674
-| `${goto_url}` | The URL the user can click to see the netdata dashboard |
1675
-| `${calc_expression}` | The expression evaluated to provide the value for the alarm |
1676
-| `${calc_param_values}` | The values of the variables in the evaluated expression |
1677
-| `${total_warnings}` | The total number of alarms in WARNING state on the host |
1678
-| `${total_critical}` | The total number of alarms in CRITICAL state on the host |
1671
+| `${units}` | The units of the value |
1672
+| `${info}` | A short description of the alarm |
1673
+| `${value_string}` | Friendly value (with units) |
1674
+| `${old_value_string}` | Friendly old value (with units) |
1675
+| `${image}` | The URL of an image to represent the status of the alarm |
1676
+| `${color}` | A color in #AABBCC format for the alarm |
1677
+| `${goto_url}` | The URL the user can click to see the netdata dashboard |
1678
+| `${calc_expression}` | The expression evaluated to provide the value for the alarm |
1679
+| `${calc_param_values}` | The values of the variables in the evaluated expression |
1680
+| `${total_warnings}` | The total number of alarms in WARNING state on the host |
1681
+| `${total_critical}` | The total number of alarms in CRITICAL state on the host |
1682
1683
## Related Pages
1684