grafana接入sls的同比实现
(*)| select
time,
to_unixtime(date_parse(concat(date_format(current_timestamp, '%Y-%m-%d '),time), '%Y-%m-%d %H:%i')) as t,
diff [1] as today,
diff [2] as yesterday,
diff [3] as rate
FROM (
select
time,
compare(pv, 86400) as diff
FROM (
select count(1) as pv , date_format(from_unixtime(__time__), '%H:%i') as time from log group by time
)
group by
time
)
order by
time
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。