Skip to content

Commit 62d1414

Browse files
Update variables.md (#33279)
In my testing, this format is needed for tag matching: {{#is_match "host.role.name" "database_server"}} Updated documentation accordingly.
1 parent 3f73a9c commit 62d1414

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

content/en/monitors/notify/variables.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ Search for a substring in a [tag variable](#attribute-and-tag-variables) with th
109109
To notify your DB team if a triggering host has the tag `role:db_cassandra` or `role:db_postgres`, use the following:
110110

111111
```text
112-
{{#is_match "role.name" "db"}}
112+
{{#is_match "host.role.name" "db"}}
113113
This displays if the host triggering the alert contains `db`
114114
in the role name. @[email protected]
115115
{{/is_match}}
@@ -118,7 +118,7 @@ To notify your DB team if a triggering host has the tag `role:db_cassandra` or `
118118
The `is_match` condition also supports matching multiple strings:
119119

120120
```text
121-
{{#is_match "role.name" "db" "database"}}
121+
{{#is_match "host.role.name" "db" "database"}}
122122
This displays if the host triggering the alert contains `db` or `database`
123123
in the role name. @[email protected]
124124
{{/is_match}}
@@ -127,7 +127,7 @@ The `is_match` condition also supports matching multiple strings:
127127
To send a different notification if the tag doesn't contain `db`, use the negation of the condition as follows:
128128

129129
```text
130-
{{^is_match "role.name" "db"}}
130+
{{^is_match "host.role.name" "db"}}
131131
This displays if the role tag doesn't contain `db`.
132132
@slack-example
133133
{{/is_match}}
@@ -136,7 +136,7 @@ To send a different notification if the tag doesn't contain `db`, use the negati
136136
Or use the `{{else}}` parameter in the first example:
137137

138138
```text
139-
{{#is_match "role.name" "db"}}
139+
{{#is_match "host.role.name" "db"}}
140140
This displays if the host triggering the alert contains `db`
141141
in the role name. @[email protected]
142142
{{else}}

0 commit comments

Comments
 (0)