made influx target a env var

This commit is contained in:
Sean Corrigan 2022-03-16 12:53:53 -04:00
parent 633682b6bf
commit 20d6b5ec3e

View File

@ -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 = [