Filters allow for fetching a select set of time series with a common metric. 3.x filters are much more capable than 2.x filters with the ability to search across multiple fields and combine them for boolean queries.
A filter is a single object and in places where filters are used, only the one object is allowed. However multiple filters can be combined in various ways via the chain
filter. Chains allow for AND
ing operations or OR
ing filtering as well as nested chains for complex filtering. Additional modifying filters are available such as the Not
filter that negates nested filters.
Note that we're still working out some bugs with the filters, particularly with legacy data sources so file any that you see.
TYPE
All filter definitions require the type
field that is the name of the filter from these documents. The type must be loaded in the registry as the ID of the plugin.
Filters currently built-in to OpenTSDB include:
Combines one or more filters with a logical AND
(the default) or a logical OR
. Fields include:
AND
(default) or OR
.Matches a single metric in the data store.
Executes the regular expression against metrics to fetch all metrics that match.
Matches one or more literal tag keys. Multiple values are separated by a pipe.
Matches the regular expression against tag keys.
Matches one or more literal tag values. Multiple values are separated by a pipe.
Matches on the globs of a case-sensitive tag value using the literal *
as the wildcard place-holder.
*
then it will match all series with the given tagKey
.Expands a syntax into multiple literal values. E.g. web{01-05}.{dc1|dc2}
would generate 10 values such as web01.dc1` through ``web05.dc2
.
TODO - docs
Matches a regular expression on the tag value.
Must be used as the top-level filter if applicable and means that a time series must have all of the tag keys specified in the nested filter set and no other tags.
Negates the nested filter.
Matches on any field including the metric, tag keys and tag values.