Generated banner for Infrastructure
Generated logo for Infrastructure

Infrastructure

Grafana LabsOfficialPublished by Grafana Labs

  • Skill
  • Tool integration
  • Cloud and DevOps
  • Apache-2.0
  • Low risk

From the author

Ship Kubernetes, host, container, and cloud-provider telemetry into Grafana Cloud — `k8s-monitoring` Helm chart for K8s clusters (metrics + logs + traces + events + cost), Alloy `prometheus.exporter.unix` for Linux hosts, cAdvisor + Docker discovery for containers, and CloudWatch / Azure Monitor / Google Cloud Monitoring datasource setup. Use when onboarding a new cluster or VM fleet to Grafana Cloud, picking the right Helm values for K8s scraping, wiring kube-state-metrics + node-exporter + cAdvisor, alerting on `PodCrashLooping` / node memory / PVC capacity, or pulling AWS / Azure / GCP cloud metrics — even when the user says "monitor my cluster", "send K8s metrics to Grafana", "scrape EC2 metrics", "cluster pod logs", or "install the monitoring helm chart" without naming `k8s-monitoring` or Alloy.
— the description by Grafana Labs

AutoGineer summary

Written by AutoGineer from the skill’s own files, not by the author

This skill provides guidance and configurations for shipping telemetry data from Kubernetes clusters, Linux hosts, containers, and cloud providers into Grafana Cloud. It covers the use of the k8s-monitoring Helm chart for Kubernetes environments, Alloy for host and container metrics, and specific datasource configurations for AWS, Azure, and Google Cloud monitoring services.

What it does

  • Deploys the k8s-monitoring Helm chart for comprehensive Kubernetes cluster observability.
  • Configures Alloy to collect metrics from Linux hosts and containers.
  • Sets up cloud-provider datasources for AWS CloudWatch, Azure Monitor, and Google Cloud Monitoring.
  • Provides reference configurations for metrics, logs, traces, and events.
  • Includes common PromQL queries and alert rules for monitoring cluster health.
  • Offers troubleshooting steps for common installation and connectivity issues.

When to use it

  • When onboarding a new Kubernetes cluster or VM fleet to Grafana Cloud.
  • When you need to scrape metrics from cloud-provider services like AWS, Azure, or GCP.
  • When setting up monitoring for Linux hosts or containerized environments.
  • When you need to implement standard alerting for pod crashes, memory pressure, or storage capacity.

Advantages

  • Centralizes telemetry from diverse infrastructure sources into a single Grafana Cloud instance.
  • Provides pre-configured Helm values and Alloy snippets to reduce setup time.
  • Includes ready-to-use PromQL queries and dashboard IDs for immediate visibility.
  • Offers clear guidance on managing authentication and secrets for secure data transmission.

Usage examples

“How do I monitor my Kubernetes cluster with Grafana Cloud?”
The agent provides the steps to create a monitoring namespace, configure the API key secret, and install the k8s-monitoring Helm chart.
“I need to scrape EC2 metrics into my Grafana dashboard.”
The agent explains how to provision the CloudWatch datasource using the appropriate YAML configuration for your region and credentials.
“How can I monitor a Linux host using Alloy?”
The agent provides the Alloy configuration block for the unix exporter and instructions to reload the service.
“What are some useful alerts for my Kubernetes pods?”
The agent provides YAML alert rules for detecting PodCrashLooping, low node memory, and full persistent volumes.

Install

  1. Download the skill as a ZIP:

    https://autogineer.com/agent-skills/grafana/infrastructure/download
  2. Unzip it into the cross-client skills folder of your project:

    mkdir -p .agents/skills && unzip infrastructure.zip -d .agents/skills

Documentation by Grafana Labs

Grafana Cloud Infrastructure Monitoring

Docs: https://grafana.com/docs/grafana-cloud/monitor-infrastructure/

K8s + host + container + cloud-provider telemetry, mostly via the grafana/k8s-monitoring Helm chart or Alloy.

Prerequisites

  • Grafana Cloud stack with Prometheus / Loki / Tempo endpoints + API key (metrics:write, logs:write, traces:write)

  • For Kubernetes: a cluster + helm 3.x + kubectl context pointing at it

  • For hosts / Docker: Alloy installed on the node

Common Workflows

1. Onboard a Kubernetes cluster (k8s-monitoring chart)
# 1. Create the namespace + secret
kubectl create namespace monitoring
kubectl create secret generic grafana-cloud-secret \
  -n monitoring --from-literal=api-key=<your-api-key>

# 2. Install — values.yaml in references/k8s-monitoring-values.md
helm repo add grafana https://grafana.github.io/helm-charts && helm repo update
helm install k8s-monitoring grafana/k8s-monitoring \
  --version 4.1.4 -n monitoring -f values.yaml

# 3. Verify every pod is Running
kubectl get pods -n monitoring
# Expect alloy-*, kube-state-metrics-*, node-exporter-*, etc. all Ready.

# 4. Verify no error logs in the metrics/logs/traces Alloys
kubectl -n monitoring logs deploy/k8s-monitoring-alloy-metrics --tail=50 | grep -iE 'error|level=err' || echo "clean"

# 5. Verify telemetry landed in Grafana Cloud
#    PromQL on the metrics datasource (should be > 0):
#      sum(up{cluster="production-us-east"})
#    LogQL on Loki:
#      sum(count_over_time({cluster="production-us-east"}[5m]))

Full values.yaml, key PromQL, dashboard IDs (15520, 1860, 14282…), and alert rules: references/k8s-monitoring-values.md.

2. Monitor a Linux host
# 1. /etc/alloy/config.alloy — see references/clouds-and-hosts.md for the full block
prometheus.exporter.unix "host"  { rootfs_path = "/" }
prometheus.scrape         "node" { targets = prometheus.exporter.unix.host.targets
                                   forward_to = [prometheus.remote_write.cloud.receiver] }
# 2. Reload Alloy and verify the unix exporter is up
systemctl reload alloy
curl -s http://localhost:12345/api/v0/web/components | jq '.[] | select(.id|contains("prometheus.exporter.unix"))'

# 3. Verify in Grafana Cloud — open the "Node Exporter Full" dashboard (ID 1860)
#    and pick your host from the `instance` dropdown.
3. Pull AWS / Azure / GCP metrics

Provision the datasource (full YAML in references/clouds-and-hosts.md), then:

# 1. After provisioning, restart Grafana to pick up the file
# 2. Verify the datasource — Grafana → Connections → Data sources → "Test"
#    Expect "Successfully queried the CloudWatch metrics API" (or equivalent).
# 3. Confirm a query — Explore → datasource → metric e.g.
#    CloudWatch namespace AWS/EC2 metric CPUUtilization, last 1h.

Troubleshooting

  • chart installed but no metrics in Cloud → check the grafana-cloud-secret api-key value; check Alloy logs for 401

  • kube-state-metrics pod Pending → likely RBAC; reapply the chart's CRDs/CRBs

  • Node-exporter pod CrashLoopBackOff → typically hostNetwork: true collision with the host's :9100; change the port

  • CloudWatch "Access denied" → IAM role missing cloudwatch:GetMetricData, cloudwatch:ListMetrics

Resources

Files

Requirements and compatibility

Works with: Claude Code, Claude apps, OpenAI Codex, GitHub Copilot, Cursor, Gemini CLI, Kiro, OpenCode, Goose, Amp, Roo Code, JetBrains Junie, Factory Droid, Devin (ex-Windsurf), Mistral Vibe, OpenHands, Letta

“Works with” means the tool reads the open Agent Skills format; a skill written for one tool may use features others lack.

Needs: Needs network access, Needs an API key, Needs a command-line tool, Needs Node.js

Security

What our scanner noticed· Low risk

  • Instructions that use the network

A static scan is not a guarantee. Skills are third-party content: review a skill before you let an agent use it.

Attribution and licence

Published by
Grafana Labs
Publisher
Grafana Labs (Official)
Source
grafana/skills · skills/grafana-cloud/infrastructure · commit 8fb72a5
Licence
Apache License 2.0 (redistribution allowed)
  • LICENSE (added by AutoGineer from LICENSE)
  • ATTRIBUTION.md (written by AutoGineer)
Synced

AutoGineer is not affiliated with or endorsed by Grafana Labs or Grafana Labs.

Download ZIP

The ZIP holds the skill’s files, its licence files and an ATTRIBUTION.md. Download infrastructure.zip