Iván

Grafana

運維安全v1.0.0
作者:Iván更新於 2026-05-11grafana@clawhub_ivangdavila/grafana
監控告警配置生成

據 AlphaMoat 統計,截至 2026-09,Grafana 累計下載 3,746 次、獲 4 個星標,在全部 5,078 個 AI 技能中排名第 2,847 位,在「運維安全」分類(264 個)中排名第 176 位。

累計安裝
103
累計下載
3746
星標
4
全站排名
#2,847
全站前 57% · 「運維安全」前 67%
平台累計安裝累計下載星標評論
ClawHub ↗10333584-
SkillHub ↗9937464—

各平台的計數口徑不同,統計時間不一致。

這個技能是做什麼的

它覆蓋變數插值、Prometheus rate 查詢、面板閾值、服務端告警、通知渠道、儀表板匯入、資料來源模式和轉換順序,並提示高基數查詢或註釋查詢可能增加負載。具體行為會受資料來源和 Grafana 配置影響,應用前應在目標環境驗證查詢與告警結果。

資料釋出於 2026-10-29

可以用來做什麼

  • 排查變數插值和 Prometheus 指標查詢問題。
  • 檢查告警評估條件、待處理狀態和通知渠道配置。
  • 識別儀表板匯入、資料來源認證及查詢效能的常見問題。

什麼時候用

  • 需要診斷 Grafana 面板無資料或查詢結果異常時。
  • 需要檢查告警是否在服務端正確評估並連線通知渠道時。
  • 匯入儀表板或最佳化高基數查詢之前,需要驗證實際資料來源設定時。

示例提示詞

以下是根據技能文件生成的示例,不代表實際執行結果。

根據這份指南檢查一條 Prometheus rate 查詢是否使用了合適的範圍向量。
整理告警從查詢評估到通知送達的核對清單。

月度資料趨勢

累計下載3746
1772283238922026-03 · 累計下載 19182026-05 · 累計下載 24872026-06 · 累計下載 26522026-07 · 累計下載 29292026-08 · 累計下載 31362026-09 · 累計下載 374626-0326-09
星標4
3452026-03 · 星標 42026-05 · 星標 42026-06 · 星標 42026-07 · 星標 42026-08 · 星標 42026-09 · 星標 426-0326-09

2026-09 起統計方法調整:同名技能按作者分別統計,並覆蓋全部技能。圖中虛線為調整前的月份,與之後的資料不直接比較,也不計算跨越調整的增長。 該技能有同名的其他版本,調整前的資料歸屬當前下載量最大的這一個。

月份累計下載環比星標
2026-093746—4
2026-083136+7.1%4
2026-072929+10.4%4
2026-062652+6.6%4
2026-052487—4
2026-031918—4

SKILL.md 原文

以下是作者釋出的原始檔案,按純文字顯示,本站未做修改或稽核;其中的連結不可點選,命令請核實後再執行。抓取於 2026-10-23。

3.0 KB · ClawHub v1.0.0
---
name: Grafana
description: Avoid common Grafana mistakes — query pitfalls, variable templating, alerting traps, and provisioning gotchas.
metadata: {"clawdbot":{"emoji":"📊","os":["linux","darwin","win32"]}}
---

## Variables and Templating
- Multi-value variable needs `$__all` in regex — or only first value used
- `${var:csv}` for comma-separated — `${var:pipe}` for pipe-separated in regex
- Variable in query: `$var` or `${var}` — different escaping per data source
展開全部(共 58 行)
- `$__interval` auto-adjusts to time range — use for aggregation window
- Chained variables: child depends on parent — set "Refresh" to "On time range change"

## Prometheus Queries
- `rate()` needs range vector — `rate(requests_total[5m])` not `rate(requests_total)`
- `rate()` for counters, `deriv()` for gauges — rate handles counter resets
- `$__rate_interval` over hardcoded — adapts to scrape interval and dashboard range
- Labels in legend: `{{label}}` — multiple: `{{instance}} - {{job}}`
- Regex filter: `metric{label=~"val1|val2"}` — `!~` for negative match

## Panel Configuration
- "No data" vs "null" are different — configure in display options
- Thresholds work on last value — not all values in range
- Min/max must match your data range — auto-scaling can hide anomalies
- Time series for trends, stat for current value — choose visualization wisely

## Alerting
- Alert evaluates on server — not browser, query must work without variables
- Variables not supported in alerts — hardcode values or use templates
- Multiple conditions: AND is default — configure for OR if needed
- Alert state "Pending" before "Firing" — for duration, prevents flapping
- Notification channel must be configured — alert without channel = no notification

## Dashboard Provisioning
- JSON export includes data source UID — will fail if different on import
- Use data source variables — `${DS_PROMETHEUS}` substituted at runtime
- Provisioned dashboards read-only by default — `allowEditing: true` in provisioning
- Folder must exist before dashboard provisioning — or import fails silently

## Data Sources
- "Server" mode proxies through Grafana — hides credentials from browser
- "Browser" mode direct from browser — faster but exposes URL/auth
- Test connection catches most issues — but not query-specific problems
- TLS skip verify for self-signed — but fix proper certs for production

## Transformations
- Order matters — transformations apply in sequence
- Outer join for combining queries — match on time or label
- Reduce for aggregating time series — last, mean, max, etc.
- Add field from calculation — combine metrics client-side

## Common Mistakes
- Time range selector affects variable queries — unexpected results with "All time"
- Dashboard saved but datasource not — works locally, breaks on import
- Alert rule in dashboard vs Grafana alerting — different systems, don't mix
- Panel queries run on every refresh — high-cardinality queries slow dashboard
- Annotation queries add DB load — use sparingly on busy dashboards

「運維安全」分類下的熱門技能

Iván 的其他技能

資料月份:2026-09 · 下載/星標/安裝數聚合自公開技能註冊庫(ClawHub、SkillHub),按月更新。口徑說明見資料方法。