欧卡2中文社区

 找回密码
 立即注册

QQ登录

只需一步,快速开始

需要三步,才能开始

只需两步,慢速开始

欧卡2入门方向盘选莱仕达V9莱仕达折叠便携游戏方向盘支架欢迎地图Mod入驻
查看: 4549|回复: 1
收起左侧

tengine状态码监控cq

[复制链接]
oppo 发表于 2016-12-23 09:36 | 显示全部楼层 |阅读模式
CREATE CONTINUOUS QUERY rate_m ON tengine BEGIN SELECT (non_negative_derivative(last(http_2xx), 1s) + 0.001) / (non_negative_derivative(last(req_total), 1s) + 0.001) AS rate_2xx, non_negative_derivative(last(http_4xx), 1s) / non_negative_derivative(last(req_total), 1s) AS rate_4xx, non_negative_derivative(last(http_5xx), 1s) / non_negative_derivative(last(req_total), 1s) AS rate_5xx, non_negative_derivative(last(http_3xx), 1s) / non_negative_derivative(last(req_total), 1s) AS rate_3xx, non_negative_derivative(last(http_499), 1s) / non_negative_derivative(last(req_total), 1s) AS rate_499, non_negative_derivative(last(http_404), 1s) / non_negative_derivative(last(req_total), 1s) AS rate_404, non_negative_derivative(last(http_500), 1s) / non_negative_derivative(last(req_total), 1s) AS rate_500, non_negative_derivative(last(http_502), 1s) / non_negative_derivative(last(req_total), 1s) AS rate_502, non_negative_derivative(last(http_503), 1s) / non_negative_derivative(last(req_total), 1s) AS rate_503, non_negative_derivative(last(http_504), 1s) / non_negative_derivative(last(req_total), 1s) AS rate_504 INTO tengine."default".rate_m_reqstat FROM tengine."default".reqstat GROUP BY time(5m), cluster, server, app END
CREATE CONTINUOUS QUERY rate_h ON tengine BEGIN SELECT (non_negative_derivative(last(http_2xx), 1s) + 0.001) / (non_negative_derivative(last(req_total), 1s) + 0.001) AS rate_2xx, non_negative_derivative(last(http_4xx), 1s) / non_negative_derivative(last(req_total), 1s) AS rate_4xx, non_negative_derivative(last(http_5xx), 1s) / non_negative_derivative(last(req_total), 1s) AS rate_5xx, non_negative_derivative(last(http_3xx), 1s) / non_negative_derivative(last(req_total), 1s) AS rate_3xx, non_negative_derivative(last(http_499), 1s) / non_negative_derivative(last(req_total), 1s) AS rate_499, non_negative_derivative(last(http_404), 1s) / non_negative_derivative(last(req_total), 1s) AS rate_404, non_negative_derivative(last(http_500), 1s) / non_negative_derivative(last(req_total), 1s) AS rate_500, non_negative_derivative(last(http_502), 1s) / non_negative_derivative(last(req_total), 1s) AS rate_502, non_negative_derivative(last(http_503), 1s) / non_negative_derivative(last(req_total), 1s) AS rate_503, non_negative_derivative(last(http_504), 1s) / non_negative_derivative(last(req_total), 1s) AS rate_504 INTO tengine.trend_365.rate_h_reqstat FROM tengine."default".reqstat GROUP BY time(1h), cluster, server, app END
CREATE CONTINUOUS QUERY rate_d ON tengine BEGIN SELECT (non_negative_derivative(last(http_2xx), 1s) + 0.001) / (non_negative_derivative(last(req_total), 1s) + 0.001) AS rate_2xx, non_negative_derivative(last(http_4xx), 1s) / non_negative_derivative(last(req_total), 1s) AS rate_4xx, non_negative_derivative(last(http_5xx), 1s) / non_negative_derivative(last(req_total), 1s) AS rate_5xx, non_negative_derivative(last(http_3xx), 1s) / non_negative_derivative(last(req_total), 1s) AS rate_3xx, non_negative_derivative(last(http_499), 1s) / non_negative_derivative(last(req_total), 1s) AS rate_499, non_negative_derivative(last(http_404), 1s) / non_negative_derivative(last(req_total), 1s) AS rate_404, non_negative_derivative(last(http_500), 1s) / non_negative_derivative(last(req_total), 1s) AS rate_500, non_negative_derivative(last(http_502), 1s) / non_negative_derivative(last(req_total), 1s) AS rate_502, non_negative_derivative(last(http_503), 1s) / non_negative_derivative(last(req_total), 1s) AS rate_503, non_negative_derivative(last(http_504), 1s) / non_negative_derivative(last(req_total), 1s) AS rate_504 INTO tengine.trend_365.rate_d_reqstat FROM tengine."default".reqstat GROUP BY time(1d), cluster, server, app END
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

联系我们|手机版|欧卡2中国 ( 湘ICP备11020288号-1 )

GMT+8, 2024-12-27 13:47 , Processed in 0.047218 second(s), 15 queries , Redis On.

Powered by Discuz! X3.4

Copyright © 2001-2023, Tencent Cloud.

快速回复 返回顶部 返回列表