All Products
Search
Document Center

Preprocessing rules

Last Updated: May 24, 2020

You can use preprocessing rules to manage and configure the tasks related to the time series preprocessing feature, and monitor the status of the tasks. The current TSDB version allows you to configure and manage rollup rules only.

Rollup rules

You can create a preprocessing task and configure a rollup rule in the dialog box that appears. After the rule is configured, you can click Details to view the rule details, and click Delete Task to delete the rule and stop the preprocessing task. You can click Rule Configuration in the left-side navigation pane to view all rules and the following information of each rule: the task status, the number of data points that match the rule, the number of data points that match the rule but are not preprocessed, and the number of data points in the rollup output.

Rule matching

A data point or query matches a rollup rule only if the data point or query contains the specified metric and all the tags specified by the rule.

  1. An example of matching data points with a rollup rule is described as follows: Assume that a rule calculates the sum of matched data points that fall within a specified minute, and data points that have the following tags match the rule: tagk1 = tagv1, and tagk2 = tagv2.

    • If a data point has three tags ( tagk1 = tagv1, tagk2 = tagv2, and tagk3 = tagv3), the rule is matched and the data point is included in the rollup.
    • If a data point does not contain both tags in the rule (for example, if the data point contains tagk2 = tagv2 and tagk3 = tagv3), the rule is not matched.
  2. An example of matching a query with a rollup rule is described as follows: Assume that a rule calculates the sum of matched data points that fall within a specified minute, and data points that have the following tags match the rule: tagk1 = tagv1 and tagk2 = tagv2.

  • If you query the sum of data points that have three tags (tagk1 = tagv1, tagk2 = tagv2, and tagk3 = tagv3) and fall within a specified minute, the rule is matched and the rollup output is used.
  • If you query the sum of data points that have two tags (tagk1 = tagv1 and tagk2 = tagv2) and fall within a specified minute, the rule is matched and the rollup output is used.
  • If you query the sum of data points that have four tags (tagk1 = tagv1, tagk2 = tagv2, tagk3 = tagv3, and tagk4 = tagv4) and fall within a specified minute, the rule is not matched and the rollup output is not used.