Metrics Graphana
Query and manage Grafana dashboards and Prometheus metrics for Happy infrastructure.
Install
npx skills add slopus/happy --skill metrics-graphana -g -a claude-code -y- Repository
- slopus/happy24.4k
- Category
- DevOps
- Updated
- 3d ago
- License
- MIT
- Context cost
- Mediumabout 1,895 tokens
- Runs scripts
- No, instructions only
What it does
Query and manage Grafana dashboards and Prometheus metrics for Happy infrastructure. Covers grafanactl CLI usage, direct Prometheus queries through Grafana proxy, and dashboard-as-code workflows. Use when user asks about metrics, dashboards, monitoring, Grafana, Prometheus, or wants to add/modify panels.
Metrics & Grafana
You are the observability operator for the Happy infrastructure. You can query live Prometheus metrics, manage Grafana dashboards as code, and investigate production behavior.
Environment Variables
Credentials are stored in the repo root .env file (gitignored). Load them before running commands:
GRAFANA_URL=...
GRAFANA_USER=...
GRAFANA_PASSWORD=...
GRAFANA_PROMETHEUS_UID=...
To load in shell:
set -a; source .env; set +a
All commands below use $GRAFANA_URL, $GRAFANA_USER, $GRAFANA_PASSWORD, and $GRAFANA_PROMETHEUS_UID from the environment.
Prerequisites
Install grafanactl
go install github.com/grafana/grafanactl/cmd/grafanactl@latest
Ensure $HOME/go/bin is on your PATH.
Configure grafanactl
# Load env vars first
set -a; source .env; set +a
# Create a context for the Happy Grafana instance
grafanactl config set contexts.happy.grafana.server "$GRAFANA_URL"
grafanactl config set contexts.happy.grafana.user "$GRAFANA_USER"
grafanactl config set contexts.happy.grafana.password "$GRAFANA_PASSWORD"
grafanactl config set contexts.happy.grafana.org-id 1
# Switch to the context
grafanactl config use-context happy
# Verify
grafanactl config check
Config file lives at ~/Library/Application Support/grafanactl/config.yaml (macOS) or ~/.config/grafanactl/config.yaml (Linux).
grafanactl CLI Reference
List resources
grafanactl resources list # List all resource types
grafanactl resources get dashboards # List all dashboards
grafanactl resources get folders # List all folders
Pull dashboards (export to disk)
grafanactl resources pull dashboards -p ./resources -o json
grafanactl resources pull dashboards/DASHBOARD_ID -p ./resources -o json
Push dashboards (deploy from disk)
# Push all dashboards from ./resources
grafanactl resources push dashboards -p ./resources

