admin管理员组文章数量:1131394
This is my loki log format look like:
2025-01-07 15:15:35.612
{"request_time":"2025-01-07T07:15:35+00:00","refer_domain":"/","uri":"/youxuetest/miniapp/youzihui-shop-testout/1.0.1/assets/uni-forms.c9f6234a.js","return_code":200,"domain":"www.danet","route_id":"508853602857518009","body_bytes_sent":"16210"}
2025-01-07 15:15:35.609
{"refer_domain":"/","return_code":200,"request_time":"2025-01-07T07:15:35+00:00","body_bytes_sent":"7378","domain":"www.danet","route_id":"508853602857518009","uri":"/youxuetest/miniapp/youzihui-shop-testout/1.0.1/assets/uni-easyinput.361c23c0.js"}
now I want to sum the fields body_bytes_sent
by time range, then I write my query command like this:
?query=sum_over_time({app="minio-traffic"} | json | unwrap body_bytes_sent [1m])
this is the query url:
http://192.168.116.89:3100/loki/api/v1/query_range?query=sum_over_time({app=%22minio-traffic%22}%20|%20json%20|%20unwrap%20body_bytes_sent%20[1m])
what I expect the result is only one row that tell me the last 1m's body_bytes_sent
size, what I found the rsult is that there contains many rows and some tiems exeed the limit of 500. I have tried using sum
function but it not work. Am I missing something? what should I do to make the aggregation query work?
本文标签: loki sum over time return too many resultStack Overflow
版权声明:本文标题:loki sum over time return too many result - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1736760583a1951521.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论