Skip to content

Commit

Permalink
fix(inputs.internet_speed): Add location as a field (#13497)
Browse files Browse the repository at this point in the history
(cherry picked from commit 40b7dbb)
  • Loading branch information
powersj committed Jul 10, 2023
1 parent e7043ea commit 25da104
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 2 additions & 1 deletion plugins/inputs/internet_speed/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:

Expand All @@ -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
```
1 change: 1 addition & 0 deletions plugins/inputs/internet_speed/internet_speed.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 25da104

Please sign in to comment.