fix(inputs.internet_speed): Add location as a field (#13497)
This commit is contained in:
parent
6f6e49d615
commit
40b7dbb407
|
|
@ -69,6 +69,7 @@ It collects the following fields:
|
|||
| Upload Speed | upload | float64 | Mbps |
|
||||
| Latency | latency | float64 | ms |
|
||||
| Jitter | jitter | float64 | ms |
|
||||
| Location | location | string | - |
|
||||
|
||||
And the following tags:
|
||||
|
||||
|
|
@ -81,5 +82,5 @@ And the following tags:
|
|||
## Example Output
|
||||
|
||||
```text
|
||||
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 1675458921000000000
|
||||
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
|
||||
```
|
||||
|
|
|
|||
|
|
@ -107,6 +107,7 @@ func (is *InternetSpeed) Gather(acc telegraf.Accumulator) error {
|
|||
"upload": is.server.ULSpeed,
|
||||
"latency": timeDurationMillisecondToFloat64(is.server.Latency),
|
||||
"jitter": timeDurationMillisecondToFloat64(is.server.Jitter),
|
||||
"location": is.server.Name,
|
||||
}
|
||||
tags := map[string]string{
|
||||
"server_id": is.server.ID,
|
||||
|
|
|
|||
Loading…
Reference in New Issue