/grafana:alertingfrom grafana
Guides Grafana unified alerting: rule types, evaluation lifecycle, notification routing, templates, silences, and recording rules. Invoke when creating or debugging alert rules, contact points, or notification policies.
Ships in grafana. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Alert on symptoms, route to the right team, suppress noise without losing signal. Grafana unified alerting splits the job in two halves: a rule evaluator raises alert instances; an Alertmanager turns them into notifications. Get the split right at design time to avoid notification storms, missed pages, and silent failures.
${CLAUDE_SKILL_DIR}/references/rule-evaluation.md] Rule types (Grafana-managed vs
data-source-managed), evaluation groups, pending period, keep firing for, full state lifecycle, No Data / Error
configuration, grafana_state_reason annotation, worked example${CLAUDE_SKILL_DIR}/references/notification-routing.md] Alertmanager architecture,
contact points, policy tree, routing algorithm, inheritance, label matchers, grouping/timing, silences, mute timings,
inhibition rules, worked routing example${CLAUDE_SKILL_DIR}/references/templates.md] Annotation/label templates vs notification templates,
Go text/template essentials, available variables ($labels, $values, .Alerts), notification data shape,
built-in functions (collection, data, template, time), worked examples${CLAUDE_SKILL_DIR}/references/recording-rules.md] Mimir/Loki/Prometheus alert and
recording rules: prerequisites, UI workflow, YAML rule shape, namespaces and groups, sequential evaluation pattern,
restrictions vs Grafana-managed, naming, alerting-on-recorded-metrics alignment, Loki rule files + lokitool, Mimir
managed rulesPage on user-visible impact at one point in the stack. Don't page on a slow sub-component if overall user latency is fine — use dashboards to localize causes after a page fires. Remove alerts with no actionable response.
30s–5m.Grafana-managed rules control what happens when the query returns no data or fails. Don't accept the default silently — pick one:
DatasourceNoData / DatasourceError alerts with labels
alertname, datasource_uid, rulename. Route through dedicated notification policies.Synthetic alerts have different labels than the original rule's alerts. Silences, mute timings, and policies that
match the original by labels won't match synthetic alerts without explicit alertname matchers.
One rule generates one alert instance per series returned by the query. Different instances of the same rule can be in different states simultaneously. Plan label cardinality before deploying — high cardinality multiplies notifications.
Six states for any alert instance:
Only two transitions emit notifications:
If a rule is modified (except annotations / evaluation interval / internal fields), all instances reset to Normal and re-evaluate on the next cycle. Templated labels that change value orphan the previous instance as stale.
Notification destinations. One contact point may have multiple receivers (integrations: email, slack, pagerduty,
opsgenie, webhook, etc.).
secure_settings (encrypted at rest), config in settingsdisableResolveMessage: true on receivers that shouldn't get resolved notificationsThe policy tree decides which contact point handles each alert, how alerts are grouped, and when notifications are sent.
=, !=, =~, !~ (multiple combine with AND)group_by — labels that partition alerts into notification groups. ['...'] disables grouping. Default groups by
alert rule.group_wait — first-notification delay for a new group (default 30s)group_interval — delay before sending a follow-up for the same group when it changes (default 5m)repeat_interval — delay before re-sending an unchanged group (default 4h)Keep repeat_interval ≥ group_interval to avoid re-notification collisions.
times, weekdays, months, years, days_of_month, location.Silences don't stop rule evaluation — only notification creation. The alert still appears in the UI and history.
Two kinds. Don't confuse them — variables and scope differ.
Inline Go template expressions in the rule's annotations and labels maps. Evaluated each rule evaluation, per alert
instance.
$labels — alert's label set$values — query/expression values keyed by refId (e.g., $values.A.Value)$value — value of the condition expressionReusable {{ define "name" }}...{{ end }} blocks in a notification template group. Referenced from contact point fields
as {{ template "name" . }}. Evaluated at notification time with the group context.
.Alerts, .Alerts.Firing, .Alerts.Resolved — alert arrays.GroupLabels, .CommonLabels, .CommonAnnotations — group-level KV maps.Status, .Receiver, .ExternalURL, .GroupKey.Labels, .Annotations, .StartsAt, .EndsAt, .Status, .Fingerprint.DashboardURL, .PanelURL, .SilenceURL, .Values, .ValueString,
.OrgIDNever template a label with a query value — the value change creates a new alert instance and orphans the previous one as stale. Templating labels with mapped/bucketed query values (e.g., severity tiers) is safe.
Pre-compute frequently used or expensive queries; write the result as a new time series.
level:metric:operations (e.g., job:http_requests:rate5m). Colons are reserved for recording
rules._over_time instant queries (max_over_time(my_metric[5m])) instead of range + Reduce when feasible — alerts run
as instant queries anyway.For Loki, rule files use Prometheus-compatible YAML and the Loki ruler writes recorded metrics to a remote-write
endpoint. Manage with lokitool (or Cortex predecessor for Loki < 3.1).
When designing an alert rule:
When designing notification routing:
group_by to bundle related alerts; avoid ['...'] except for very-low-volume rulesalertname=DatasourceError / DatasourceNoData policies so synthetic alerts don't fall throughWhen writing templates:
$labels / $values directly in annotation/label templates (don't rely on .){{- / -}}) in multi-line ranges to avoid blank-line output__subject, default.title, default.message) unintentionallyWhen reviewing alerting configuration:
repeat_interval ≥ group_intervalThe provisioning skill (sibling) governs how to deploy these resources (file provisioning, HTTP API, Terraform, gcx). This skill governs what the resources should contain and how they behave at runtime.
The prometheus, logsql/metricsql language skills cover the query expressions used inside alert rules. This skill covers everything around the query — state, routing, templates.
The dashboards skill (sibling) covers panel configuration; this skill does not. Link dashboard URLs from alerts via
the Dashboard UID / Panel ID annotations and the .DashboardURL / .PanelURL notification template fields.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
7 skills in this plugin
/dashboardsGrafana dashboard authoring: JSON model (Classic and V2), panel types and selection, standard options, thresholds, value mappings, field overrides, transformations, variables (query/custom/interval/filter), repeating panels and rows, annotations, dashboard/panel/data links, and library panels. Invoke whenever task involves any interaction with Grafana dashboards — creating, editing, reviewing, debugging, or understanding dashboard configuration./datavizData visualization discipline for monitoring and observability dashboards: chart-type selection by data shape, encoding accuracy hierarchy (position > length > angle > area > color), pre-attentive attributes, Tufte data-ink, color theory (semantic conventions, Viridis, colorblind safety), dashboard layout and information hierarchy (F/Z-pattern, tiering), time-series conventions (baseline, interpolation, dual axes, stacking), observability frameworks (RED, USE, Four Golden Signals, SLO/SLI). Invoke whenever task involves any interaction with dashboard design quality — making a good dashboard, reviewing a visualization, picking a chart type, dashboard layout, color choices, panel arrangement, or critiquing existing observability dashboards./logsqlVictoriaLogs LogsQL query language: filters (word, phrase, prefix, regexp, range, IPv4 range, exact, stream, time), pipe operators (stats, sort, fields, format, extract, unpack_json, unpack_logfmt, math, limit, top, uniq), stats functions, log stream filtering with Prometheus-style label selectors, field extraction, and performance patterns. Invoke whenever task involves any interaction with LogsQL — writing, debugging, optimizing, or reviewing VictoriaLogs queries.npx claudepluginhub xobotyi/cc-foundry --plugin grafanaOther plugins' skills for the same job