filter

Output only the points for which the given filtering expression evaluates to true.

filter filter-expression

The filter expression can match fields using various operators.

See Filtering for more information about valid expressions to filter points. Also see Field referencing for more information about how to refer to fields in filters.

Example: display incoming points

This example displays all incoming points where the value for requests is greater than 90 and host field is not server, servers, dbserver, dbservers, webserver, or webservers. It uses metric data similar to dataset 3.

read stochastic -source 'cdn' -nhosts 3 -dos 0.5 -last :5 minutes: -source_type 'metrics' name = 'requests' OR name = 'response_ms' OR name = 'responses'
| filter name = "requests" value > 10 host !~ /^(web|db)?servers?$/ 
| view table -limit 20

Example: Display only points containing a field named code

This example also uses metric data similar to dataset 3.

read stochastic -source 'cdn' -nhosts 3 -dos 0.5 -last :5 minutes: -source_type 'metrics' name = 'requests' OR name = 'response_ms' OR name = 'responses'
| filter code != null
| view table -limit 20