按标签创建字段平均值的条形图?
我在服务器上设置了 Promtail,以按主机、端点等标记日志行,并在 Loki 中从这些日志行中提取响应时间作为字段。
我想要做的是将这些日志转换为条形图,显示端点的平均响应时间 (action_time_ms
)。
我在 Loki LogQL 文档中找到了 指标查询页面,但是我不知道如何将其转换为 Grafana 的正确查询类型,以从中制作条形图。领域还重要吗?
Grafana v8.4.2、Loki/Promtail v2.4.2。
I have Promtail set up on my servers to label log lines by host, endpoint, etc. and Loki to extract response times from these log lines as a field.
Here's a sample log from the explorer in Grafana:
What I want to do is turn these logs into a bar chart, showing average response time (action_time_ms
) by endpoint.
I've found the metric queries page in the Loki LogQL docs, but I'm not sure how to turn that into the right kind of query for Grafana to make a bar chart out of it. Do fields even matter?
Grafana v8.4.2, Loki/Promtail v2.4.2.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论