/gcx:investigate-alertfrom gcx
Investigates Grafana alert rules: why they are firing or pending, their scope, and impact. Use for a named alert rule or 'why is this alert firing'.
Ships in gcx. 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.
Investigate Grafana alerts by analyzing state, querying datasources, and identifying next steps. Be concise and direct - these are experienced operators who need actionable information, not hand-holding.
User needs gcx installed with configured context and appropriate permissions. If gcx is not configured, use the setup-gcx skill first.
Check context if needed (gcx config view). If multiple contexts exist and none specified, ask which to use.
Fetch the alert by listing all alerts and filtering by name. Replace <AlertName> with the actual alert name:
gcx alert rules list -o json | jq -r '.[] | .rules[]? | select(.name == "<AlertName>")'
Server-side filters (use instead of downloading all rules and filtering with jq):
--state firing|pending|inactive — filter by rule state--group <name> — filter by group name--folder <uid> — filter by folder UIDFilter by name, state, cluster/environment as relevant. If multiple matches, list them and ask which to investigate. Inform the user which context you're using.
Check the type field:
type: recording: This is a recording rule, not an alerting rule. Report: "This is a recording rule (pre-calculates metrics), not an alerting rule. It doesn't fire alerts. Current state: [state]. Want details on what it's recording?" Stop here unless they ask for more.Check the state field:
state: inactive AND the alert's query looks healthy: Report: "Alert is inactive. [Brief what it monitors]. Health: [health]. Last evaluated: [time]. Want to see historical trends?" Stop here unless they ask for more.state: firing or state: pending: Continue with full investigation below.You should use the datasourceUID from the alert when you can.
If you need to query a different datasource (e.g., Loki for log correlation), resolve its UID first:
gcx datasources list --type loki
Annotation URLs often reference datasources by name — always resolve to UID before querying.
Query the datasource. Use -o json to get the data for yourself. Use with a graph visualization for showing a summary to the user:
# Prometheus
gcx metrics query -d <datasource-uid> '<query>' --from now-1h --to now --step 1m -o json
gcx metrics query -d <datasource-uid> '<query>' --from now-1h --to now --step 1m -o graph
# Loki
gcx logs query -d <datasource-uid> '<query>' --from now-1h --to now -o json
gcx logs query -d <datasource-uid> '<query>' --from now-1h --to now -o graph
Analyze the results: What's the current value? Spike or gradual? When did it start?
Extract from annotations:
gh is available, fetch with gh api)Provide concise analysis:
Based on the error class, suggest follow-up queries to the user:
up{job="..."}) and pod restart countsRecommend incident creation if there's customer impact.
List specific next actions - queries to run, deployments to check, metrics to examine. If there are queries for logs or metrics you can run, then ask the user if they want you to run them. If infrastructure changes are a suspected cause, suggest to the user that you could investigate any infra-as-code repos, if they point you to them.
If the next suggested actions include looking at logs in any way, use gcx to do it.
For recording rules or healthy inactive alerts (early exit):
This is a [recording rule / inactive alert]. [One sentence what it monitors]. State: [state]. Health: [health].
Want to see more details?
For firing/pending alerts (full investigation):
Alert: <name>
State: firing [in <cluster/env>]
Monitors: <brief what it checks>
[Show graph visualization]
Current value: <value>
Trend: <spike/gradual/sustained>
Likely causes:
- <cause 1>
- <cause 2>
Impact: <who/what affected>
Runbook: <link>
Dashboard: <link>
Next actions:
- <action 1>
- <action 2>
[If customer impact:] Recommend creating an incident - <why>.
Use minimal formatting. Avoid excessive bold text. No timelines like "within 24 hours". Trust the user to prioritize.
For alert JSON structure, query patterns by alert type, graph interpretation, and runbook fetching, see:
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub grafana/gcx --plugin gcx26 skills in this plugin
/agento11yInspects and manages Grafana Agent Observability resources via gcx: conversations, generations, experiments, evaluators, rules, scores, templates. Use to search or export conversations, debug an LLM conversation, or manage evaluators. For guided production eval setup use agento11y-prod-setup./agento11y-instrumentInstruments a developer's own LLM app with the Agent Observability SDK, or repairs missing generations and empty Performance charts in Grafana Agent Observability. For model calls that already emit OpenTelemetry GenAI spans, it follows the OpenTelemetry guide instead of adding the SDK. Applies confirmed changes and verifies generation ingest, traces, and metrics. Excludes coding-agent telemetry plugins. For offline tests use agento11y-test-starter; for eval rules and guards use agento11y-prod-setup./agento11y-prod-setupSets up production evaluation for a deployed AI agent in Agent Observability: online eval rules and guards (redact PII, block tools), based on its code and live traffic. Applies via gcx after confirmation. Not for pre-ship tests (use agento11y-test-starter)./agento11y-test-starterBuilds a starter offline test suite for an AI agent before it ships: test cases from its code, scoring advice, and a runner stub. Use when the agent has no real traffic yet. Not for tenant evaluators, rules, or guards (use agento11y-prod-setup)./create-dashboardDesigns and creates Grafana dashboards with gcx, with `gcx dashboards snapshot` as a visual feedback loop. Use to build a new dashboard, add panels, variables, or annotations, or redesign a dashboard. Not for inventory, audit, or pull/push of existing dashboards (use manage-dashboards)./debug-with-grafanaInvestigates application problems and incidents with Grafana metrics, logs, and traces via gcx: errors, latency, regressions, blast radius, trace comparison with baselines. Accepts alert payloads, dashboard links, and trace IDs. For alert rule semantics use investigate-alert.Other plugins' skills for the same job