Graphite 输入数据格式
使用 graphite
输入数据格式将 Graphite 点 buckets 直接解析为 Telegraf 指标,其中包含指标名称、单个字段和可选标签。默认情况下,分隔符保留为 .
,但可以使用 separator
参数更改此设置。对于更高级的选项,Telegraf 支持指定 模板,以将 Graphite buckets 转换为 Telegraf 指标。
配置
[[inputs.exec]]
## Commands array
commands = ["/tmp/test.sh", "/usr/bin/mycollector --foo=bar"]
## measurement name suffix (for separating different commands)
name_suffix = "_mycollector"
## Data format to consume.
## Each data format has its own unique set of configuration options, read
## more about them here:
## https://github.com/influxdata/telegraf/blob/master/docs/DATA_FORMATS_INPUT.md
data_format = "graphite"
## This string will be used to join the matched values.
separator = "_"
## Each template line requires a template pattern. It can have an optional
## filter before the template and separated by spaces. It can also have optional extra
## tags following the template. Multiple tags should be separated by commas and no spaces
## similar to the line protocol format. There can be only one default template.
## Templates support below format:
## 1. filter + template
## 2. filter + template + extra tag(s)
## 3. filter + template with field key
## 4. default template
templates = [
"*.app env.service.resource.measurement",
"stats.* .host.measurement* region=eu-east,agent=sensu",
"stats2.* .host.measurement.field",
"measurement*"
]
模板
模板模式 指定了点分隔字符串应如何映射到 指标 和从 指标 映射。
此页内容对您有帮助吗?
感谢您的反馈!
支持和反馈
感谢您成为我们社区的一份子!我们欢迎并鼓励您提供关于 Telegraf 和本文档的反馈和错误报告。要寻求支持,请使用以下资源
拥有年度合同或支持合同的客户 可以联系 InfluxData 支持。