Add SSL support for InfluxDB connection.
Added ssl and verify_ssl options to influxdb config Task: 44888 Story: 2009950 Change-Id: Icfe06233a178a5383441db6d87d46b93b6a63757
This commit is contained in:
parent
1e67714731
commit
87938f738e
@ -104,6 +104,7 @@ sudo chmod 640 /etc/monasca/monasca-persister.conf
|
|||||||
|
|
||||||
Most of the configuration options should be left at default, but at a
|
Most of the configuration options should be left at default, but at a
|
||||||
minimum, the following should be changed:
|
minimum, the following should be changed:
|
||||||
|
The default value for influxdb ssl and verify_ssl is False. Only add/change if your influxdb is using SSL.
|
||||||
|
|
||||||
```
|
```
|
||||||
[zookeeper]
|
[zookeeper]
|
||||||
@ -121,6 +122,8 @@ ip_address =
|
|||||||
port =
|
port =
|
||||||
user =
|
user =
|
||||||
password =
|
password =
|
||||||
|
ssl =
|
||||||
|
verify_ssl =
|
||||||
```
|
```
|
||||||
|
|
||||||
### Running
|
### Running
|
||||||
|
@ -36,6 +36,12 @@ influxdb_opts = [
|
|||||||
cfg.PortOpt('port',
|
cfg.PortOpt('port',
|
||||||
help='port to influxdb',
|
help='port to influxdb',
|
||||||
default=8086),
|
default=8086),
|
||||||
|
cfg.BoolOpt('ssl',
|
||||||
|
help='Boolean',
|
||||||
|
default=False),
|
||||||
|
cfg.BoolOpt('verify_ssl',
|
||||||
|
help='Boolean',
|
||||||
|
default=False),
|
||||||
cfg.StrOpt('user',
|
cfg.StrOpt('user',
|
||||||
help='influxdb user ',
|
help='influxdb user ',
|
||||||
default='mon_persister'),
|
default='mon_persister'),
|
||||||
|
@ -28,10 +28,12 @@ class AbstractInfluxdbRepository(abstract_repository.AbstractRepository, metacla
|
|||||||
super(AbstractInfluxdbRepository, self).__init__()
|
super(AbstractInfluxdbRepository, self).__init__()
|
||||||
self.conf = cfg.CONF
|
self.conf = cfg.CONF
|
||||||
self._influxdb_client = influxdb.InfluxDBClient(
|
self._influxdb_client = influxdb.InfluxDBClient(
|
||||||
self.conf.influxdb.ip_address,
|
host=self.conf.influxdb.ip_address,
|
||||||
self.conf.influxdb.port,
|
port=self.conf.influxdb.port,
|
||||||
self.conf.influxdb.user,
|
username=self.conf.influxdb.user,
|
||||||
self.conf.influxdb.password)
|
password=self.conf.influxdb.password,
|
||||||
|
ssl=self.conf.influxdb.ssl,
|
||||||
|
verify_ssl=self.conf.influxdb.verify_ssl)
|
||||||
if self.conf.influxdb.db_per_tenant:
|
if self.conf.influxdb.db_per_tenant:
|
||||||
self.data_points_class = data_points.DataPointsAsDict
|
self.data_points_class = data_points.DataPointsAsDict
|
||||||
else:
|
else:
|
||||||
|
Loading…
Reference in New Issue
Block a user