Skip to content

Commit

Permalink
INFLUXDB2_SSL_VERIFY
Browse files Browse the repository at this point in the history
  • Loading branch information
dbsqp authored Sep 16, 2022
1 parent 0ca0b33 commit b44cbd6
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion nut-influxdbv2-exporter.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,12 @@
else:
influxdb2_ssl = False

influxdb2_ssl_verify_str=os.getenv('INFLUXDB2_SSL_VERIFY', "False")
if influxdb2_ssl_verify_str is not None:
influxdb2_ssl_verify = influxdb2_ssl_verify_str.lower() == "true"
else:
influxdb2_ssl_verify = False

# hard encoded environment variables


Expand Down Expand Up @@ -79,7 +85,8 @@
print ( "influx: "+influxdb2_url )
print ( "bucket: "+influxdb2_bucket )

client = InfluxDBClient(url=influxdb2_url, token=influxdb2_token, org=influxdb2_org)
client = InfluxDBClient(url=influxdb2_url, token=influxdb2_token, org=influxdb2_org, ssl=influxdb2_ssl, verify_ssl=influxdb2_ssl_verify)

if client and debug:
print("influx: online")

Expand Down

0 comments on commit b44cbd6

Please sign in to comment.