Graylog 输出插件
此插件使用GELF 数据格式将指标写入Graylog 实例。
引入于: Telegraf v1.0.0 标签: datastore, logging 操作系统支持: all
GELF 字段
GELF 规范 (GELF spec) 定义了 GELF 负载中的一些特定字段。这些字段可能需要符合规范的特定要求,Graylog 插件的用户需要遵守这些要求,否则指标可能会因为数据无效而被拒绝。
例如,GELF 规范中定义的 `timestamp` 字段要求是 UNIX 时间戳。如果该字段存在,此输出插件将按原样发送到 Graylog,不会修改或检查 `timestamp` 字段。如果该字段不存在,Telegraf 将把时间戳设置为当前时间。
任何未在规范中定义的字段,其字段名前都会加上一个下划线(例如:_)。
全局配置选项
插件支持其他全局和插件配置设置,用于修改指标、标签和字段,创建别名以及配置插件顺序等任务。更多详情请参阅 CONFIGURATION.md。
配置
# Send telegraf metrics to graylog
[[outputs.graylog]]
## Endpoints for your graylog instances.
servers = ["udp://127.0.0.1:12201"]
## Connection timeout.
# timeout = "5s"
## The field to use as the GELF short_message, if unset the static string
## "telegraf" will be used.
## example: short_message_field = "message"
# short_message_field = ""
## According to GELF payload specification, additional fields names must be prefixed
## with an underscore. Previous versions did not prefix custom field 'name' with underscore.
## Set to true for backward compatibility.
# name_field_no_prefix = false
## Connection retry options
## Attempt to connect to the endpoints if the initial connection fails.
## If 'false', Telegraf will give up after 3 connection attempt and will
## exit with an error. If set to 'true', the plugin will retry to connect
## to the unconnected endpoints infinitely.
# connection_retry = false
## Time to wait between connection retry attempts.
# connection_retry_wait_time = "15s"
## Optional TLS Config
# tls_ca = "/etc/telegraf/ca.pem"
# tls_cert = "/etc/telegraf/cert.pem"
# tls_key = "/etc/telegraf/key.pem"
## Use TLS but skip chain & host verification
# insecure_skip_verify = false服务器端点可以不带 UDP 或 TCP 协议方案指定(例如:“127.0.0.1:12201”)。在这种情况下,假定使用 UDP 协议。对于 UDP 端点,TLS 配置将被忽略。
此页面是否有帮助?
感谢您的反馈!
支持和反馈
感谢您成为我们社区的一员!我们欢迎并鼓励您对 Telegraf 和本文档提出反馈和 bug 报告。要获取支持,请使用以下资源
具有年度合同或支持合同的客户可以 联系 InfluxData 支持。