{"id":37192883,"url":"https://github.com/mgumz/speedtest-exporter","last_synced_at":"2026-01-14T22:23:09.075Z","repository":{"id":291927279,"uuid":"977521237","full_name":"mgumz/speedtest-exporter","owner":"mgumz","description":"A Prometheus exporter for speedtest-go metrics","archived":false,"fork":false,"pushed_at":"2025-06-08T13:30:53.000Z","size":89,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-08-09T21:51:26.658Z","etag":null,"topics":["metrics","network-analysis","network-performance","ookla","prometheus","prometheus-exporter","speedtest","speedtest-go"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mgumz.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-05-04T11:57:40.000Z","updated_at":"2025-06-08T13:30:57.000Z","dependencies_parsed_at":"2025-06-08T14:35:28.251Z","dependency_job_id":null,"html_url":"https://github.com/mgumz/speedtest-exporter","commit_stats":null,"previous_names":["mgumz/speedtest-exporter"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/mgumz/speedtest-exporter","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mgumz%2Fspeedtest-exporter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mgumz%2Fspeedtest-exporter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mgumz%2Fspeedtest-exporter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mgumz%2Fspeedtest-exporter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mgumz","download_url":"https://codeload.github.com/mgumz/speedtest-exporter/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mgumz%2Fspeedtest-exporter/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28436295,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T21:32:52.117Z","status":"ssl_error","status_checked_at":"2026-01-14T21:32:33.442Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["metrics","network-analysis","network-performance","ookla","prometheus","prometheus-exporter","speedtest","speedtest-go"],"created_at":"2026-01-14T22:23:08.246Z","updated_at":"2026-01-14T22:23:09.065Z","avatar_url":"https://github.com/mgumz.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# speedtest-exporter\n\n[![Go Report Card](https://goreportcard.com/badge/github.com/mgumz/speedtest-exporter)](https://goreportcard.com/report/github.com/mgumz/speedtest-exporter)\n\n**speedtest-exporter** periodically executes [speedtest-go] to given servers and provides the\nmeasured results as [prometheus] metrics on an HTTP endpoint.\n\nUsually, [speedtest-go] is producing the following output:\n\n    $\u003e speedtest-go -s 00001\n\n        speedtest-go v1.7.10 (git-dev) @showwin\n\n    ⠸ Retrieving User Information\n    ✓ ISP: 192.0.2.1 (ACME Sponsor) [0.123, 0.456]\n    ✓ Found 1 Specified Public Server(s)\n\n    ✓ Test Server: [00001] 2.78km Example City by ACME Sponsor\n    ✓ Latency: 13.266299ms Jitter: 1.563479ms Min: 11.066208ms Max: 16.269875ms\n    ✓ Packet Loss Analyzer: Running in background (\u003c= 30 Secs)\n    ✓ Download: 56.17 Mbps (Used: 71.18MB) (Latency: 40ms Jitter: 9ms Min: 16ms Max: 53ms)\n    ✓ Upload: 54.34 Mbps (Used: 71.26MB) (Latency: 46ms Jitter: 30ms Min: 16ms Max: 121ms)\n    ✓ Packet Loss: N/A\n\n`speedtest-exporter` exposes the measured values like this at the `/metrics`\nendpoint:\n\n    # 1 speedtest jobs defined\n    # speedtest run speedtest-exporter-cli: 2025-04-13T13:43:46.002883Z -- speedtest-go --json -s 00001\n    speedtest_runs_total{speedtest_exporter_job=\"speedtest-exporter-cli\",error=\"\"} 1 1744551826002\n    speedtest_duration_seconds{speedtest_exporter_job=\"speedtest-exporter-cli\"} 23.945700 1744551826002\n    speedtest_dl_speed{speedtest_exporter_job=\"speedtest-exporter-cli\"} 7120217 1744551826002\n    speedtest_ul_speed{speedtest_exporter_job=\"speedtest-exporter-cli\"} 6932864 1744551826002\n    speedtest_jitter{speedtest_exporter_job=\"speedtest-exporter-cli\"} 1477440 1744551826002\n    speedtest_latency{speedtest_exporter_job=\"speedtest-exporter-cli\"} 14383537 1744551826002\n    speedtest_max_latency{speedtest_exporter_job=\"speedtest-exporter-cli\"} 18016083 1744551826002\n    speedtest_min_latency{speedtest_exporter_job=\"speedtest-exporter-cli\"} 12627166 1744551826002\n    speedtest_test_duration_ping{speedtest_exporter_job=\"speedtest-exporter-cli\"} 2425575666 1744551826002\n    speedtest_test_duration_download{speedtest_exporter_job=\"speedtest-exporter-cli\"} 10051649083 1744551826002\n    speedtest_test_duration_upload{speedtest_exporter_job=\"speedtest-exporter-cli\"} 10050837042 1744551826002\n    speedtest_test_duration_total{speedtest_exporter_job=\"speedtest-exporter-cli\"} 22528061791 1744551826002\n\nWhen [prometheus] scrapes the data, you can visualise the observed values:\n\n![speedtest-go results in Grafana](./media/grafana.png \"Speedtest-Go 1\")\n\n## Usage\n\n    Usage: speedtest-exporter [FLAGS] -- [SPEEDTEST-GO-FLAGS]\n\n    FLAGS:\n    -bind       \u003cbind-address\u003e\n                bind address (default \":8080\")\n    -h\n                show help\n    -jobs       \u003cpath-to-jobsfile\u003e\n                file describing multiple speedtest-jobs. syntax is given below.\n    -label      \u003cjob-label\u003e\n                use \u003cjob-label\u003e in prometheus-metrics (default: \"speedtest-exporter-cli\")\n    -log-level  \u003clog-level\u003e\n                either of \"debug\", \"info\" (default), \"warn\", \"error\"\n    -speedtest  \u003cpath-to-binary\u003e\n                path to speedtest-go binary (default: \"speedtest-go\")\n    -schedule   \u003cschedule\u003e\n                schedule at which often speedtest-go is launched (default: \"@every 24h\")\n                examples:\n                   @every \u003cdur\u003e  - example \"@every 24h\"\n                   @hourly       - run once per hour\n                   10 * * * *    - execute 10 minutes after the full hour\n                see https://en.wikipedia.org/wiki/Cron\n    -timeshift  \u003ctimeshift\u003e\n                timeshift around the point in time when -schedule would trigger otherwise\n                (default: \"\" - no timeshift)\n    -watch-jobs \u003cschedule\u003e\n                periodically watch the file defined via -jobs (default: \"\")\n                if it has changed stop previously running speedtest-jobs and apply\n                all jobs defined in -jobs.\n    -show-license\n                show license\n    -show-version\n                show version\n\n    SPEEDTEST-GO-FLAGS:\n    see \"speedtest-go\" for valid flags.\n\n### HTTP Endpoints\n\n* /metrics - metrics in prometheus format\n* /health  - endpoint to indicate the healthieness\n* /        - small info page with link to /metrics\n\n### Examples\n\n    $\u003e speedtest-exporter -schedule \"@every 24h\" -- -s 00001\n\n### Jobs-File Syntax\n\n    # comment lines start with '#' are ignored\n    # empty lines are ignored as well\n    label -- \u003cschedule\u003e -- speedtest-go-flags\n\n`\u003cschedule\u003e` - a schedule expression which follows one of\n\n* `* * * * *` - a cron expression, see https://en.wikipedia.org/wiki/Cron\n* `@hourly` | `@daily` etc - see https://pkg.go.dev/github.com/robfig/cron/v3#hdr-Predefined_schedules\n* `@every \u003cduration\u003e` - execute [speedtest-go] in an interval\n\nOptionally, if the `\u003cschedule\u003e` has a suffix of `\u003ctimeShiftSpec\u003e`, the actual\nexecution of the job is, well, shifted. This is a **very** advisable feature to\nuse: `speedtest` usually causes a noticeable amount of traffic, not only on\nthe users side but _mainly_ on the server side as well as the hops in between.\n\n**NOTE**: To minimize the concerted effect a `speedtest` run might cause: use\n`timeshifts` to deviate or to delay the actual execution by a random amount!\n\n`\u003ctimeShiftSpec\u003e` - Different timeshift expressions in the Jobs-File are supported.\n\n* `~\u003cduration\u003e` - adds a random delay to the otherwise planned point in time.\n                  Example given: `@every 1h ~10m` will trigger the job\n                  somewhen in the range of xx:00 to xx:10. The effective range\n                  is given as `[\u003cplanned-point-in-time .. +\u003cduration\u003e]`.\n\nExamples:\n\n    # measure each midnight (+ a random timshift of up to 10 minutes) the speed to server 00001\n    nightly -- @midnight ~10m -- -s 00001\n    # measure only connectivity every hour, no real up or download\n    connectivity -- @every 1h -- -s 00001 --no-upload --no-download\n    # measure first of month\n    monthly -- 0 * 1 * * -- -s 00001\n\n\n### Signals\n\n* USR1 - print the currently active schedule of jobs to the logs\n\n\n## Requirements\n\nRuntime:\n\n* speedtest-go\n* a reachable speedtest server (see [here](https://support.ookla.com/hc/en-us/articles/234578528-OoklaServer-Installation-Linux-Unix) to host your own)\n\nBuild:\n\n* golang-1.24 and newer\n\n## Building\n\n    $\u003e git clone https://github.com/mgumz/speedtest-exporter\n    $\u003e cd speedtest-exporter\n    $\u003e make\n\nOne-off building and \"installation\":\n\n    $\u003e go install github.com/mgumz/speedtest-exporter/cmd/speedtest-exporter@latest\n\n## OCI Images\n\nOCI images for `linux/amd64` platform are available for recent releases under\nhttps://github.com/mgumz/speedtest-exporter/pkgs/container/speedtest-exporter\n\nMake sure to preserve the ENTRY command to benefit from the default\n[krallin/tini](s://github.com/krallin/tini) zombie. In kubernetes, this\ntranslates into omitting the `command` and only specifying `args` for passing\nspeedtest-exporter\n```yaml\n      containers:\n        - name: speedtest-prometheus-collector\n          image: ghcr.io/mgumz/speedtest-exporter:\u003cversion\u003e\n\n          # Note: We need to override the container entry point which is an\n          # array ENTRYPOINT [\"/sbin/tini\", \"--\", \"/usr/bin/speedtest-exporter\"]\n          # Only the fist element end up in the container `command`, and the two\n          # others end up in the default `args` value\n          command:\n            - \"/sbin/tini\"\n            - \"--\"\n            - \"/usr/bin/speedtest-exporter\"\n            - \"-schedule\"\n            - \"@every 24h\"\n            - \"--\"\n            - \"-s\"\n            - \"00001\"\n```\n\n## License\n\nsee LICENSE file\n\n## Author(s)\n\n* Mathias Gumz \u003cmg@2hoch5.com\u003e\n\n## Related Projects\n\n[speedtest-go]: https://github.com/showwin/speedtest-go\n[prometheus]: https://prometheus.io\n[speedtest-homeassistant]: https://www.home-assistant.io/integrations/speedtestdotnet\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmgumz%2Fspeedtest-exporter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmgumz%2Fspeedtest-exporter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmgumz%2Fspeedtest-exporter/lists"}