選項
首頁首頁 Skill 雲端基礎設施 cloud-integrations

cloud-integrations

grafana/skills grafana/skills

用於為 AWS、Azure 及其他雲服務提供商設定、配置 Grafana Cloud 整合並排除相關故障。當使用者請求連線 AWS CloudWatch、設定 Azure Monitor、配置 Confluent Cloud 可觀測性功能、安裝 Grafana 整合元件、設定託管匯出器、使用 AWS Firehose 處理 CloudWatch 日誌,或需要排除雲整合故障時即可使用該功能。會在出現“AWS CloudWatch”、“Azure Monitor”、“Confluent integration”、“cloud integration”、“hosted exporter”、“AWS Firehose”、“install”等短語時觸發。

...展開全部
12
更新時間 2026-08-25

關於雲整合功能

cloud-integrations 功能可幫助使用者為各類雲服務提供商設定、配置 Grafana Cloud 整合,並解決相關故障問題。它無需使用者自行搭建資料匯出工具,即可將雲服務提供商的監控 API 與 Grafana 系統相連。該功能透過託管型資料匯出工具解決資料獲取問題——這類工具會代表使用者抓取提供商的 API 資料並推送至 Grafana 系統,也可透過流式傳輸方式實現更低延遲的資料傳輸。

相關技能文件涵蓋了多種支援的託管型資料匯出工具,包括 AWS CloudWatch(透過 YACE 介面支援所有名稱空間)、Azure Monitor(透過 Azure Monitor API)、Confluent Cloud(透過 Confluent Metrics API 支援 Kafka 監控資料),以及通用的 Prometheus 格式 HTTP 介面;同時還介紹了透過 Kinesis Firehose 實現近乎實時資料傳輸的 AWS Firehose 接收器。文件提供了分步設定指南:指導使用者如何在 Grafana Cloud 中管理連線、確定所需的最低 AWS IAM 許可權集(包括 GetMetricData、GetMetricStatistics、ListMetrics、tag:GetResources 以及 EC2 describe 許可權)、講解如何使用 Terraform 選擇輪詢模式或 Firehose 流式傳輸模式來處理指標流和資料傳輸流、說明如何為 Azure 建立帶有 Monitoring Reader 角色的服務主體,以及如何為 Confluent 建立帶有 MetricsViewer 角色的指標 API 金鑰。此外,文件還介紹了驗證方法——包括在 Explore 頁面查詢整合任務標籤、透過 Prometheus 介面檢查標籤到達情況,以及檢視整合健康指標(最近一次成功抓取時間、資料系列數量、錯誤率)——並提供了預構建的儀表板和警報功能。所有憑證(AWS 訪問金鑰、Azure 客戶端金鑰、Confluent 金鑰、API 令牌)均以標準設定指南的形式呈現,其中包含佔位符,且所有許可權設定均遵循最小許可權原則。

該文件主要面向需要將雲監控資料接入 Grafana Cloud 的平臺工程師、SRE 以及可觀測性團隊。其應用場景包括連線 AWS CloudWatch、配置 Azure Monitor、設定 Confluent Cloud 的監控功能、在輪詢模式與 Firehose 流式傳輸模式之間做選擇,以及排查整合故障。

常見問題

支援哪些雲服務提供商和資料來源?

支援 AWS CloudWatch(透過 YACE 介面)、Azure Monitor、Confluent Cloud 以及任何通用的 Prometheus 格式 HTTP 介面,同時還支援透過 Kinesis Firehose 實現近乎實時資料傳輸的 AWS Firehose 接收器。

需要哪些 AWS 許可權?

至少需要包含 cloudwatch:GetMetricData、GetMetricStatistics、ListMetrics、tag:GetResources,以及 ec2:DescribeInstances 和 DescribeRegions 許可權的 IAM 策略,該策略需繫結到 IAM 使用者或跨賬戶角色上。

託管型資料匯出工具與 Firehose 接收器有何區別?

託管型資料匯出工具大約每 60 秒輪詢一次 CloudWatch API,資料延遲約為 1–5 分鐘;而 Firehose 接收器則透過 Kinesis Firehose 對 CloudWatch Metric Streams 和日誌訂閱資料進行流式傳輸,可實現近乎實時的低延遲資料交付。

如何驗證整合是否正常工作?

可在 Grafana 的 Explore 頁面查詢該整合的任務標籤(例如 integrations/cloudwatch),透過系統的 Prometheus 標籤介面檢查標籤是否已到達,同時可在 Connections > [Integration] > Status 頁面檢視健康指標——包括最近一次成功抓取時間應在 2 分鐘內、非零的穩定資料系列數量,以及 0% 的錯誤率。

需要哪些 Azure 和 Confluent 憑證?

對於 Azure,需要為目標訂閱賬戶建立帶有 Monitoring Reader 角色的服務主體(包括租戶資訊、客戶端 ID 和客戶端金鑰)。對於 Confluent,則需要帶有 MetricsViewer 角色的指標 API 金鑰(而非 Kafka 金鑰)。

