Riemann 输出插件
此插件通过 TCP 或 UDP 将指标写入Riemann 服务。
引入版本: Telegraf v1.3.0 标签: datastore 操作系统支持: all
全局配置选项
插件支持其他全局和插件配置设置,用于修改指标、标签和字段,创建别名以及配置插件顺序等任务。更多详情请参阅 CONFIGURATION.md。
配置
# Configuration for Riemann to send metrics to
[[outputs.riemann]]
## The full TCP or UDP URL of the Riemann server
url = "tcp://:5555"
## Riemann event TTL, floating-point time in seconds.
## Defines how long that an event is considered valid for in Riemann
# ttl = 30.0
## Separator to use between measurement and field name in Riemann service name
## This does not have any effect if 'measurement_as_attribute' is set to 'true'
separator = "/"
## Set measurement name as Riemann attribute 'measurement', instead of prepending it to the Riemann service name
# measurement_as_attribute = false
## Send string metrics as Riemann event states.
## Unless enabled all string metrics will be ignored
# string_as_state = false
## A list of tag keys whose values get sent as Riemann tags.
## If empty, all Telegraf tag values will be sent as tags
# tag_keys = ["telegraf","custom_tag"]
## Additional Riemann tags to send.
# tags = ["telegraf-output"]
## Description for Riemann event
# description_text = "metrics collected from telegraf"
## Riemann client write timeout, defaults to "5s" if not set.
# timeout = "5s"必需参数
url: 要发送事件到的 Riemann 服务器的完整 TCP 或 UDP URL。
可选参数
ttl: Riemann 事件的 TTL(生存时间),以秒为单位的浮点数。定义事件在 Riemann 中被视为有效的时长。separator: 在 Riemann 服务名称中用于分隔测量和字段名称的分隔符。measurement_as_attribute: 将测量名称设置为 Riemann 属性,而不是将其添加到 Riemann 服务名称的前面。string_as_state: 将字符串指标作为 Riemann 事件状态发送。如果未启用此选项,则所有字符串指标将被忽略。tag_keys: 标签键的列表,其值将被发送为 Riemann 标签。如果为空,所有 Telegraf 标签值都将作为标签发送。tags: 将发送的附加 Riemann 标签。description_text: Riemann 事件的描述文本。
示例事件
使用默认配置由 Telegraf 发出的 Riemann 事件
#riemann.codec.Event{
:host "postgresql-1e612b44-e92f-4d27-9f30-5e2f53947870", :state nil, :description nil, :ttl 30.0,
:service "disk/used_percent", :metric 73.16736001949994, :path "/boot", :fstype "ext4", :time 1475605021}Telegraf 发出相同的 Riemann 事件,并将 measurement_as_attribute 设置为 true
#riemann.codec.Event{ ...
:measurement "disk", :service "used_percent", :metric 73.16736001949994,
... :time 1475605021}Telegraf 发出相同的 Riemann 事件,并定义了附加的 Riemann 标签
#riemann.codec.Event{
:host "postgresql-1e612b44-e92f-4d27-9f30-5e2f53947870", :state nil, :description nil, :ttl 30.0,
:service "disk/used_percent", :metric 73.16736001949994, :path "/boot", :fstype "ext4", :time 1475605021,
:tags ["telegraf" "postgres_cluster"]}Telegraf 发出一个 Riemann 事件,其中包含状态文本,并将 string_as_state 设置为 true,并定义了 description_text
#riemann.codec.Event{
:host "postgresql-1e612b44-e92f-4d27-9f30-5e2f53947870", :state "Running", :ttl 30.0,
:description "PostgreSQL master node is up and running",
:service "status", :time 1475605021}此页面是否有帮助?
感谢您的反馈!
支持和反馈
感谢您成为我们社区的一员!我们欢迎并鼓励您对 Telegraf 和本文档提出反馈和 bug 报告。要获取支持,请使用以下资源
具有年度合同或支持合同的客户可以 联系 InfluxData 支持。