Dashboard filtering

The Sensu dashboard supports filtering on the events, entities, checks, and silences pages. Dashboard filtering uses Sensu query expression syntax (for example: entity.entity_class === "proxy") depending on the scope of the page.

Syntax quick reference

operator description
=== / !== Identity operator / Nonidentity operator
== / != Equality operator / Inequality operator
&& / || Logical AND / Logical OR
< / > Less than / Greater than
<= / >= Less than or equal to / Greater than or equal to

Events page filtering

Filtering on the events page supports all entity and check attributes present in the event data, prefixed with entity. or check. respectively.

To show only events for the entity hostname server1:

entity.system.hostname === "server1"

To show only events with a warning or critical status produced by the check named check_http:

check.status > 0 && check.name === "check_http"

Entities page filtering

Filtering on the entities page assumes the entity scope and supports all entity attributes.

To show only entities of entity class proxy:

entity_class === "proxy"

To show only entities running on Linux or Windows:

system.os === "linux" || system.os === "windows"

Checks page filtering

Filtering on the check page assumes the check scope and supports all check attributes.

To show only the check named check_cpu:

name === "check_cpu"

To show only checks with the publish attribute set to false:

!publish

Silences page filtering

Filtering on the silences page assumes the silences scope and supports all silencing entry attributes.

To show only silences with the creator admin:

creator === "admin"

To show only silences applied to the check check_cpu:

check === "check_cpu"

Arrays

To filter based on an attribute that contains an array of elements, use the .indexOf syntax.

On the checks page, to show only checks with the handler slack:

handlers.indexOf("slack") > 0

Regular expressions

The Sensu dashboard supports filtering with regular expressions using the .match syntax.

On the checks page, to show only checks with names prefixed with metric-:

!!name.match(/^metric-/)