def __init__(self): self.host = 'qdot-server.phas.ubc.ca' self.port = 8086 self.dbname = 'test' self.timezone = pytz.timezone('America/Vancouver') InfluxDBClient.__init__(self, host=self.host, port=self.port, database=self.dbname)
def __init__(self,config_file="influx.json"): #Load database credentials fp = open(config_file,"r") self.config = json.load(fp) fp.close() #Connect InfluxDBClient.__init__(self,self.config["host"], self.config["port"], self.config["user"], self.config["password"], self.config["database"])
def __init__(self,config_file="influx2.json"): #Load database credentials fp = open(config_file,"r") self.config = json.load(fp) fp.close() #Connect InfluxDBClient.__init__(self,self.config["host"], self.config["port"], self.config["user"], self.config["password"], self.config["database"])
def __init__(self, hbot): """ :param object hbot: :class:`jnpr.healthbot.HealthBotClient` client instance Example: :: hb.database.query("show databases") hb.database.query('select * from "protocol-eventd-host/check-host-traffic/packet-loss" limit 10', database='Core:vmx') """ self.hbot = hbot self.url = hbot.url InfluxDBClient.__init__(self, hbot.server, 8086)
def __init__(self, tag_prefix="#", **kwargs): InfluxDBClient.__init__(self, **kwargs) self.tag_prefix = tag_prefix