Measurements query
This query type is used to query measurements directly.
Configuring the query
Database(s) selection
By default, measurements can be queried from all configured time series databases. One or more databases can be selected to filter on.
This can also be controlled by a dashboard variable.
Measurement(s) selection
There are a couple of ways to select measurements:
- Search and select one or more measurements
- Use a dashboard variable (can be done in combination with manually searching and selecting measurements)
Or enable Use regular expression and enter a regular expression. The amount of measurements selected by the regular expression might be limited by the Max Measurements setting. Dashboard variables can also be used here but it's recommended to use the ${varname} syntax instead of $varname to be able to interpolate a variable in the middle of an expression.
Aggregation options
All of the aggregation options can also be controlled with a dashboard variable.
Aggregation
- Select one of the available aggregations, or clear the field for raw data. The full list is count, integral, mean, median, mode, spread, stddev, sum, first, last, max, min and twa, and it is filtered by the datatype of the selected measurements: a string measurement offers only count, first, last and mode, a boolean one adds min and max, and an array one offers only count, first and last.
- Select the aggregation period
- Optionally select a fill type
- Optional toggles:
- 'Fill empty initial intervals' Uses the last known point to fill any initial empty intervals before the first data point in the series. Does not include the actual last known point in the data, unless Include last known point is enabled too.
- 'Include last known point' This gives the last point before the time range of the query for the series with the status = Good, and the other tags that are filtered upon. If another status is in the current time window, the last value for that status will be fetched too.
Group by
Select which time series tags to group the series by, by default status is filled in here.
Filter options
Filter datatypes
Select which measurement datatypes to include, useful when selecting multiple measurements using regex or dashboard variables.
Filter tags
Build the tag filter, by default only data with status = Good is queried.
Limitations:
- Only the = operator is available
- Only AND is available when there are multiple tag filters
Filter values
Build the value filter, by default no filter is applied.
- Supports operators: =, !=, <, <=, >, >=
- Supports logical operators: AND, OR
Max values
The maximum amount of measurement values fetched per series.
Order by time
Return the points in ascending or descending time order.
Advanced options
Add metadata as labels
Adds the measurement and database UUID as labels on the returned series.
Default: enabled
Truncate interval
Default: enabled
Format as
Return the result as a time series or as a table.
Changes only
Only returns data points that contain a change in value, so it hides all the points that are equal to the previous point. Only applies within the configured time range. Enabling it switches Fill empty initial intervals off.
Use engineering specs
Uses the configured engineering specs (like UoM) for the selected measurement(s).
Display database name
Includes the database name for the selected measurement(s) in the label.
Display description
Includes the description for the selected measurement(s) in the label (if one is available).
Max Measurements
Limits the amount of measurements fetched. Set to 0 for no limit.
Beware: measurements with no points in the configured interval also count towards the limit. These measurements are not visible, making it seem like less measurements than configured were fetched.