diff --git a/main.py b/main.py index f9c5de9..6e7eb61 100644 --- a/main.py +++ b/main.py @@ -3,6 +3,10 @@ import speedtest import json from influxdb import InfluxDBClient +serverip = "192.168.0.13" +serverport = 8086 +serverdatabase = "telegraf" + def speed(): # To be called on schedule servers = [] # If you want to test against a specific server threads = 4 @@ -35,7 +39,7 @@ def speed(): # To be called on schedule def influxupload(): # Still having errors in uploading the data.. jsondata = speed() - client = InfluxDBClient(host='192.168.0.13', port=8086, database='telegraf') + client = InfluxDBClient(host=serverip, port=8086, database=serverdatabase) client.write(str(jsondata), protocol='json') influxupload() \ No newline at end of file