From 07640abb55bffad8b6e975a57ec3b8a9dcc95169 Mon Sep 17 00:00:00 2001 From: dbsqp <5895806+dbsqp@users.noreply.github.com> Date: Fri, 16 Sep 2022 18:24:22 +0200 Subject: [PATCH] Update nut-influxdbv2-exporter.py --- nut-influxdbv2-exporter.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) 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")