{"id":20103544,"url":"https://github.com/ccmpbll/cloudflare-speedtest-mqtt","last_synced_at":"2026-02-04T09:35:40.140Z","repository":{"id":177357236,"uuid":"568519409","full_name":"ccmpbll/cloudflare-speedtest-mqtt","owner":"ccmpbll","description":"A simple container designed to send JSON formatted CloudFlare speedtest results over MQTT.","archived":false,"fork":false,"pushed_at":"2024-06-26T02:44:53.000Z","size":228,"stargazers_count":2,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-22T20:17:09.730Z","etag":null,"topics":["cloudflare","json","mqtt","speedtest"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ccmpbll.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}},"created_at":"2022-11-20T19:29:00.000Z","updated_at":"2024-08-12T22:45:42.000Z","dependencies_parsed_at":null,"dependency_job_id":"76d2a58f-ce11-4f4a-93c0-96d75053285a","html_url":"https://github.com/ccmpbll/cloudflare-speedtest-mqtt","commit_stats":null,"previous_names":["ccmpbll/cloudflare-speedtest-mqtt"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ccmpbll/cloudflare-speedtest-mqtt","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ccmpbll%2Fcloudflare-speedtest-mqtt","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ccmpbll%2Fcloudflare-speedtest-mqtt/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ccmpbll%2Fcloudflare-speedtest-mqtt/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ccmpbll%2Fcloudflare-speedtest-mqtt/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ccmpbll","download_url":"https://codeload.github.com/ccmpbll/cloudflare-speedtest-mqtt/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ccmpbll%2Fcloudflare-speedtest-mqtt/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266384510,"owners_count":23921066,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-21T11:47:31.412Z","response_time":64,"last_error":null,"robots_txt_status":null,"robots_txt_updated_at":null,"robots_txt_url":"https://github.com/robots.txt","online":true,"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":["cloudflare","json","mqtt","speedtest"],"created_at":"2024-11-13T17:36:51.420Z","updated_at":"2026-02-04T09:35:40.101Z","avatar_url":"https://github.com/ccmpbll.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# cloudflare-speedtest-mqtt\n![Image Build Status](https://img.shields.io/github/actions/workflow/status/ccmpbll/cloudflare-speedtest-mqtt/docker-image.yml?branch=main) ![Docker Image Size](https://img.shields.io/docker/image-size/ccmpbll/cloudflare-speedtest-mqtt/latest) ![Docker Pulls](https://img.shields.io/docker/pulls/ccmpbll/cloudflare-speedtest-mqtt.svg) ![License](https://img.shields.io/badge/License-GPLv3-blue.svg)\n\nA simple container designed to send JSON formatted CloudFlare speed test results over MQTT. Borrows code from [tevslin/cloudflarepycli](https://github.com/tevslin/cloudflarepycli) to perform the speed test.\n\n#### Required environment variables:\n\nMQTT_SERVER : IP address of MQTT server\n\nMQTT_TOPIC : Topic for speed test results\n\nSLEEP : Seconds between speed test runs\n\n#### Optional environment variables:\n\nMQTT_USER: MQTT username\n\nMQTT_PASS: MQTT password\n\n#### Example:\n```\ndocker run -d -e MQTT_TOPIC='cfspeedtest/results' -e MQTT_SERVER_='192.168.1.10' -e SLEEP='3600' ccmpbll/cloudflare-speedtest-mqtt:latest\n```\n\n#### Telegraf Config Example\n\nI use Telegraf to get this data into my InfluxDB instance. Below is an excerpt from my Telegraf config that demonstrates how I accomplish this. \nIf there is a better way to do this, I am *very* open to suggestions.\n\n```TOML\n[[inputs.mqtt_consumer]]\nname_override = \"\u003cWHAT YOU WANT THE INFLUXDB TABLE TO BE CALLED\u003e\"\nservers = [\"tcp://\u003cYOUR MQTT SERVER IP\u003e:1883\"]\ntopics = [\"\u003cYOUR MQTT TOPIC\u003e\"]\ndata_format = \"json_v2\"\n[[inputs.mqtt_consumer.json_v2]]\n[[inputs.mqtt_consumer.json_v2.field]]\npath = \"wan_ip.value\"\nrename = \"wan_ip\"\ntype = \"string\"\n[[inputs.mqtt_consumer.json_v2.field]]\npath = \"service_provider.value\"\nrename = \"service_provider\"\ntype = \"string\"\n[[inputs.mqtt_consumer.json_v2.field]]\npath = \"test_location_code.value\"\nrename = \"test_location_code\"\ntype = \"string\"\n[[inputs.mqtt_consumer.json_v2.field]]\npath = \"client_location_city.value\"\nrename = \"client_location_city\"\ntype = \"string\"\n[[inputs.mqtt_consumer.json_v2.field]]\npath = \"client_location_region.value\"\nrename = \"client_location_region\"\ntype = \"string\"\n[[inputs.mqtt_consumer.json_v2.field]]\npath = \"client_location_country.value\"\nrename = \"client_location_country\"\ntype = \"string\"\n[[inputs.mqtt_consumer.json_v2.field]]\npath = \"latency_ms.value\"\nrename = \"latency_ms\"\ntype = \"float\"\n[[inputs.mqtt_consumer.json_v2.field]]\npath = \"jitter_ms.value\"\nrename = \"jitter_ms\"\ntype = \"float\"\n[[inputs.mqtt_consumer.json_v2.field]]\npath = \"100kB_download_Mbps.value\"\nrename = \"100kB_download_Mbps\"\ntype = \"float\"\n[[inputs.mqtt_consumer.json_v2.field]]\npath = \"1MB_download_Mbps.value\"\nrename = \"1MB_download_Mbps\"\ntype = \"float\"\n[[inputs.mqtt_consumer.json_v2.field]]\npath = \"10MB_download_Mbps.value\"\nrename = \"10MB_download_Mbps\"\ntype = \"float\"\n[[inputs.mqtt_consumer.json_v2.field]]\npath = \"25MB_download_Mbps.value\"\nrename = \"25MB_download_Mbps\"\ntype = \"float\"\n[[inputs.mqtt_consumer.json_v2.field]]\npath = \"90th_percentile_download_Mbps.value\"\nrename = \"90th_percentile_download_Mbps\"\ntype = \"float\"\n[[inputs.mqtt_consumer.json_v2.field]]\npath = \"100kB_upload_Mbps.value\"\nrename = \"100kB_upload_Mbps\"\ntype = \"float\"\n[[inputs.mqtt_consumer.json_v2.field]]\npath = \"1MB_upload_Mbps.value\"\nrename = \"1MB_upload_Mbps\"\ntype = \"float\"\n[[inputs.mqtt_consumer.json_v2.field]]\npath = \"10MB_upload_Mbps.value\"\nrename = \"10MB_upload_Mbps\"\ntype = \"float\"\n[[inputs.mqtt_consumer.json_v2.field]]\npath = \"90th_percentile_upload_Mbps.value\"\nrename = \"90th_percentile_upload_Mbps\"\ntype = \"float\"\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fccmpbll%2Fcloudflare-speedtest-mqtt","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fccmpbll%2Fcloudflare-speedtest-mqtt","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fccmpbll%2Fcloudflare-speedtest-mqtt/lists"}