[英]GCP Cloud Run Logs in Grafana
Is there an easy way to export GCP cloud run logs to Grafana Cloud in anyway?无论如何,有没有一种简单的方法可以将 GCP 云运行日志导出到 Grafana Cloud?
Perhaps with loki or another exporter tool to output to Grafana...or?也许使用 loki 或其他导出器工具将 output 发送到 Grafana ......或者?
I can't find any guides which even go over this logging exporting process.我找不到任何关于此日志记录导出过程的指南,甚至是 go。
GCP Cloud Run logs are sent to GCP Cloud Logging. GCP Cloud Run 日志被发送到 GCP Cloud Logging。 So, how to get Cloud Logging into Grafana.
那么,如何让 Cloud Logging 进入 Grafana。 Grafana documentation shows:
Grafana 文档显示:
- Pull-based subscription: Promtail pulls log entries from a GCP PubSub topic
基于拉取的订阅:Promtail 从 GCP PubSub 主题中拉取日志条目
- Push-based subscription: GCP sends log entries to a web server that Promtail listens
基于推送的订阅:GCP 将日志条目发送到 Promtail 侦听的 web 服务器
The outline of the basic steps is:基本步骤的概要是:
- Roles and Permission
角色和权限
- Setup Pubsub Topic
设置发布订阅主题
- Setup Log Router
设置日志路由器
- Grant log sink the pubsub publisher role
授予日志接收器 pubsub 发布者角色
- Create Pubsub subscription for Grafana Loki
为 Grafana Loki 创建 Pubsub 订阅
- Pull
拉
- Push
推
- ServiceAccount for Promtail
Promtail 的服务帐户
- Operations
操作
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.