From 1ef27c096e67732a6f45598da8266861497036d9 Mon Sep 17 00:00:00 2001 From: imp4ct Date: Mon, 27 Jul 2020 21:07:03 -0400 Subject: [PATCH] Added easy to customize variables --- main.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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