大家好,今天小编关注到一个比较有意思的话题,就是关于Javascript访问influxdb的问题,于是小编就整理了3个相关介绍JavaScript访问influxdb的解答,让我们一起看看吧。
如何插入数据到influxdb?
一、安装要求:
2、由于会默认使用到8083和8086两个端口,所以要保证这两个端口没有被占用。
Onceinstallationiscompleteyoucanchangethoseportsandotheroptionsintheconfigurationfile,whichislocatedbydefaultin/etc/influxdb.
二、安装:
cat
[influxdb]
name=InfluxDBRepository-RHEL\$releasever
如何用ansible+python实现一个定时将数据插入influxdb数据库?
class Buffer(object): MAXSIZE = 8192 def __init__(self, conn, sql): self.conn = conn self.sql = sql self.buffer = [] def append(self, data): self.buffer.***end(data) if len(self.buffer) > self.MAXSIZE: self.flush() def flush(self): data, self.buffer = self.buffer, [] curr = self.conn.cursor() curr.executemany(self.sql, data) self.conn***mit() # here are your code for init database connect conn_src and conn_store...buff = Buffer(conn_store, "insert into sybase_user values (%s, %s)")sql_query = "select a.id, a.name from user_info a where a.id=%s"curr_src = conn_src.cursor()curr_src.execute(sql_query, '0001')for row in curr_src: buff.***end(row)buff.flush()
如何用ansible+python实现一个定时将数据插入influxdb数据库?
class Buffer(object): MAXSIZE = 8192 def __init__(self, conn, sql): self.conn = conn self.sql = sql self.buffer = [] def ***end(self, data): self.buffer.***end(data) if len(self.buffer) > self.MAXSIZE: self.flush() def flush(self): data, self.buffer = self.buffer, [] curr = self.conn.cursor() curr.executemany(self.sql, data) self.conn***mit() # here are your code for init database connect conn_src and conn_store...buff = Buffer(conn_store, "insert into sybase_user values (%s, %s)")sql_query = "select a.id, a.name from user_info a where a.id=%s"curr_src = conn_src.cursor()curr_src.execute(sql_query, '0001')for row in curr_src: buff.***end(row)buff.flush()
到此,以上就是小编对于Javascript访问influxdb的问题就介绍到这了,希望介绍关于J***aScript访问influxdb的3点解答对大家有用。
[免责声明]本文来源于网络,不代表本站立场,如转载内容涉及版权等问题,请联系邮箱:83115484@qq.com,我们会予以删除相关文章,保证您的权利。 转载请注明出处:http://www.fengdengtech.com/post/34555.html