grafana
Grafana is an open-source visualization and dashboarding platform that connects to dozens of data sources including Prometheus, PostgreSQL, ClickHouse, and…
от TerminalSkills★ 221 звезда на GitHub
Установить grafana в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Об этом скилле
Grafana
Overview
Grafana is an open-source platform for dashboards, alerting and exploring metrics, logs and traces. It queries data sources (Prometheus, PostgreSQL, ClickHouse, Loki, Elasticsearch and dozens more) at view time and renders the results as panels. Everything can be kept as code: data sources, dashboards, alert rules and contact points are provisioned from YAML and JSON files on startup. The current release line is 13.x; this skill uses the open-source grafana/grafana image.
Instructions
Run Grafana with Docker
services:
grafana:
image: grafana/grafana:13.2.4 # pin a version; check hub.docker.com/r/grafana/grafana
ports:
- "127.0.0.1:3000:3000"
environment:
GF_SECURITY_ADMIN_USER: admin
GF_SECURITY_ADMIN_PASSWORD: ${GRAFANA_ADMIN_PASSWORD} # set in .env, not in git
GF_PLUGINS_PREINSTALL: grafana-clickhouse-datasource
PG_PASSWORD: ${PG_PASSWORD}
CH_PASSWORD: ${CH_PASSWORD}
SLACK_WEBHOOK_URL: ${SLACK_WEBHOOK_URL}
volumes:
- grafana-data:/var/lib/grafana
- ./provisioning:/etc/grafana/provisioning
volumes:
grafana-data:
echo "GRAFANA_ADMIN_PASSWORD=$(openssl rand -base64 18)" >> .env # also set PG_PASSWORD, CH_PASSWORD, SLACK_WEBHOOK_URL
docker compose up -d
Open http://localhost:3000. GF_PLUGINS_PREINSTALL installs plugins at startup (comma-separated, name@version to pin). The old grafana-cli and grafana-server binaries were removed in Grafana 13; use grafana cli plugins install <id> and grafana server.
Provision data sources
Files in provisioning/datasources/ load at startup. Give each source a fixed uid: dashboards and alert rules refer to it, and an auto-generated uid breaks them when you rebuild.
# provisioning/datasources/datasources.yml
apiVersion: 1
datasources:
- name: Prometheus
uid: prometheus
type: prometheus
access: proxy
url: http://prometheus:9090
isDefault: true
editable: false
- name: PostgreSQL
uid: postgres
type: postgres
access: proxy
url: postgres:5432
user: grafana_reader
secureJsonData:
password: "${PG_PASSWORD}"
jsonData:
database: app_production
sslmode: require
maxOpenConns: 10
postgresVersion: 1500
- name: ClickHouse
uid: clickhouse
type: grafana-clickhouse-datasource
jsonData:
host: clickhouse
port: 9000
protocol: native
defaultDatabase: default
username: grafana_reader
secureJsonData:
password: "${CH_PASSWORD}"
${VAR} is expanded from Grafana's environment. Use read-only database users.
Build panels
Time Series Panel with Prometheus
# Prometheus query — HTTP request rate per second by status code
sum by (status_code) (rate(http_requests_total[5m]))
Template Variables
A query variable gives users a dropdown:
-- ClickHouse query — variable definition for event names
-- Create as a "Query" type variable named "event_name"
SELECT DISTINCT event_name FROM events ORDER BY event_name
Reference it with $event_name and bound the time range with $__timeFilter:
SELECT toStartOfHour(created_at) AS time, count() AS events
FROM events
WHERE event_name = '$event_name' AND $__timeFilter(created_at)
GROUP BY time ORDER BY time
Provision alert rules and contact points
Alert rules are a pipeline of refIds: a query (A), a reduce step (B) turns the series into a number, and a threshold (C) is the condition.
apiVersion: 1
groups:
- orgId: 1
name: production-alerts
folder: Production
interval: 1m
rules:
- uid: high-error-rate
title: High Error Rate
condition: C
for: 5m
noDataState: NoData
execErrState: Error
data:
- refId: A
relativeTimeRange: { from: 600, to: 0 }
datasourceUid: prometheus
model:
refId: A
expr: sum(rate(http_requests_total{status_code=~"5.."}[5m])) / sum(rate(http_requests_total[5m]))
instant: false
intervalMs: 1000
maxDataPoints: 43200
- refId: B
datasourceUid: __expr__
model:
refId: B
type: reduce
expression: A
reducer: last
- refId: C
datasourceUid: __expr__
model:
refId: C
type: threshold
expression: B
conditions:
- evaluator: { type: gt, params: [0.05] }
labels:
severity: critical
annotations:
summary: "Error rate is above 5%"
apiVersion: 1
contactPoints:
- orgId: 1
name: slack-engineering
receivers:
- uid: slack-eng
type: slack
settings:
url: "${SLACK_WEBHOOK_URL}"
recipient: "#engineering-alerts"
title: '{{
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
- _scores.json
FAQ
Что делает скилл grafana?
Grafana is an open-source visualization and dashboarding platform that connects to dozens of data sources including Prometheus, PostgreSQL, ClickHouse, and Elasticsearch. It lets you build interactive dashboards with panels, set up alerting rules, and manage everything as code through JSON dashboard definitions and provisioning configuration.
Как установить скилл grafana?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл grafana запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
skill-creator
AnthropicCreate new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an…
discernment-nudge
AnthropicAfter you give a substantive answer or draft that the user may act on — advice or recommendations, drafted artifacts such as goals, plans, pitches, proposals…
data-consolidate
AnthropicJoins the plant's scheduled exports and connector data into one working dataset — ERP items (NetSuite or Infor M3), sales orders, production work orders…
inspection-to-capa
AnthropicRuns the quality chain end to end: writes the nonconformance against the requirement it violates, searches history at the moment of writing to say whether…