在 GitHub 上查看

Grafana Cloud Integrations connect cloud provider monitoring APIs to your Grafana stack withoutrunning your own exporters. Hosted exporters scrape cloud APIs on your behalf and push metricsto your Grafana Cloud stack.

Supported hosted exporters:

  • AWS CloudWatch - all CloudWatch namespaces via YACE (Yet Another CloudWatch Exporter)
  • Azure Monitor - Azure resource metrics via the Azure Monitor API
  • Confluent Cloud - Kafka cluster metrics via the Confluent Metrics API
  • Generic HTTP endpoint - any Prometheus-format /metrics endpoint behind auth

AWS Firehose receiver - ingests CloudWatch Logs and Metrics Streams pushed via KinesisFirehose (near real-time, lower latency than API scraping).

Step 1: Navigate to Connections

In Grafana Cloud: Connections > Add new connection (or Connections > Cloud Provider).

Available paths:

  • AWS CloudWatch - hosted exporter + optional Firehose receiver
  • Azure Monitor - hosted exporter
  • Confluent Cloud - hosted exporter
  • All integrations - full catalog including Linux, MySQL, Kubernetes, etc.

Step 2: AWS CloudWatch integration

Option A: Hosted exporter (polling)

The hosted exporter scrapes CloudWatch API every 60s. Latency: ~1-5 minutes.

Required IAM permissions (minimum):

{  "Version": "2012-10-17",  "Statement": [    {      "Effect": "Allow",      "Action": [        "cloudwatch:GetMetricData",        "cloudwatch:GetMetricStatistics",        "cloudwatch:ListMetrics",        "tag:GetResources",        "ec2:DescribeInstances",        "ec2:DescribeRegions"      ],      "Resource": "*"    }  ]}

Setup steps:

  1. Create an IAM user or role with the policy above
  2. Generate an access key pair (for IAM user) or configure cross-account role assumption
  3. In Grafana Cloud: Connections > AWS > Configure hosted exporter
  4. Enter: AWS Access Key ID, Secret Access Key, region(s), CloudWatch namespaces to scrape
  5. Grafana provisions the exporter and begins scraping within 2-3 minutes

Supported namespaces: EC2, RDS, ELB/ALB, S3, Lambda, ECS, SQS, SNS, ElastiCache,Kinesis, DynamoDB, and 50+ others.

Option B: AWS Firehose receiver (streaming)

Near-real-time metrics and logs via CloudWatch Metric Streams and CloudWatch Logs subscriptions.

Architecture:

CloudWatch Metric Streams → Kinesis Firehose → Grafana Cloud Firehose ReceiverCloudWatch Logs (subscription filter) → Kinesis Firehose → Grafana Cloud Firehose Receiver

Setup:

  1. In Grafana Cloud: Connections > AWS > Firehose receiver
  2. Grafana provides an HTTPS endpoint URL and access token
  3. In AWS, create a Kinesis Firehose delivery stream:
    • Destination: HTTP endpoint
    • Endpoint URL: (from step 2)
    • Access key: (from step 2)
    • Content encoding: GZIP
  4. Create a CloudWatch Metric Stream pointing at the Firehose stream:
    • Output format: OpenTelemetry 1.0
    • Namespaces: select or include all
  5. For logs: add a CloudWatch Logs subscription filter pointing at the Firehose stream

Terraform for Firehose setup:

resource "aws_cloudwatch_metric_stream" "grafana_cloud" {  name          = "grafana-cloud-metrics"  role_arn      = aws_iam_role.firehose_role.arn  firehose_arn  = aws_kinesis_firehose_delivery_stream.grafana.arn  output_format = "opentelemetry1.0"  # Optionally scope to specific namespaces  # include_filter { namespace = "AWS/EC2" }  # include_filter { namespace = "AWS/RDS" }}resource "aws_kinesis_firehose_delivery_stream" "grafana" {  name        = "grafana-cloud-stream"  destination = "http_endpoint"  http_endpoint_configuration {    url            = var.grafana_firehose_endpoint    access_key     = var.grafana_firehose_access_key    name           = "Grafana Cloud"    content_encoding = "GZIP"    s3_configuration {      role_arn   = aws_iam_role.firehose_role.arn      bucket_arn = aws_s3_bucket.firehose_backup.arn    }  }}

Step 3: Azure Monitor integration

Required Azure permissions:

Create a service principal with the Monitoring Reader role on the subscription(s) to monitor.

# Create service principalaz ad sp create-for-rbac --name grafana-cloud-monitoring \  --role "Monitoring Reader" \  --scopes /subscriptions/<SUBSCRIPTION_ID># Output: appId (client ID), password (client secret), tenant

Setup in Grafana Cloud:

  1. Connections > Azure > Configure hosted exporter
  2. Enter: Tenant ID, Client ID, Client Secret, Subscription IDs
  3. Select resource types to monitor (VMs, App Services, AKS, SQL, etc.)
  4. The exporter begins scraping within 2-3 minutes

Supported resource types: Virtual Machines, App Service Plans, AKS, Azure SQL, CosmosDB,Storage Accounts, Event Hubs, Service Bus, Application Gateway, and others.

Step 4: Confluent Cloud integration

Required Confluent API credentials:

  1. In Confluent Cloud: Environment > API Keys (or Cloud API Keys for organization-level)
  2. Create a Metrics API key (not a Kafka API key) with MetricsViewer role
  3. Note the API Key and Secret

Setup in Grafana Cloud:

  1. Connections > Confluent > Configure hosted exporter
  2. Enter: Confluent API Key, API Secret, Environment ID(s), Cluster ID(s)
  3. The exporter scrapes the Confluent Metrics API every 60s

Available metrics: Consumer lag, broker request rates, partition counts, replication lag,active controller count, and cluster-level health metrics.

Step 5: Verify the integration is working

# Check in Grafana Explore — query for the integration's job label# For AWS:{job="integrations/cloudwatch"}# For Azure:{job="integrations/azure-monitor"}# Check metric arrival (replace with your stack's Prometheus endpoint)curl -s -H "Authorization: Bearer <USER>:<API_KEY>" \  "https://prometheus-prod-XX-XX-X.grafana.net/api/prom/api/v1/labels" | \  jq '.data | map(select(startswith("aws_") or startswith("azure_")))'

The integration status is also visible in: Connections > [Integration name] > Status

Integration health indicators:

  • Last successful scrape - should be within the last 2 minutes
  • Series count - should be non-zero and stable
  • Error rate - should be 0%

Step 6: Pre-built dashboards and alerts

Every integration installs a set of pre-configured dashboards and alert rules automatically.

Find installed dashboards:

  • Dashboards > Browse > folder named after the integration (e.g. "AWS CloudWatch")

Find installed alert rules:

  • Alerting > Alert rules > filter by datasource or folder

Modify without losing updates:

  1. Do not edit the provisioned dashboards directly (they may be overwritten on updates)
  2. Duplicate the dashboard (Dashboard settings > Save as copy)
  3. Edit the copy

Step 7: Troubleshoot integration failures

Hosted exporter not receiving data:

# Check the integration status via Grafana Cloud APIcurl -s -H "Authorization: Bearer <STACK_ID>:<API_TOKEN>" \  "https://integrations-api.grafana.net/api/v1/integrations" | \  jq '.integrations[] | {name, status, lastScrapeTime, errorMessage}'

Common errors:

ErrorCauseFix
AccessDenied (AWS)IAM policy missing permissionsAdd required actions to the IAM policy
AuthorizationFailed (Azure)Service principal missing roleGrant Monitoring Reader on the subscription
401 Unauthorized (Confluent)Wrong API credentialsRe-enter credentials; confirm Metrics API key (not Kafka key)
No metrics foundWrong namespace/resource type selectedAdd the namespace in integration settings
Scrape timeoutNetwork restrictionEnsure Grafana Cloud's IPs can reach the cloud provider API

AWS-specific: CloudWatch API rate limiting

CloudWatch GetMetricData has a rate limit. If you have many resources, enable Metric Streams(Option B) instead of API polling to avoid throttling.

Step 8: Reduce costs with metric filtering

Hosted exporters scrape all metrics by default. Filter to reduce series count and cost.

AWS - select specific namespaces:In integration settings, switch from "All namespaces" to specific ones (e.g. EC2, RDS only).

AWS - filter by resource tags:

# In exporter configuration, add tag filtersdiscovery:  - type: AWS/EC2    filters:      - key: Environment        values: ["production"]

Azure - select specific resource types:Only enable the resource types you actually have dashboards for.

Use Adaptive Metrics to aggregate away unused label dimensions:See the grafana-cloud/adaptive-metrics skill.

References

  • Grafana Cloud Connections documentation
  • AWS CloudWatch integration
  • Azure Monitor integration
  • YACE (Yet Another CloudWatch Exporter)
  • CloudWatch Metric Streams

所有檔案

0 個檔案

安裝 cloud-integrations

將技能檔案下載並解壓到您的 .claude/skills/ 目錄中。

下載 ZIP

複製儲存庫並將技能檔案複製到您的專案中。

git clone https://github.com/grafana/skills/blob/main/skills/grafana-cloud/cloud-integrations/SKILL.md # Copy SKILL.md to your .claude/skills/ directory

複製 複製
快速設定: 將該技能資料夾複製到 .claude/skills/ 目錄中,Claude 會自動檢測並使用該技能。
儲存庫 grafana/skills

相關技能

Cloudflare Manager
更新時間 2026-06-29
pinecone
更新時間 2026-06-29
sentry-architecture-variants
更新時間 2026-06-29
azure-setup-guide
更新時間 2026-06-29
OR