Commit 87e6c5f4 authored by oni's avatar oni

influxdb fixes

parent c529451f
......@@ -29,7 +29,7 @@ def toInfluxdb(file, hostname='localhost', port=8086, username='freifunk', passw
#print("Create a retention policy")
#try:
# retention_policy = 'freifunk_policy'
retention_policy = 'freifunk_policy'
# client.alter_retention_policy(retention_policy, '6m', 1, default=True)
#except InfluxDBClientError:
# print("Retention policy existing, skipping creation")
......
......@@ -40,7 +40,7 @@ def alfred_cleaner(config, alfred_channels,batadv,alfredLock,batadvLock):
del alfred_channels[channel][node]
# wait 5 min befor writing new data into influxdb
if count % 30 == 0:
db.toInfluxdb('', hostname='localhost', port=8086, username='freifunk', password='freifunk', database='freifunk',jsond=channel)
db.toInfluxdb('', hostname='localhost', port=8086, username='freifunk', password='freifunk', database='freifunk',jsond=alfred_channels[channel])
f = open(config['alfred_out'],'w')
json.dump(alfred_channels,f)
f.close()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment