api/alfredX: Update code for InfluxDB test

This changes mechanism for legacy alfred to remove the 64 array
already in Monitoring and send to the same script as for alfred2.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
This commit is contained in:
Adrian Schmutzler 2019-09-30 13:11:05 +02:00
parent 6dd5a163d7
commit ccb5bb020f
1 changed files with 3 additions and 3 deletions

View File

@ -160,8 +160,8 @@ def alfred():
alfred_data = request.get_json()
# send data to christiand to test grafana/influxdb
try:
rcd = requests.post(url = "http://homeserver.dresel.it/freifunkgrafanaold.php", data = alfred_data, timeout=3)
writelog(CONFIG["debug_dir"] + "/chrisd.txt", "%s" % (rcd.text))
rcd = requests.post(url = "http://homeserver.dresel.it/freifunkgrafana.php", data = alfred_data.get("64", {}), timeout=3)
writelog(CONFIG["debug_dir"] + "/chrisd.txt", "alfred: %s" % (rcd.text))
except requests.Timeout:
pass
except requests.ConnectionError:
@ -222,7 +222,7 @@ def alfred2():
# send data to christiand to test grafana/influxdb
try:
rcd = requests.post(url = "http://homeserver.dresel.it/freifunkgrafana.php", data = alfred_data, timeout=3)
writelog(CONFIG["debug_dir"] + "/chrisd.txt", "%s" % (rcd.text))
writelog(CONFIG["debug_dir"] + "/chrisd.txt", "alfred2: %s" % (rcd.text))
except requests.Timeout:
pass
except requests.ConnectionError: