Slide 2 of 7

How direct query works

How it works

Direct query architecture: Grafana queries cloud provider APIs in real-time

Important: This module covers Grafana data source plugins, which are a core Grafana capability available in all Grafana editions (OSS, Enterprise, and Cloud). Data sources are not part of the Cloud Provider Observability product. They’re included in this course because they offer an alternative path to cloud visibility that may suit certain use cases.

How it works

StepDescription
1Configure cloud provider credentials in Grafana.
2Data stays in CloudWatch / Azure Monitor / Cloud Monitoring.
3Grafana queries cloud API in real-time.
4No data duplication or additional storage.

When to choose this approach

Choose direct query when…Choose storage when…
Quick visualization neededLong-term retention required
Cost sensitivity is highUnified PromQL/LogQL wanted
Data already has good retentionCross-cloud correlation needed
Simple dashboardsComplex alerting required

Script

Before we go further, here’s an important clarification. Everything we covered in Modules 2 and 3, collecting metrics and logs and storing them in Grafana Cloud, that’s the Cloud Provider Observability product.

What we’re covering now is different. Data source plugins are a core Grafana capability that exists in every edition: open source Grafana, Grafana Enterprise, and Grafana Cloud. They’re not part of Cloud Provider Observability, but we cover them here because they offer a legitimate alternative path.

So how does this work? You configure credentials for your cloud provider. When you open a dashboard, Grafana calls the CloudWatch API, the Azure Monitor API, or the Cloud Monitoring API in real-time. The data never leaves your cloud provider. Grafana just fetches what you need for the current view.

The appeal is simplicity. No collection infrastructure, no storage costs, no data duplication.

The trade-offs? Query performance depends on the cloud API. You’re using CloudWatch’s query syntax or Azure’s KQL, not PromQL. And alerting makes an API call for every evaluation, which can add up.

This approach works great for quick visualizations, proof-of-concept work, or when you’re cost-sensitive and already have good retention in your cloud provider.