github.com/GuanceCloud/cliutils@v1.1.21/pipeline/ptinput/funcs/md/agg_create.en.md (about)

     1  ### `agg_create()` {#fn-agg-create}
     2  
     3  Function prototype: `fn agg_create(bucket: str, on_interval: str = "60s", on_count: int = 0, keep_value: bool = false, const_tags: map[string]string = nil, category: str = "M")`
     4  
     5  Function description: Create an aggregation measurement, set the time or number of times through `on_interval` or `on_count` as the aggregation period, upload the aggregated data after the aggregation is completed, and choose whether to keep the last aggregated data. This function does not work with central Pipeline.
     6  
     7  Function parameters:
     8  
     9  - `bucket`: String type, as an aggregated field, if the bucket has already been created, the function will not perform any operations.
    10  - `on_interval`:The default value is `60s`, which takes time as the aggregation period, and the unit is `s`, and the parameter takes effect when the value is greater than `0`; it cannot be combined with `on_count` less than or equal to 0.
    11  - `on_count`: The default value is `0`, the number of processed points is used as the aggregation period, and the parameter takes effect when the value is greater than `0`.
    12  - `keep_value`: The default value is `false`.
    13  - `const_tags`: Custom tags, empty by default.
    14  - `category`: Data category for aggregated data, optional parameter, the default value is "M", indicating the indicator category data.
    15  
    16  示例:
    17  
    18  ```python
    19  agg_create("cpu_agg_info", on_interval = "30s")
    20  ```