From vmkteam-developer
Queries Grafana dashboards, Prometheus metrics, and Loki logs via pcurl over REST API proxies. Lists datasources, annotations, alerts, and generates explore links.
npx claudepluginhub vmkteam/claude-plugins --plugin vmkteam-developerThis skill uses the workspace's default tool permissions.
Grafana для дашбордов, метрик (Prometheus) и логов (Loki). Доступ через pcurl.
Mandates invoking relevant skills via tools before any response in coding sessions. Covers access, priorities, and adaptations for Claude Code, Copilot CLI, Gemini CLI.
Share bugs, ideas, or general feedback.
Grafana для дашбордов, метрик (Prometheus) и логов (Loki). Доступ через pcurl.
Конкретные хосты, datasource IDs/UIDs, dashboard UIDs определяются при онбординге.
Profile: @{grafana_profile}
Base URL: https://{grafana_host}/api
pcurl @{profile} 'https://{host}/api/search?type=dash-db' -s
pcurl @{profile} 'https://{host}/api/search?type=dash-db&query={service}' -s
pcurl @{profile} 'https://{host}/api/dashboards/uid/{dashboard_uid}' -s
pcurl @{profile} 'https://{host}/api/datasources' -s
Два способа (оба работают, UID-based — предпочтительный):
# UID-based (Grafana 9+, рекомендуется)
pcurl @{profile} 'https://{host}/api/datasources/uid/{prom_uid}/resources/api/v1/query?query={promql}' -s
pcurl @{profile} 'https://{host}/api/datasources/uid/{prom_uid}/resources/api/v1/query_range?query={promql}&start='$(date -v-1H +%s)'&end='$(date +%s)'&step=60' -s
# Legacy ID-based (работает, но deprecated)
pcurl @{profile} 'https://{host}/api/datasources/proxy/{prom_id}/api/v1/query?query={promql}' -s
# UID-based (рекомендуется) — путь /resources/ БЕЗ /loki/api/v1/
pcurl @{profile} "https://{host}/api/datasources/uid/{loki_uid}/resources/query_range" -s -G \
--data-urlencode 'query={logql}' \
--data-urlencode "start=$(date -v-1H +%s)000000000" \
--data-urlencode "end=$(date +%s)000000000" \
--data-urlencode 'limit=50'
# Labels
pcurl @{profile} 'https://{host}/api/datasources/uid/{loki_uid}/resources/labels' -s
# Legacy ID-based (работает, но deprecated)
pcurl @{profile} "https://{host}/api/datasources/proxy/{loki_id}/loki/api/v1/query_range" -s -G \
--data-urlencode 'query={logql}' \
--data-urlencode "start=$(date -v-1H +%s)000000000" \
--data-urlencode "end=$(date +%s)000000000" \
--data-urlencode 'limit=50'
pcurl @{profile} 'https://{host}/api/annotations?from='$(date -v-1H +%s)000'&to='$(date +%s)000'&limit=50' -s
pcurl @{profile} 'https://{host}/api/annotations?dashboardUID={uid}&from='$(date -v-24H +%s)000'&to='$(date +%s)000 -s
pcurl @{profile} 'https://{host}/api/alertmanager/grafana/api/v2/alerts?active=true' -s
pcurl @{profile} 'https://{host}/api/ruler/grafana/api/v1/rules' -s
https://{host}/d/{dashboard_uid}?from=now-1h&to=now
https://{host}/d/{dashboard_uid}?var-job={service}&from=now-1h&to=now
https://{host}/explore?schemaVersion=1&panes={"pane":{"datasource":"{prom_uid}","queries":[{"expr":"{promql}"}],"range":{"from":"now-1h","to":"now"}}}