1
0
Fork 0
mirror of https://github.com/Luzifer/mqtt2influx.git synced 2024-12-20 09:31:23 +00:00

Use SSL in influx connection

Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
Knut Ahlers 2023-03-05 13:49:26 +01:00
parent 1bf3f55845
commit a3349b0769
Signed by: luzifer
GPG key ID: D91C3E91E4CAD6F5

View file

@ -4,9 +4,15 @@ from influxdb import InfluxDBClient
class Influx(): class Influx():
def __init__(self, host, port, user, password, database): def __init__(self, host, port, user, password, database):
self.client = InfluxDBClient(host, port, self.client = InfluxDBClient(
user, password, host=host,
database) port=port,
username=user,
password=password,
database=database,
ssl=True,
verify_ssl=True,
)
self.database = database self.database = database
def submit(self, body): def submit(self, body):