influxdb语句

编程


-- 创建CONTINUOUS 查询

http://influxproxy.dev.bkjk.cn/query?db=micrometerDb&q=CREATE CONTINUOUS QUERY "thread_every" ON "micrometerDb" 
RESAMPLE EVERY 1m  FOR 30m
BEGIN 
    SELECT mean(value)  INTO "thread_result" FROM "jvm_threads_live" where  time >= now() - 1h GROUP BY time(1m) 
END

-- 
http://influxproxy.dev.bkjk.cn/query?db=micrometerDb&q=select  * from  thread_result

http://influxproxy.dev.bkjk.cn/query?db=micrometerDb&q=select  max(mean), from  thread_result
 

-- 查看

http://influxproxy.dev.bkjk.cn/query?db=micrometerDb&q=SHOW CONTINUOUS QUERIES

-- 删除 CONTINUOUS QUERY

http://influxproxy.dev.bkjk.cn/query?db=micrometerDb&q=DROP CONTINUOUS QUERY thread_every  ON micrometerDb

-- 删除 MEASUREMENT
http://influxproxy.dev.bkjk.cn/query?db=micrometerDb&q=DROP MEASUREMENT  thread_result


-- 查询所有MEASUREMENTS

http://influxproxy.dev.bkjk.cn/query?db=micrometerDb&q=SHOW MEASUREMENTS

-- 查询所有CONTINUOUS

http://influxproxy.dev.bkjk.cn/query?db=micrometerDb&q=SHOW CONTINUOUS QUERIES

 


 

以上是 influxdb语句 的全部内容, 来源链接: utcz.com/z/514797.html

回到顶部