Unpivot 处理器插件
此插件允许将多字段序列旋转为单值指标。生成的指标可以更轻松地跨字段聚合数据。
要执行反向操作,请使用pivot 处理器。
引入于: Telegraf v1.12.0 标签: 转换 操作系统支持: all
全局配置选项
插件支持其他全局和插件配置设置,用于修改指标、标签和字段,创建别名以及配置插件顺序等任务。更多详情请参阅 CONFIGURATION.md。
配置
# Rotate multi field metric into several single field metrics
[[processors.unpivot]]
## Metric mode to pivot to
## Set to "tag", metrics are pivoted as a tag and the metric is kept as
## the original measurement name. Tag key name is set by tag_key value.
## Set to "metric" creates a new metric named the field name. With this
## option the tag_key is ignored. Be aware that this could lead to metric
## name conflicts!
# use_fieldname_as = "tag"
## Tag to use for the name.
# tag_key = "name"
## Field to use for the name of the value.
# value_key = "value"示例
指标模式 tag
- cpu,cpu=cpu0 time_idle=42i,time_user=43i
+ cpu,cpu=cpu0,name=time_idle value=42i
+ cpu,cpu=cpu0,name=time_user value=43i
指标模式 metric
- cpu,cpu=cpu0 time_idle=42i,time_user=43i
+ time_idle,cpu=cpu0 value=42i
+ time_user,cpu=cpu0 value=43i
此页面是否有帮助?
感谢您的反馈!
支持和反馈
感谢您成为我们社区的一员!我们欢迎并鼓励您对 Telegraf 和本文档提出反馈和 bug 报告。要获取支持,请使用以下资源
具有年度合同或支持合同的客户可以 联系 InfluxData 支持。