Filter match types
Match Example Description
= $key=$value Exact match. True if compared alert attribute value is equal to $value.
!= $key!=$value Negative match. True if compared alert attribute is missing or have a value that is not equal to $value.
=~ $key=~$value Regular expression match. True if compared alert attribute value matches $value regex.
!~ $key!~$value Negative regular expression match. False if compared alert attribute value matches $value regex.
> $key>$value Greater than match. True if compared alert attribute value is greater than $value.
< $key<$value Less than match. True if compared alert attribue value is less than $value.
Filtering using alert labels
Filter Description
$key(= != =~ !~ < >)$value

Match alerts based on any label.

hostname=localhost Match alerts with label hostname equal to localhost.
service=apache2 Match alerts with label service equal to apache2.
service!=apache3 Match alerts with label service missing or not equal to apache3.
service=~apache Match alerts with label service matching regular expression /.*apache.*/.
service=~apache[1-3] Match alerts with label service matching regular expression /.*apache[1-3].*/.
priority>4 Match alerts with label priority value > than 4. Value will be casted to integer if possible, string comparision will be used as fallback.
Filtering alerts using special filters
Filter Description
@alertmanager(= != =~ !~)$value

Match alerts based on the Alertmanager instance name they were collected from.

@alertmanager=prod Match alerts collected from Alertmanager instance named prod.
@alertmanager!=dev Match alerts collected from Alertmanager instances except for the one named dev.
@alertmanager=~prod Match alerts collected from Alertmanager instances with names matching regular expression .*prod.*.
@receiver(= != =~ !~)$value

Match alerts based on the receiver name.

@receiver=default Match alerts sent to the default receiver.
@receiver!=hipchat Match alerts not sent to the hipchat receiver.
@receiver=~email Match alerts sent to any receiver with name matching regular expression /.*email.*/.
@state=(active suppresed unprocessed)

Match alerts based on the state.

@state=active Match only active alerts.
@state=suppressed Match only suppressed alerts.
@state=unprocessed Match only unprocessed alerts.
@silence_author(= != =~ !~)$value

Match alerts based on the author of silence.

@silence_author=me@domain1.com Match alerts silenced by me@domain1.com.
@silence_author!=me@domain1.com Match alerts not silenced by me@domain1.com.
@silence_author=~@domain2.com Match alerts silenced by username that match regular expression /.*@domain2.com.*/.
@silence_jira(= != =~ !~)$value

Match alerts based on the jira linked in the silence. This only works if JIRA regexp are enabled and able to match JIRA ids in the silence comment body.

@silence_jira=PROJECT-123 Match silenced alerts where detected JIRA issue id is equal to PROJECT-123.
@silence_jira!=PROJECT-123 Match silenced alerts where there was no JIRA issue id detected or it was not equal to PROJECT-123.
@silence_jira=~PROJECT Match silenced alerts where dectected JIRA issue id matches regular expression /.*PROJECT.*/.
@limit=$value

Limit number of displayed alerts. Value must be a number >= 1.

@limit=10 Limit number of displayed alerts to 10.
@limit=550 Limit number of displayed alerts to 550.
@age(< >)$value

Match alerts based on creation timestamp.

@age>15m Match alerts older than 15 minutes.
@age>1h Match alerts older than 1 hour.
@age<10h30m Match alerts newer than 10 hours and 30 minutes.