chrony 输入插件
此插件查询 chrony NTP 服务器的指标。有关收集字段含义的详细信息,请查看 chronyc 手册。
引入于: Telegraf v0.13.1 标签: system 操作系统支持: all
全局配置选项
插件支持其他全局和插件配置设置,用于修改指标、标签和字段,创建别名以及配置插件顺序等任务。更多详情请参阅 CONFIGURATION.md。
配置
# Get standard chrony metrics.
[[inputs.chrony]]
## Server address of chronyd with address scheme
## If empty or not set, the plugin will mimic the behavior of chronyc and
## check "unixgram:///run/chrony/chronyd.sock", "udp://127.0.0.1:323"
## and "udp://[::1]:323".
# server = ""
## Timeout for establishing the connection
# timeout = "5s"
## Try to resolve received addresses to host-names via DNS lookups
## Disabled by default to avoid DNS queries especially for slow DNS servers.
# dns_lookup = false
## Metrics to query named according to chronyc commands
## Available settings are:
## activity -- number of peers online or offline
## tracking -- information about system's clock performance
## serverstats -- chronyd server statistics
## sources -- extended information about peers
## sourcestats -- statistics on peers
# metrics = ["tracking"]
## Socket group & permissions
## If the user requests collecting metrics via unix socket, then it is created
## with the following group and permissions.
# socket_group = "chrony"
# socket_perms = "0660"本地套接字权限
要使用 Unix 套接字,telegraf 必须能够与之通信。请确保 telegraf 用户是 chrony 组的成员,否则 telegraf 将无法使用该套接字!
要使用 serverstats 指标,需要 Unix 套接字。所有其他指标都可以通过 UDP 连接进行收集。
Metrics
- chrony
- system_time (float, seconds)
- last_offset (float, seconds)
- rms_offset (float, seconds)
- frequency (float, ppm)
- residual_freq (float, ppm)
- skew (float, ppm)
- root_delay (float, seconds)
- root_dispersion (float, seconds)
- update_interval (float, seconds)
标签
- 所有测量值都有以下标签
- reference_id
- stratum
- leap_status
示例输出
chrony,leap_status=not\ synchronized,reference_id=A29FC87B,stratum=3 frequency=-16.000999450683594,last_offset=0.000012651000361074694,residual_freq=0,rms_offset=0.000025576999178156257,root_delay=0.0016550000291317701,root_dispersion=0.00330700003542006,skew=0.006000000052154064,system_time=0.000020389999917824753,update_interval=507.1999816894531 1706271167571675297此页面是否有帮助?
感谢您的反馈!
支持和反馈
感谢您成为我们社区的一员!我们欢迎并鼓励您对 Telegraf 和本文档提出反馈和 bug 报告。要获取支持,请使用以下资源
具有年度合同或支持合同的客户可以 联系 InfluxData 支持。