How to use the influxdb.client.InfluxDBClient function in influxdb

To help you get started, we’ve selected a few influxdb examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github openstack / monasca-api / monasca_api / common / repositories / influxdb / metrics_repository.py View on Github external
def __init__(self):

        try:
            self.conf = cfg.CONF
            self.influxdb_client = client.InfluxDBClient(
                self.conf.influxdb.ip_address, self.conf.influxdb.port,
                self.conf.influxdb.user, self.conf.influxdb.password,
                self.conf.influxdb.database_name)
            self._version = None
            self._init_version()
        except Exception as ex:
            LOG.exception(ex)
            raise exceptions.RepositoryException(ex)

        self._serie_builders_version_map = {
            'to_0.11.0': (self._build_serie_dimension_values_to_v0_11_0,
                          self._build_serie_metric_list_to_v0_11_0),
            'from_0.11.0': (self._build_serie_dimension_values_from_v0_11_0,
                            self._build_serie_metric_list_from_v0_11_0)}
github nir0s / feedr / feedr / transports.py View on Github external
def configure(self):
        self.db = influxdb.InfluxDBClient(
            self.host, self.port, self.username, self.password, self.database)
        try:
            self.db.create_database(self.database)
        # TODO: (IMPRV) handle specific exception
        except:
            pass
        return self.db