最终聚合器插件
此插件发出连续序列的最后一个指标,该序列定义为在 series_timeout 的时间周期内接收更新的序列。连续序列可以比 period 定义的时间间隔长。当一个序列在 series_timeout 内未收到更新时,将发出最后一个指标。
或者,插件会为 periodic 输出策略发出 period 内的最后一个指标。
这对于获取生产离散时间序列(如 procstat、cgroup、kubernetes 等)的数据源的最终值,或对以更高频率收集的指标进行降采样非常有用。
所有发出的指标的字段名称默认都带有 _final 后缀。
引入于: Telegraf v1.11.0 标签: sampling 操作系统支持: all
全局配置选项
插件支持其他全局和插件配置设置,用于修改指标、标签和字段,创建别名以及配置插件顺序等任务。更多详情请参阅 CONFIGURATION.md。
配置
# Report the final metric of a series
[[aggregators.final]]
## The period on which to flush & clear the aggregator.
# period = "30s"
## If true, the original metric will be dropped by the
## aggregator and will not get sent to the output plugins.
# drop_original = false
## If false, _final is added to every field name
# keep_original_field_names = false
## The time that a series is not updated until considering it final. Ignored
## when output_strategy is "periodic".
# series_timeout = "5m"
## Output strategy, supported values:
## timeout -- output a metric if no new input arrived for `series_timeout`
## periodic -- output the last received metric every `period`
# output_strategy = "timeout"输出策略
默认情况下 (output_strategy = "timeout"),只有当最后一个接收到的指标比 series_timeout 更旧时,插件才会为该周期发出一个指标。这不能保证 final 指标的规律性输出,例如,如果 series-timeout 是输入收集间隔的倍数。在这种情况下,指标会零星地进入周期的超时阶段,并且 final 指标的发出会被抑制。
与此相反,output_strategy = "periodic" 将始终在周期结束时输出一个 final 指标,无论最后一个指标何时到达,都会忽略 series_timeout。
Metrics
测量和标签保持不变,字段会以 _final 后缀的形式发出。
示例输出
counter,host=bar i_final=3,j_final=6 1554281635115090133
counter,host=foo i_final=3,j_final=6 1554281635112992012原始输入
counter,host=bar i=1,j=4 1554281633101153300
counter,host=foo i=1,j=4 1554281633099323601
counter,host=bar i=2,j=5 1554281634107980073
counter,host=foo i=2,j=5 1554281634105931116
counter,host=bar i=3,j=6 1554281635115090133
counter,host=foo i=3,j=6 1554281635112992012此页面是否有帮助?
感谢您的反馈!
支持和反馈
感谢您成为我们社区的一员!我们欢迎并鼓励您对 Telegraf 和本文档提出反馈和 bug 报告。要获取支持,请使用以下资源
具有年度合同或支持合同的客户可以 联系 InfluxData 支持。