Resources:
- https://github.com/prometheus/pushgateway
- https://github.com/nlamirault/speedtest_exporter
- https://github.com/prometheus/client_python#exporting-to-a-pushgateway
- https://stackoverflow.com/questions/40989737/how-to-push-metrics-with-python-and-prometheus-pushgateway
go build speedtest_exporter.go
./speedtest_exporter
curl -s http://localhost:9112/metrics >> file.output
data=$(cat file.output | grep "speedtest" | grep -v "#")
curl -X POST -H "Content-Type: text/plain" --data "$data
" https://pushgateway.domain.com/metrics/job/speedtest/instance/home
rm -rf file.output
while true; do sleep 60; bash speedtest-producer.sh ; done