2022-06-08 05:37:08 +08:00
|
|
|
# Internet Speed Monitor Input Plugin
|
2021-09-15 05:26:49 +08:00
|
|
|
|
2022-06-08 05:37:08 +08:00
|
|
|
The `Internet Speed Monitor` collects data about the internet speed on the
|
|
|
|
|
system.
|
2021-09-15 05:26:49 +08:00
|
|
|
|
2022-09-26 21:24:20 +08:00
|
|
|
On some systems, the default settings may cause speed tests to fail; if this
|
|
|
|
|
affects you then try enabling `memory_saving_mode`. This reduces the memory
|
|
|
|
|
requirements for the test, and may reduce the runtime of the test. However,
|
|
|
|
|
please be aware that this may also reduce the accuracy of the test for fast
|
|
|
|
|
(>30Mb/s) connections. This setting enables the upstream
|
|
|
|
|
[Memory Saving Mode](https://github.com/showwin/speedtest-go#memory-saving-mode)
|
|
|
|
|
|
2022-10-27 03:58:36 +08:00
|
|
|
## Global configuration options <!-- @/docs/includes/plugin_config.md -->
|
|
|
|
|
|
|
|
|
|
In addition to the plugin-specific configuration settings, plugins support
|
|
|
|
|
additional global and plugin configuration settings. These settings are used to
|
|
|
|
|
modify metrics, tags, and field or create aliases and configure ordering, etc.
|
|
|
|
|
See the [CONFIGURATION.md][CONFIGURATION.md] for more details.
|
|
|
|
|
|
2023-01-12 23:55:21 +08:00
|
|
|
[CONFIGURATION.md]: ../../../docs/CONFIGURATION.md#plugins
|
2022-10-27 03:58:36 +08:00
|
|
|
|
2021-09-15 05:26:49 +08:00
|
|
|
## Configuration
|
|
|
|
|
|
2022-05-24 21:49:47 +08:00
|
|
|
```toml @sample.conf
|
2022-04-08 06:01:21 +08:00
|
|
|
# Monitors internet speed using speedtest.net service
|
2021-09-15 05:26:49 +08:00
|
|
|
[[inputs.internet_speed]]
|
2022-05-20 01:31:33 +08:00
|
|
|
## 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"
|
|
|
|
|
|
2022-09-26 21:24:20 +08:00
|
|
|
## Enable to reduce memory usage
|
|
|
|
|
# memory_saving_mode = false
|
2022-02-02 06:12:24 +08:00
|
|
|
|
|
|
|
|
## Caches the closest server location
|
|
|
|
|
# cache = false
|
2023-02-08 01:52:21 +08:00
|
|
|
|
2023-04-03 16:06:27 +08:00
|
|
|
## 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 sever 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.
|
|
|
|
|
# test_mode = "single"
|
|
|
|
|
|
2023-02-08 01:52:21 +08:00
|
|
|
## 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 = []
|
2021-09-15 05:26:49 +08:00
|
|
|
```
|
|
|
|
|
|
|
|
|
|
## Metrics
|
|
|
|
|
|
2023-02-08 01:52:21 +08:00
|
|
|
It collects the following fields:
|
2021-09-15 05:26:49 +08:00
|
|
|
|
2023-02-08 01:52:21 +08:00
|
|
|
| Name | field name | type | Unit |
|
2023-02-23 04:40:44 +08:00
|
|
|
|----------------|------------| ------- | ---- |
|
2021-09-15 05:26:49 +08:00
|
|
|
| Download Speed | download | float64 | Mbps |
|
|
|
|
|
| Upload Speed | upload | float64 | Mbps |
|
|
|
|
|
| Latency | latency | float64 | ms |
|
2023-02-23 04:40:44 +08:00
|
|
|
| Jitter | jitter | float64 | ms |
|
2023-06-27 15:39:04 +08:00
|
|
|
| Location | location | string | - |
|
2021-09-15 05:26:49 +08:00
|
|
|
|
2023-02-08 01:52:21 +08:00
|
|
|
And the following tags:
|
|
|
|
|
|
|
|
|
|
| Name | tag name |
|
|
|
|
|
| --------- | --------- |
|
2023-03-15 22:22:38 +08:00
|
|
|
| Source | source |
|
2023-02-08 01:52:21 +08:00
|
|
|
| Server ID | server_id |
|
2023-04-03 16:06:27 +08:00
|
|
|
| Test Mode | test_mode |
|
2023-02-08 01:52:21 +08:00
|
|
|
|
2021-09-15 05:26:49 +08:00
|
|
|
## Example Output
|
|
|
|
|
|
2023-04-03 16:06:27 +08:00
|
|
|
```text
|
2023-06-27 15:39:04 +08:00
|
|
|
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,location="Somewhere, TX" 1675458921000000000
|
2021-11-25 03:18:53 +08:00
|
|
|
```
|