Docs: Update variables-label-annotation.md (#81134)

Update variables-label-annotation.md

Additional closing bracket was removed
This commit is contained in:
Damian Szczepanik 2024-01-24 11:36:50 +01:00 committed by GitHub
parent ad755421f8
commit 5576731332
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -225,7 +225,7 @@ The `$value` variable is a string containing the labels and values of all instan
To print the `$value` variable in the summary you would write something like this:
```
CPU usage for {{ index $labels "instance" }} has exceeded 80% for the last 5 minutes: {{ $value }})
CPU usage for {{ index $labels "instance" }} has exceeded 80% for the last 5 minutes: {{ $value }}
```
And would look something like this:
@ -245,7 +245,7 @@ The `$values` variable is a table containing the labels and floating point value
To print the value of the instant query with Ref ID A:
```
CPU usage for {{ index $labels "instance" }} has exceeded 80% for the last 5 minutes: {{ index $values "A" }})
CPU usage for {{ index $labels "instance" }} has exceeded 80% for the last 5 minutes: {{ index $values "A" }}
```
For example, given an alert with the labels `instance=server1` and an instant query with the value `81.2345`, this would print:
@ -257,7 +257,7 @@ CPU usage for instance1 has exceeded 80% for the last 5 minutes: 81.2345
If the query in Ref ID A is a range query rather than an instant query then add a reduce expression with Ref ID B and replace `(index $values "A")` with `(index $values "B")`:
```
CPU usage for {{ index $labels "instance" }} has exceeded 80% for the last 5 minutes: {{ index $values "B" }})
CPU usage for {{ index $labels "instance" }} has exceeded 80% for the last 5 minutes: {{ index $values "B" }}
```
## Functions