New announcements for Serverless, Network, RUM, and more from Dash! New announcements from Dash!

Count

Count non zero

FunctionDescriptionExample
count_nonzero()Compute count of all non-zero values.count_nonzero(<METRIC_NAME>{*})

For a query grouped by one or more tag keys, count the number of tag values with non-zero metric values at each point.

Example: count_nonzero(system.cpu.user{*} by {host}) returns a timeseries representing the number of hosts with non-zero system load at each point.

Count not null

FunctionDescriptionExample
count_not_null()Compute count of all not null values.count_not_null(<METRIC_NAME>{*})

For a query grouped by one or more tag keys, count the number of tag values with non-null metric values at each point. A null metric value is when there is no finite value.

Example: count_not_null(system.cpu.user{*} by {host}) returns a timeseries representing the number of hosts with non-null system load at each point.

Other functions