Send Data
Grafana LabsOfficialPublished by Grafana Labs
- Skill
- Tool integration
- Cloud and DevOps
- Apache-2.0
- Low risk
AutoGineer summary
Written by AutoGineer from the skill’s own files, not by the author
This skill provides technical guidance and configuration patterns for sending telemetry data—including metrics, logs, traces, and profiles—to Grafana Cloud. It covers multiple ingestion methods, ranging from using the Alloy collector and Kubernetes operators to direct SDK integrations and API-based pushes. The content includes credential management, environment variable setup, and examples for various infrastructure and application environments.
What it does
- Configures Alloy pipelines for unified metrics, logs, and trace collection.
- Demonstrates direct Prometheus remote write and Loki push configurations.
- Provides OpenTelemetry SDK integration patterns for application-level tracing.
- Explains how to deploy the Kubernetes monitoring agent via Helm.
- Details API key management and role-based access for data ingestion.
- Lists methods for managing cloud-native infrastructure integrations.
When to use it
- When setting up observability pipelines for new applications or infrastructure.
- When migrating existing Prometheus or Loki setups to Grafana Cloud.
- When choosing the appropriate ingestion method for specific telemetry signals.
- When configuring secure authentication for data exporters.
Advantages
- Provides standardized configuration templates for multiple signals.
- Supports both agent-based and direct-to-cloud ingestion workflows.
- Includes practical examples for common tools like Helm and OpenTelemetry.
- Centralizes credential and endpoint discovery information.
Usage examples
- “How do I configure Prometheus remote write to send metrics to Grafana Cloud?”
- The skill provides a prometheus.yml configuration snippet showing the required remote_write block, endpoint URL, and basic authentication settings.
- “Show me how to set up log collection using Alloy.”
- The skill provides an Alloy configuration example using loki.source.file and loki.write components to forward logs to Grafana Cloud.
- “What are the environment variables for OTLP tracing?”
- The skill lists the required OTEL_EXPORTER_OTLP_ENDPOINT, OTEL_EXPORTER_OTLP_HEADERS, and OTEL_SERVICE_NAME variables with instructions on how to format the authorization header.
- “How can I deploy monitoring for my Kubernetes cluster?”
- The skill provides a values.yaml template for the grafana/k8s-monitoring Helm chart and the corresponding installation command.
Install
Download the skill as a ZIP:
https://autogineer.com/agent-skills/grafana/send-data/downloadUnzip it into the cross-client skills folder of your project:
mkdir -p .agents/skills && unzip send-data.zip -d .agents/skills
Documentation by Grafana Labs
Sending Data to Grafana Cloud
Quick Start: Find Your Credentials
In Grafana Cloud portal → My Account → Stack → Details:
| Signal | Credential Fields |
|---|---|
| Metrics | Prometheus remote write URL, username, password/API key |
| Logs | Loki URL, username, password/API key |
| Traces | Tempo OTLP endpoint, username, password/API key |
| Profiles | Pyroscope URL, username, password/API key |
Alloy (Recommended — All Signals)
// METRICS
prometheus.scrape "app" {
targets = [{"__address__" = "localhost:8080"}]
forward_to = [prometheus.remote_write.cloud.receiver]
}
prometheus.remote_write "cloud" {
endpoint {
url = "https://prometheus-prod-xx.grafana.net/api/prom/push"
basic_auth {
username = sys.env("PROM_USER")
password = sys.env("GRAFANA_CLOUD_API_KEY")
}
}
}
// LOGS
loki.source.file "app" {
targets = [{__path__ = "/var/log/app/*.log", job = "app"}]
forward_to = [loki.write.cloud.receiver]
}
loki.write "cloud" {
endpoint {
url = "https://logs-prod-xx.grafana.net/loki/api/v1/push"
basic_auth {
username = sys.env("LOKI_USER")
password = sys.env("GRAFANA_CLOUD_API_KEY")
}
}
}
// TRACES (OTLP receive → forward)
otelcol.receiver.otlp "default" {
grpc { endpoint = "0.0.0.0:4317" }
http { endpoint = "0.0.0.0:4318" }
output {
traces = [otelcol.exporter.otlp.cloud.input]
}
}
otelcol.exporter.otlp "cloud" {
client {
endpoint = "tempo-prod-xx.grafana.net:443"
auth = otelcol.auth.basic.cloud.handler
}
}
otelcol.auth.basic "cloud" {
username = sys.env("TEMPO_USER")
password = sys.env("GRAFANA_CLOUD_API_KEY")
}Direct Prometheus Remote Write
# prometheus.yml
remote_write:
- url: https://prometheus-prod-xx.grafana.net/api/prom/push
basic_auth:
username: "123456"
password: "your-api-key"
write_relabel_configs:
- source_labels: [__name__]
regex: "go_.*"
action: drop # optional: drop high-cardinality metricsDirect Loki Push (curl)
curl -X POST https://logs-prod-xx.grafana.net/loki/api/v1/push \
-H "Content-Type: application/json" \
-u "123456:your-api-key" \
-d '{
"streams": [{
"stream": { "app": "myapp", "env": "prod" },
"values": [
["1706745600000000000", "application started"]
]
}]
}'OpenTelemetry SDK → Grafana Cloud
# Environment variables for OTLP export
export OTEL_EXPORTER_OTLP_ENDPOINT="https://otlp-gateway-prod-xx.grafana.net/otlp"
export OTEL_EXPORTER_OTLP_HEADERS="Authorization=Basic $(echo -n '123456:your-api-key' | base64)"
export OTEL_SERVICE_NAME="my-service"Python example:
from opentelemetry import trace
from opentelemetry.exporter.otlp.proto.http.trace_exporter import OTLPSpanExporter
from opentelemetry.sdk.trace import TracerProvider
from opentelemetry.sdk.trace.export import BatchSpanProcessor
provider = TracerProvider()
exporter = OTLPSpanExporter() # reads OTEL_EXPORTER_OTLP_* env vars
provider.add_span_processor(BatchSpanProcessor(exporter))
trace.set_tracer_provider(provider)Cloud Integrations
Pre-built integrations for common infrastructure (install from Grafana Cloud UI or API):
# List available integrations
curl https://integrations-api-prod.grafana.net/api/v1/integrations \
-H "Authorization: Bearer <api-key>"
# Install AWS CloudWatch integration
curl -X POST https://integrations-api-prod.grafana.net/api/v1/integrations/cloudwatch \
-H "Authorization: Bearer <api-key>" \
-H "Content-Type: application/json" \
-d '{"name": "aws-prod", "config": {...}}'Popular integrations: AWS CloudWatch, Azure Monitor, GCP, Kubernetes, Docker, MySQL, PostgreSQL, Redis, Nginx, Apache, JVM, Node.js, Python, .NET.
Kubernetes Agent Operator
# values.yaml for grafana/k8s-monitoring Helm chart
cluster:
name: production
externalServices:
prometheus:
host: https://prometheus-prod-xx.grafana.net
basicAuth:
username: "123456"
password:
secretName: grafana-cloud-secret
secretKey: api-key
loki:
host: https://logs-prod-xx.grafana.net
basicAuth:
username: "234567"
password:
secretName: grafana-cloud-secret
secretKey: api-key
metrics:
enabled: true
podMonitors:
enabled: true
serviceMonitors:
enabled: true
logs:
pod_logs:
enabled: true
traces:
enabled: truehelm install k8s-monitoring grafana/k8s-monitoring \
--version 4.1.4 \
-n monitoring --create-namespace \
-f values.yamlAPI Key Management
# Create API key via Grafana API
curl -X POST https://yourstack.grafana.net/api/auth/keys \
-H "Content-Type: application/json" \
-u "admin:adminpassword" \
-d '{"name": "alloy-writer", "role": "MetricsPublisher", "secondsToLive": 0}'Roles for data ingestion: MetricsPublisher, LogsPublisher, TracesPublisher, ProfilesPublisher
Files
- ATTRIBUTION.mdAdded by AutoGineer839 B
- LICENSELicence file added by AutoGineer11.1 KiB
- SKILL.md5.5 KiB
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 Python
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/send-data · 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 send-data.zip