一键导入
grafana-azure
Deploy Grafana OSS to Azure Container Apps. Use when deploying Grafana for metrics, logs, and traces visualization with optional PostgreSQL backend.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Deploy Grafana OSS to Azure Container Apps. Use when deploying Grafana for metrics, logs, and traces visualization with optional PostgreSQL backend.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Container Apps deployment gotchas and SPA frontend patterns for Azure. Supplements the official azure-prepare plugin skill with additional patterns for zone redundancy, azure.yaml configuration, and SPA frontend deployment (VITE_API_URL). USE FOR: Container Apps zone redundancy errors, managed-identity ACR pulls, azure.yaml language fields, cross-platform hooks, SPA frontend VITE_API_URL, React deployment to Azure, and ARM64-to-AMD64 builds. DO NOT USE FOR: generating complete Bicep infrastructure from scratch (use azure-prepare plugin) or AKS deployments (use superset-azure).
Run an agentic journey end-to-end: preflight the host, extract prompts, execute them in an isolated workspace, build, deploy to Azure, verify with real requests and screenshots, and clean up only owned resources. USE FOR: test a journey, run a journey end-to-end, validate journey prompts, deploy a journey to Azure, walk through a journey, execute journey steps, CI journey test. DO NOT USE FOR: creating new journeys (use journey-template), reviewing journey content (use content-reviewer), or modifying unrelated code.
Create new agentic journeys from app ideas. Generates README.md (learner walkthrough), PLAN.md (AI-readable spec), and app-specific skills for OSS deployments. Supports any stack (Node.js, Python, .NET, Java, Swift, Kotlin) and Azure service (Container Apps, AKS, Functions, App Service). USE FOR: new journey, scaffold journey, create learning experience, generate journey template, add journey to repo, build and deploy app to Azure, create journey README, generate PLAN.md spec, new OSS deployment, new full-stack journey, journey from idea. DO NOT USE FOR: modifying existing journeys (use coder), reviewing journey content (use content-reviewer), deploying apps (use oss-to-azure-deployer agent).
Run multiple journeys as a cross-platform test suite. Discover journeys, invoke journey-runner in isolated workspaces, deploy, verify, capture screenshots, clean up only owned Azure resources, and produce a consolidated report. USE FOR: test all journeys, regression test, CI journey validation, nightly journey test, end-to-end journey suite, validate journeys deploy correctly. DO NOT USE FOR: running one journey interactively (use journey-runner), creating journeys (use journey-template), or reviewing content (use content-reviewer).
n8n workflow automation configuration for Azure. Use when deploying n8n specifically to Azure Container Apps.
Deploy Apache Superset on Azure. Use when deploying Superset for BI/data visualization with PostgreSQL backend.
| name | grafana-azure |
| description | Deploy Grafana OSS to Azure Container Apps. Use when deploying Grafana for metrics, logs, and traces visualization with optional PostgreSQL backend. |
Deploy Grafana OSS to Azure Container Apps using Bicep and Azure Developer CLI (azd).
Reproducibility Verified: This deployment has been tested multiple times from scratch. Deploy time: ~2 minutes.
Grafana is an open-source observability platform for metrics, logs, and traces visualization. This skill deploys Grafana OSS (not Azure Managed Grafana) to Azure Container Apps.
Require Azure CLI, Azure Developer CLI 1.28.0 or later, and Node.js 24 LTS or later for portable verification. Don't require OpenSSL, Bash command substitution, or host-specific shell scripts. See ../../../docs/tool-installation.md.
This skill provides Grafana-specific configuration only. Infrastructure (Bicep, azure.yaml) should be generated fresh each time by the official azure-prepare → azure-validate → azure-deploy pipeline. Do NOT rely on pre-existing infra code.
ALWAYS set AZURE_SUBSCRIPTION_ID explicitly before running azd up. Read it with az account show --query id -o tsv, then pass the returned value to azd env set AZURE_SUBSCRIPTION_ID <subscription-id>.
Without this, azd and Azure MCP tools will fail silently or produce incomplete deployments. The azure_deploy_app_logs tool also requires subscription context.
Bicep outputs MUST use SCREAMING_SNAKE_CASE (e.g., GRAFANA_URL, GRAFANA_FQDN) for azd to map them into environment values. Without this, azd env get-value returns "key not found".
graph TB
subgraph RG["Azure Resource Group"]
LA["Log Analytics Workspace"]
subgraph CAE["Container Apps Environment"]
GF["Grafana Container App<br/>Port 3000 · SQLite (default)<br/>Scale 0-3 replicas"]
end
end
LA -->|logs & metrics| CAE
# 1. Register providers (one-time per subscription)
az provider register --namespace Microsoft.App
az provider register --namespace Microsoft.OperationalInsights
# 2. Create environment
azd env new my-grafana-env
# 3. Set required variables (replace placeholders)
azd env set AZURE_SUBSCRIPTION_ID "<subscription-id>"
azd env set AZURE_LOCATION "westus"
azd env set GRAFANA_ADMIN_PASSWORD "<securely-generated-secret>"
# 4. Deploy (~2 minutes)
azd up
# 5. Access Grafana
azd env get-value GRAFANA_URL
# Login: admin / <your GRAFANA_ADMIN_PASSWORD>
Deployment time breakdown:
Grafana is configured via environment variables in the Container App:
| Variable | Description | Value |
|---|---|---|
GF_SECURITY_ADMIN_USER | Admin username | From parameter |
GF_SECURITY_ADMIN_PASSWORD | Admin password | From secret |
GF_SERVER_HTTP_PORT | HTTP port | 3000 |
GF_SERVER_ROOT_URL | Public URL | Auto-configured |
GF_AUTH_ANONYMOUS_ENABLED | Anonymous access | false |
See config/environment-variables.md for full list.
| Type | Path | Port | Interval |
|---|---|---|---|
| Liveness | /api/health | 3000 | 30s |
| Readiness | /api/health | 3000 | 10s |
| Startup | /api/health | 3000 | 10s (30 failures allowed) |
After deployment:
Generate a portable scripts/verify-grafana.mjs that reads GRAFANA_URL and the admin password through azd, requires HTTP 200 from /api/health, asserts database: "ok", then verifies authenticated access to /api/org. Invoke it with node scripts/verify-grafana.mjs and never print the password.
By default, Grafana uses SQLite which stores data in the container. For production:
azd down --force --purge
Note: Teardown takes 3-5 minutes (Container Apps environment deletion is slow).
Use these Azure MCP Server tools for Grafana deployments:
| Tool | When to Use |
|---|---|
azure_bicep_schema | Get latest schemas for Microsoft.App/containerApps and Microsoft.App/managedEnvironments |
azure_deploy_architecture | Generate Mermaid architecture diagrams for the Grafana deployment |
azure_deploy_plan | Validate the deployment plan before azd up — use target=ContainerApp |
azure_deploy_app_logs | Fetch container logs from Log Analytics when troubleshooting startup or 502 issues |
See troubleshooting.md for common issues and lessons learned.