diff options
author | Andrew Moss <1043609+amoss@users.noreply.github.com> | 2019-12-16 15:12:00 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-12-16 15:12:00 +0100 |
commit | c8c72f18a6a8fd09d3b6284e49525396b24e8395 (patch) | |
tree | 5b9aeaea7d72e1d1029d45f67c0a5f130ecc2f80 /health/REFERENCE.md | |
parent | c4bb3d2642ab34e6aca912b22e55aed52f84e974 (diff) |
Labels issues (#7515)
Initial work on host labels from the dedicated branch. Includes work for issues #7096, #7400, #7411, #7369, #7410, #7458, #7459, #7412 and #7408 by @vlvkobal, @thiagoftsm, @cakrit and @amoss.
Diffstat (limited to 'health/REFERENCE.md')
-rw-r--r-- | health/REFERENCE.md | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/health/REFERENCE.md b/health/REFERENCE.md index 7136ba0b5b..886942c869 100644 --- a/health/REFERENCE.md +++ b/health/REFERENCE.md @@ -68,6 +68,7 @@ Netdata parses the following lines. Beneath the table is an in-depth explanation | [`delay`](#alarm-line-delay) | no | Optional hysteresis settings to prevent floods of notifications. | | [`repeat`](#alarm-line-repeat) | no | The interval for sending notifications when an alarm is in WARNING or CRITICAL mode. | | [`option`](#alarm-line-option) | no | Add an option to not clear alarms. | +| [`label`](#alarm-line-label) | no | List of labels present on a host. | The `alarm` or `template` line must be the first line of any entity. @@ -370,6 +371,48 @@ increasing. Eventually, the comparison will find the averages in the two time-fr However, the issue was not resolved, it's just a matter of the newer data "polluting" the old. For such alarms, it's a good idea to tell Netdata to not clear the notification, by using the `no-clear-notification` option. +#### Alarm line `label` + +Defines the list of labels expected on a host. For example, let's suppose that `netdata.conf` is configured with the +following labels: + +```yaml +[host labels] + installed = 20191211 + room = server +``` + +And more labels in `netdata.conf` for workstations: + +```yaml +[host labels] + installed = 201705 + room = workstation +``` + +By defining labels inside of `netdata.conf`, you can now apply labels to alarms. For example, you can add the following +line to any alarms you'd like to apply to hosts that have the label `room = server`. + +```yaml +label: room = server +``` + +You can also combine labels when applying them to alarms. For example, if you want to raise a specific alarm only for hosts +inside a room that were installed at a specific time, you can write the following label line: + +```yaml +label: room = workstation AND installed = 201705 +``` + +The `label` is a space-separated list that accepts simple patterns. For example, you can create an alarm +that will be applied to all hosts installed in the last decade with the following line: + +```yaml +label: installed = 201* +``` + +See our [simple patterns docs](../libnetdata/simple_pattern/) for more examples. + ## Expressions Netdata has an internal [infix expression parser](../libnetdata/eval). This parses expressions and creates an internal |