1

Is there an easy way to export GCP cloud run logs to Grafana Cloud in anyway?

Perhaps with loki or another exporter tool to output to Grafana...or?

I can't find any guides which even go over this logging exporting process.

1 Answers1

1

GCP Cloud Run logs are sent to GCP Cloud Logging. So, how to get Cloud Logging into Grafana. Grafana documentation shows:

  1. Pull-based subscription: Promtail pulls log entries from a GCP PubSub topic
  2. Push-based subscription: GCP sends log entries to a web server that Promtail listens

The outline of the basic steps is:

  • Roles and Permission
  • Setup Pubsub Topic
  • Setup Log Router
  • Grant log sink the pubsub publisher role
  • Create Pubsub subscription for Grafana Loki
  • Pull
  • Push
  • ServiceAccount for Promtail
  • Operations
Ronnie Royston
  • 16,778
  • 6
  • 77
  • 91
  • I believe this only works with a grafana server in the stack, which I don't have. There is no promtail endpoint url otherwise that I can see running only grafana cloud. – Matt - Block-Farms.io Dec 09 '22 at 13:02