Internet Speed Monitor 输入插件
此插件使用 speedtest.net 服务 收集有关系统互联网速度的指标,如下载/上传速度、延迟等。
引入于: Telegraf v1.20.0 标签: network 操作系统支持: all
全局配置选项
插件支持其他全局和插件配置设置,用于修改指标、标签和字段,创建别名以及配置插件顺序等任务。更多详情请参阅 CONFIGURATION.md。
配置
# Monitors internet speed using speedtest.net service
[[inputs.internet_speed]]
## This plugin downloads many MB of data each time it is run. As such
## consider setting a higher interval for this plugin to reduce the
## demand on your internet connection.
# interval = "60m"
## Enable to reduce memory usage
# memory_saving_mode = false
## Caches the closest server location
# cache = false
## Number of concurrent connections
## By default or set to zero, the number of CPU cores is used. Use this to
## reduce the impact on system performance or to increase the connections on
## faster connections to ensure the fastest speed.
# connections = 0
## Test mode
## By default, a single server is used for testing. This may work for most,
## however, setting to "multi" will reach out to multiple servers in an
## attempt to get closer to ideal internet speeds.
## And "multi" will use all available servers to calculate average packet loss.
# test_mode = "single"
## Server ID exclude filter
## Allows the user to exclude or include specific server IDs received by
## speedtest-go. Values in the exclude option will be skipped over. Values in
## the include option are the only options that will be picked from.
##
## See the list of servers speedtest-go will return at:
## https://www.speedtest.net/api/js/servers?engine=js&limit=10
##
# server_id_exclude = []
# server_id_include = []在某些系统上,默认设置可能会导致速度测试失败。如果这对您的系统有影响,请尝试启用 memory_saving_mode,它会降低内存需求和测试的运行时长,但会以牺牲准确性为代价,特别是对于快速(>30Mb/s)连接。有关详细信息,请参阅 上游文档。
Metrics
它收集以下字段
| 名称 | 字段名称 | 类型 | 单位 |
|---|---|---|---|
| 下载速度 | download | float64 | Mbps |
| 上传速度 | upload | float64 | Mbps |
| 延迟 | latency | float64 | ms |
| 抖动 | jitter | float64 | ms |
| 丢包率 | packet_loss | float64 | percentage |
| 位置 | location | string | - |
如果丢包率不适用,packet_loss 将返回 -1。
以及以下标签
| 名称 | 标签名称 |
|---|---|
| 来源 | source |
| 服务器 ID | server_id |
| 测试模式 | test_mode |
示例输出
internet_speed,source=speedtest02.z4internet.com:8080,server_id=54619,test_mode=single download=318.37580265897725,upload=30.444407341274385,latency=37.73174,jitter=1.99810,packet_loss=0.05377,location="Somewhere, TX" 1675458921000000000
internet_speed,source=speedtest02.z4internet.com:8080,server_id=54619,test_mode=multi download=318.37580265897725,upload=30.444407341274385,latency=37.73174,jitter=1.99810,packet_loss=-1,location="Somewhere, TX" 1675458921000000000此页面是否有帮助?
感谢您的反馈!
支持和反馈
感谢您成为我们社区的一员!我们欢迎并鼓励您对 Telegraf 和本文档提出反馈和 bug 报告。要获取支持,请使用以下资源
具有年度合同或支持合同的客户可以 联系 InfluxData 支持。