Skip to content

Filter out null metric values #129524

Open
@kkrik-es

Description

@kkrik-es

Aggregations involving time-series should only process documents where values for metric fields are not null. This is in line with PromQL that implicitly selects time-series containing values and tracks the ones with no recent data as stale.

A workaround is to explicitly filter out null values, e.g.

TS my-metrics
 | WHERE cpu_usage IS NOT NULL
 | STATS max(avg_over_time(cpu_usage)) BY TBUCKET(1 hour), hostname

Still, adding WHERE <metric> IS NOT NULL for all metrics in all queries is fairly verbose and redundant. It should be implicitly applied within the TS command scope.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions