diff --git a/nut-influxdbv2-exporter.py b/nut-influxdbv2-exporter.py index 4722beb..c91280a 100644 --- a/nut-influxdbv2-exporter.py +++ b/nut-influxdbv2-exporter.py @@ -85,8 +85,15 @@ print ( "influx: "+influxdb2_url ) print ( "bucket: "+influxdb2_bucket ) -client = InfluxDBClient(url=influxdb2_url, token=influxdb2_token, org=influxdb2_org, verify_ssl=influxdb2_ssl_verify) - +if influxdb2_ssl_verify: + if debug: + print ( "verify: True" ) + client = InfluxDBClient(url=influxdb2_url, token=influxdb2_token, org=influxdb2_org, verify_ssl=True) +else: + if debug: + print ( "verify: False" ) + client = InfluxDBClient(url=influxdb2_url, token=influxdb2_token, org=influxdb2_org, verify_ssl=False) + if client and debug: print("influx: online")