Grafana曲线图展示每秒新增数据量

添加MySQL数据源 -> 添加查询条件

sql 模式编写查询条件:

1
2
3
4
5
6
7
8
9
10
SELECT
$__timeGroupAlias(create_time, $interval),
count(order_no) as '创单数量'
FROM t_order
WHERE
merchant_id = $merchant_id AND
$__timeFilter(create_time)
GROUP BY 1
ORDER BY
$__timeGroup(create_time, $interval);
1
2
3
4
5
6
7
8
SELECT
$__timeGroupAlias(create_time, 1s),
count(uuid) AS "num"
FROM t_user
WHERE
$__timeFilter(create_time)
GROUP BY 1
ORDER BY $__timeGroup(create_time, 1s)

Powered by AppBlog.CN     浙ICP备14037229号

Copyright © 2012 - 2020 APP开发技术博客 All Rights Reserved.

访客数 : | 访问量 :