1
0
Fork 0

Support influxdb ssl connections

Adds a setting, INFLUX_SSL which when set to True will use SSL in the connection to influxdb.

Signed-off-by: Corey Shields <cshields@gmail.com>
merge-requests/310/head
Corey Shields 2018-12-29 20:03:58 -05:00
parent c8b7613c8b
commit f0e8de3cc8
3 changed files with 3 additions and 2 deletions

View File

@ -181,7 +181,7 @@ def reset_decoded_data(norad):
if settings.USE_INFLUX:
client = InfluxDBClient(settings.INFLUX_HOST, settings.INFLUX_PORT,
settings.INFLUX_USER, settings.INFLUX_PASS,
settings.INFLUX_DB)
settings.INFLUX_DB, ssl=settings.INFLUX_SSL)
client.query('DROP SERIES FROM /.*/ WHERE \"norad\" = \'{0}\''
.format(norad))

View File

@ -164,7 +164,7 @@ def write_influx(json_obj):
"""Take a json object and send to influxdb."""
client = InfluxDBClient(settings.INFLUX_HOST, settings.INFLUX_PORT,
settings.INFLUX_USER, settings.INFLUX_PASS,
settings.INFLUX_DB)
settings.INFLUX_DB, ssl=settings.INFLUX_SSL)
client.write_points(json_obj)

View File

@ -300,6 +300,7 @@ INFLUX_PORT = config('INFLUX_PORT', default='8086')
INFLUX_USER = config('INFLUX_USER', default='db')
INFLUX_PASS = config('INFLUX_PASS', default='db')
INFLUX_DB = config('INFLUX_DB', default='db')
INFLUX_SSL = config('INFLUX_SSL', default=False, cast=bool)
if AUTH0:
SOCIAL_AUTH_TRAILING_SLASH = False # Remove end slash from routes