made influx target a env var
This commit is contained in:
parent
633682b6bf
commit
20d6b5ec3e
3
main.py
3
main.py
@ -11,9 +11,10 @@ from time import sleep
|
|||||||
|
|
||||||
hostList = os.environ["hosts"]
|
hostList = os.environ["hosts"]
|
||||||
hostList = hostList.split(",")
|
hostList = hostList.split(",")
|
||||||
|
influx = os.environ['influx']
|
||||||
|
|
||||||
|
|
||||||
def uploadInflux(data, host='192.168.0.13', port=8086): # Main upload
|
def uploadInflux(data, host=influx, port=8086): # Main upload
|
||||||
for UPS in data:
|
for UPS in data:
|
||||||
# bind_params = {'host': str(UPS)}
|
# bind_params = {'host': str(UPS)}
|
||||||
json_body = [
|
json_body = [
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user