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:
parent
1bf3f55845
commit
a3349b0769
1 changed files with 9 additions and 3 deletions
12
influx.py
12
influx.py
|
@ -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):
|
||||||
|
|
Loading…
Reference in a new issue