showwin / speedtest-go

CLI and Go API to Test Internet Speed using speedtest.net
MIT License
565 stars 115 forks source link

speedtest-go-exporter #210

Open tranmh opened 6 months ago

tranmh commented 6 months ago

Hi,

I started based on your code but modified in such way that it a Prometheus Exporter.

Are you general interested in such thing and in the code as well or should I start a new fork and call it speedtest-go-exporter?

The output would look like this for my first try:

# HELP speedtest_download_speed_in_mbps Downdload speed in Mbps
# TYPE speedtest_download_speed_in_mbps gauge
speedtest_download_speed_in_mbps 5.594351916401391
# HELP speedtest_ping_jitter_in_ms jitter of ping test in ms
# TYPE speedtest_ping_jitter_in_ms gauge
speedtest_ping_jitter_in_ms 6
# HELP speedtest_ping_latency_in_ms latency of ping test in ms
# TYPE speedtest_ping_latency_in_ms gauge
speedtest_ping_latency_in_ms 38
# HELP speedtest_upload_speed_in_mbps Upload speed in Mbps
# TYPE speedtest_upload_speed_in_mbps gauge
speedtest_upload_speed_in_mbps 8.515543538485655

Thx.

r3inbowari commented 6 months ago

Hi @tranmh , are you looking for this?

r3inbowari commented 6 months ago

I start a new fork and call it speedtest-go-exporter?

I think it would be better if you build a new repo and import speedtest-go. The code will be clean and easy to modify.