Section 4 · Query with data sources

Query GCP Cloud Logging with a Grafana data source.

Estimated time: 1 min

How it works

GCP Cloud Logging data source: Query GCP logs directly from Grafana

Authenticate with a service account JSON key, or use workload identity when you run Grafana in GKE. You write queries in Cloud Logging’s query language, and a visual query builder helps if you’re not familiar with the syntax. GCP uses two separate data sources. Configure Cloud Monitoring for metrics and Cloud Logging for logs, and the same authentication works for both.

What you get

  • All GCP service logs
  • Visual query builder
  • Filter by resource, severity
  • Template variables
  • Log context and details

Considerations

  • Cloud Logging query syntax
  • API latency
  • Separate from metrics data source
  • Per-project authentication, typically
  • Alert evaluation calls the API

Authentication options

Service account JSON key or workload identity (same as Cloud Monitoring)

Documentation

View the Cloud Logging data source documentation.