agentleFS
dmzoneilldmzoneill/skills/investigate-alert/SKILL.md

investigate-alert

Skill2 starsChanged 19 days agoApache-2.0View on GitHub

Quick triage of firing Prometheus alerts. Gets alerts, pod health, events, Kibana logs, known patterns. Escalates to debug_prod for serious issues. Use when user says "what's firing?", "check alerts", "any alerts?", or "investigate alert".

1 other project uses a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

4 rules. About 0 are common, 1 is distinctive, and 3 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 3

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    NEVER copy kubeconfig files: Use the correct file per environment:

    line 12
  2. Very specific:

    Use --kubeconfig=~/.kube/config.s or config.p with kubectl/oc.

    line 19
  3. Very specific:

    If auto_escalate and production: skill_run("debug_prod", ...)

    line 84
  4. Very specific:

    Update state/environments with status

    line 90

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Investigate Alert

Quick investigation of a firing Prometheus alert. For deep investigation, use debug_prod directly.

Kubeconfig Rules

NEVER copy kubeconfig files. Use the correct file per environment:

FileEnvironment
~/.kube/config.sStage
~/.kube/config.pProduction

Use --kubeconfig=~/.kube/config.s or config.p with kubectl/oc.

Inputs

InputTypeDefaultPurpose
environmentstringrequiredstage, production, or prod
namespacestringmainmain or billing
alert_namestring-Specific alert to investigate
auto_escalatebooltrueAuto-run debug_prod if critical

Persona

Load incident persona (prometheus, alertmanager, kibana, k8s tools).

Workflow

1. Bootstrap

  • persona_load("incident")
  • check_known_issues("prometheus_query")
  • check_known_issues("kubectl_get_pods")

2. Resolve Namespace

From config.json → namespaces:

  • Stage → tower-analytics-stage
  • Prod main → tower-analytics-prod
  • Prod billing → tower-analytics-prod-billing

3. Get Alerts

  • prometheus_alerts(environment, namespace, state="firing")
  • Parse severity (critical, high, low)

4. Quick Health Check

  • k8s_namespace_health(namespace, environment) or kubectl_get_pods(namespace, environment)
  • kubectl_top_pods(namespace, environment) — CPU/memory usage
  • kubectl_get_events(namespace, environment, field_selector="type=Warning")
  • prometheus_query_range — error rate trend over last hour

5. Search Logs

  • kibana_search_logs(query="error OR exception OR critical", namespace, environment, limit=10)
  • kibana_get_errors(namespace, environment)

6. Check Known Patterns

  • memory_read("learned/patterns") — match alerts/pod issues against error_patterns

7. Knowledge & Code Search

  • code_search(query=alert_name, project="automation-analytics-backend", limit=5)
  • knowledge_query(project="automation-analytics-backend", persona="devops", section="gotchas")

8. Check Existing Silences

  • alertmanager_silences(environment)
  • alertmanager_receivers(environment)

9. Assess Severity

  • Critical/high + unhealthy pods → needs_escalation
  • If auto_escalate and production: skill_run("debug_prod", ...)

10. Notify & Log

  • If critical: skill_run("notify_team", template="alert", ...)
  • memory_session_log("Investigated alerts", ...)
  • Update state/environments with status

11. Failure Recovery

  • "connection refused" → vpn_connect()
  • "unauthorized" on k8s → kube_login(cluster="stage"|"prod")
  • Kibana 401 → open Kibana in browser first
  • learn_tool_fix(...) for recurring patterns

Output

Report with: alerts count, pod health, resource usage, events, Kibana errors, pattern matches, silence recommendation, escalation status.

Chains To

  • debug_prod — deep investigation
  • silence_alert — if known issue
  • create_jira_issue — track alert
  • rollout_restart, scale_deployment — remediation

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.