Use this skill whenever the user needs to operate a self-managed GitLab or self-hosted Gitea CI/CD server — a one-shot overview, server version and token identity, projects with storage statistics, pipelines/runs with jobs and trace tails, the runner fleet, merge/pull requests, branches, protection rules and releases, artifact inventories, four flagship RCAs (pipeline failures, runner health & queue, artifact/storage bloat, stale work), and governed writes (retry/cancel a pipeline, pause/resume a runner, delete artifacts, update branch protection). Always use this skill for "GitLab", "Gitea", "pipeline failed", "CI is red", "job trace", "runner offline", "jobs stuck in queue", "artifact storage full", "stale merge requests", "stale branches", "protect the default branch", "retry the pipeline", "cancel the pipeline", "delete old artifacts" when the context is a self-managed GitLab or Gitea instance. Do NOT use when the target is something other than a GitLab/Gitea CI/CD server (a hyperv
浏览器
observability-aiops
试用Use this skill whenever the user needs to operate a self-hosted observability stack on Prometheus (HTTP API + PromQL), Alertmanager, Grafana, or Grafana Loki (logs) — a one-shot overview, PromQL instant/range queries, label + series metadata, scrape-target health (up/down + why) and dropped targets, recording/alerting rule health, firing/pending alerts, Alertmanager alerts + silences, Grafana dashboards/datasources/folders, bounded Loki LogQL log reads (labels, query, error-tail), five flagship analyses (firing-alert RCA, target-scrape-health, alert-noise/flap, log-error-burst RCA, log-volume/cardinality) plus an alert->log cross-signal, and guarded writes (create/expire silence, create annotation, update/delete dashboard, reload Prometheus config). Always use this skill for "Prometheus", "PromQL", "Alertmanager", "Grafana", "Loki", "LogQL", "logs", "which targets are down", "scrape failing", "why is this alert firing", "root cause this alert", "firing alerts", "silence this alert", "n
它能做什么
Use this skill whenever the user needs to operate a self-hosted observability stack on Prometheus (HTTP API + PromQL), Alertmanager, Grafana, or Grafana Loki (logs) — a one-shot overview, PromQL instant/range queries, label + series metadata, scrape-target health (up/down + why) and dropped targets, recording/alerting rule health, firing/pending alerts, Alertmanager alerts + silences, Grafana dashboards/datasources/folders, bounded Loki LogQL log reads (labels, query, error-tail), five flagship analyses (firing-alert RCA, target-scrape-health, alert-noise/flap, log-error-burst RCA, log-volume/cardinality) plus an alert->log cross-signal, and guarded writes (create/expire silence, create annotation, update/delete dashboard, reload Prometheus config). Always use this skill for "Prometheus", "PromQL", "Alertmanager", "Grafana", "Loki", "LogQL", "logs", "which targets are down", "scrape failing", "why is this alert firing", "root cause this alert", "firing alerts", "silence this alert", "noisy alerts", "alert flapping", "recording rule", "alerting rule", "dashboard", "datasource health", "reload prometheus config", "TSDB cardinality", "error burst", "log volume", "log cardinality", "tail errors" when the context is a self-hosted metrics/logs/observability stack. Do NOT use when the target is something other than a Prometheus/Grafana observability stack (a hypervisor, storage appliance, backup product, container-orchestrator control plane, network device config, or OT/industrial equipment) — route those to the appropriate other AIops-tools skill. Hosted/SaaS monitoring suites (Datadog, New Relic, enterprise NMS) are out of scope. Governed observability operations with a built-in governance harness (audit, policy, token budget, undo, risk-tiers). Beyond the mock suite, the Prometheus/Alertmanager/Grafana surfaces have been exercised against a live Prometheus 3.x + Alertmanager + Grafana 13 stack (RCAs, governed writes, undo); the Loki surface has not (see docs/VERIFICATIO
技能文档
Observability AIops
Disclaimer: Community-maintained open-source project, not affiliated with, endorsed by, or sponsored by the Prometheus or Grafana projects, Grafana Labs, or the CNCF. Prometheus, Alertmanager and Grafana are trademarks of their respective owners. Source at github.com/AIops-tools/Observability-AIops under the MIT license.
Governed self-hosted observability operations — 39 MCP tools across
Prometheus (HTTP API + PromQL), Alertmanager (alerts + silences),
Grafana (dashboards, datasources, folders), and Grafana Loki (bounded
LogQL log reads + log RCA, read-only), every one wrapped with the bundled
@governed_tool harness: a local unified audit log under
~/.observability-aiops/, token/runaway budget guard, undo-token
recording, and descriptive risk-tier labels. One config can span the whole
stack. Bearer tokens are stored encrypted (~/.observability-aiops/secrets.enc,
Fernet + scrypt) — never plaintext on disk.
This is the self-hosted-observability complement to enterprise monitoring suites: it speaks the open Prometheus/Grafana APIs an SRE actually runs.
Standalone: the governance harness is bundled in the package (
observability_aiops.governance) — no external skill-family dependency. Beyond the mock suite, the Prometheus/Alertmanager/Grafana surfaces have been exercised against a live Prometheus 3.x + Alertmanager + Grafana 13 stack; the Loki surface has not yet been exercised live (seedocs/VERIFICATION.md).
What This Skill Does
| Group | Platform | Tools | Count | R/W |
|---|---|---|---|---|
| Metrics | Prometheus | instant_query, range_query, label_values, series_metadata | 4 | read |
| Targets & status | Prometheus | list_targets, target_scrape_health, dropped_targets, prometheus_config_status, prometheus_tsdb_status | 5 | read |
| Rules | Prometheus | list_rules, rule_health | 2 | read |
| Alerts | Prometheus/Alertmanager | firing_alerts, pending_alerts, alertmanager_alerts, list_silences | 4 | read |
| Grafana | Grafana | list_dashboards, get_dashboard, list_datasources, datasource_health, list_folders | 5 | read |
| Loki | Loki | loki_labels, loki_label_values, loki_query, loki_tail_errors | 4 | read |
| Overview + analyses | all | observability_overview + firing_alert_rca, target_scrape_health_analysis, alert_noise_and_flap_analysis | 4 | read |
| Log analyses + cross-signal | Loki (+ Prometheus) | log_error_burst_rca, log_volume_analysis, alert_log_context | 3 | read |
| Writes | Alertmanager/Grafana/Prometheus | create_silence, expire_silence (med) · create_annotation (med) · update_dashboard (med) · delete_dashboard (high) · reload_prometheus_config (med) | 6 | write |
The three metric flagship analyses are transparent heuristics that report their
numbers: firing_alert_rca joins each firing alert to its rule expression and
maps it to a cause + action; target_scrape_health_analysis ranks down/erroring
scrape targets and classifies each lastError; alert_noise_and_flap_analysis
finds noisy/duplicate alerts and recommends a dedup/rollup. The two log
analyses mirror this: log_error_burst_rca compares per-stream error counts
against a baseline window and classifies each burst (new signature / volume spike
/ single-instance); log_volume_analysis ranks the highest-volume streams and
warns on high-cardinality (high-churn) labels. alert_log_context bridges the two
signals — it maps a firing Prometheus alert's labels to a Loki stream selector and
pulls the correlated logs. Loki is read-only (no safe write surface).
Quick Install
uv tool install observability-aiops
observability-aiops init # wizard: pick platform (prometheus/grafana) + encrypted token
observability-aiops doctor
When to Use This Skill
- Get a snapshot (
overview/observability_overview): firing-alert count, scrape targets up/down, rules erroring (Prometheus) or dashboard/datasource counts (Grafana) - Run PromQL (
instant_query/range_query), enumeratelabel_valuesorseries_metadata - Check scrape health (
target_scrape_health,dropped_targets) and rule health (rule_health,list_rules) - Triage alerts:
firing_alerts/pending_alerts, the Alertmanager view (alertmanager_alerts,list_silences), thenfiring_alert_rcato root-cause - Reduce alert noise (
alert_noise_and_flap_analysis) → group_by / inhibition / longerfor - Grafana:
list_dashboards,get_dashboard,list_datasources,datasource_health,list_folders - Loki logs: enumerate
loki_labels/loki_label_values, run a boundedloki_query(LogQL, stream selector required),loki_tail_errorsfor a selector; thenlog_error_burst_rcato root-cause an error burst andlog_volume_analysisfor volume/cardinality;alert_log_contextto pull the logs behind a firing alert - Governed writes: silence an alert (
create_silence, time-boxed), annotate an event (create_annotation), update/delete a dashboard (dry_runfirst for either), or hot-reload Prometheus (reload_prometheus_config)
Do NOT use when the target is not a Prometheus/Grafana observability stack — route hypervisor, storage, backup, container-orchestrator, network-device-config, or OT/industrial work to the appropriate other AIops-tools skill. Hosted/SaaS monitoring suites (Datadog, New Relic, enterprise NMS) are out of scope.
Related Skills — Skill Routing
| If the user wants… | Use |
|---|---|
| Prometheus / Alertmanager / Grafana observability ops | observability-aiops (this skill) |
| A different platform (hypervisor, storage, backup, orchestrator, network config, OT edge) | the appropriate other AIops-tools skill |
| Hosted/SaaS monitoring (Datadog, New Relic, enterprise NMS) | out of scope for this tool |
Common Workflows
The CLI covers the reads and the three RCAs (
alert,query,logs,overview); the guarded writes (silences, annotations, dashboards, config reload) are MCP tools — those steps name the tool rather than a CLI command.
"Pager went off" — root-cause the firing alerts and time-box the noise
observability-aiops overview→ one-shot stack picture: firing counts, target health, rule health — is this one alert or the whole stack?observability-aiops alert firing→ what is firing right now, grouped by severityobservability-aiops alert rca→ each firing alert joined to its rule expression with a likely cause and a recommended action (advisory heuristic — verify it, do not act on it blind)observability-aiops query instant ''→ evaluate the alert's own expression yourself and confirm the RCA's reading of itobservability-aiops query range '' --start --end --step 60s→ see when it crossed the threshold, which usually names the change that caused it- Time-box the noise while you fix the cause: the
create_silenceMCP tool on a specific matcher (a positive duration is required — silences cannot be open-ended), thenobservability-aiops alert silencesto confirm it landed - Failure branch: if the silence was too broad,
expire_silenceends it immediately, orobservability-aiops undo applyreplays the recorded inverse (create_silence's undo is expire). Ifalert rcareturns nothing while alerts are visibly firing, the alerts are coming from Alertmanager without a matching Prometheus rule — checkalertmanager_alertsandlist_rulesrather than assuming the RCA is broken.
Investigate a scrape gap ("metrics went missing")
observability-aiops overview→ up/down target counts at a glancetarget_scrape_health→ the unhealthy targets with their rawlastErrortarget_scrape_health_analysis→ down targets ranked, eachlastErrorclassified (connection refused / timeout / auth / DNS / TLS) with a concrete fixdropped_targets→ if a target is missing entirely rather than down, it was relabeled away; this is where that shows upobservability-aiops query instant 'up{job=""}'→ confirm the gap in the metric itself, not just in the target page- After fixing scrape config,
reload_prometheus_config(a governed write) → then re-runtarget_scrape_healthto confirm the target came back - Failure branch: if
reload_prometheus_configsucceeds but the target is still down, the config on disk was not what you thought — checkprometheus_config_statusfor what Prometheus actually loaded. A reload with a broken config is rejected by Prometheus and leaves the old config running, so a failed reload is not an outage.
Tame a noisy / flapping alert
observability-aiops alert firing→ the volume of what is firingalert_noise_and_flap_analysis→ alertnames with many instances or exact duplicates, each with agroup_by/ inhibition / longer-forrecommendationlist_rulesandrule_health→ read the offending rule's currentforduration and confirm it is evaluating cleanlyobservability-aiops query range '' --start --end --step 60s→ see the flapping in the data and pick aforwindow that actually covers itcreate_silencefor a time-boxed quiet period while the rule change ships;observability-aiops alert silencesto confirm- Failure branch: silencing is a stopgap, not a fix — if the silence expires
and the flapping returns, the rule threshold or
forwindow is still wrong. Useobservability-aiops undo listto see exactly which silences this tool created, so no stale silence quietly hides a real outage.
Root-cause a log error burst (Loki, read-only)
alert_log_context→ the firing alert's labels mapped to a Loki stream selector plus the correlated error logs (or start from a selector directly)observability-aiops logs errors '{app="api"}' --hours 2 --limit 200→ tail the error-level lines for that streamlog_error_burst_rca→ per-stream error counts against a baseline window, each burst classified (new signature / volume spike / single instance)observability-aiops logs query '{app="api"} |= "timeout"' --hours 2→ confirm the specific signature the RCA namedlog_volume_analysis→ the highest-volume streams and any high-cardinality label driving a stream/index explosion- Failure branch: Loki here is read-only and bounded — queries require a
stream selector and are capped by lookback and line count. A query rejected
for a missing selector is the guard working, not a bug: narrow it with
observability-aiops logs labelsfirst. There is no write surface for Loki, so remediation happens in the emitting service, not through this tool.
Safely change or retire a Grafana dashboard (reversible)
list_dashboards/list_folders→ locate the dashboard and its folderget_dashboard→ confirm this is the right dashboard before touching itupdate_dashboardwithdry_run=True→ preview; then for real — it fetches and stashes the prior model and records a restore undo- To retire one:
delete_dashboardwithdry_run=Truefirst. Delete ishighrisk — the prior model is captured before the delete so the undo can recreate it; setOBSERVABILITY_AUDIT_APPROVED_BY(andOBSERVABILITY_AUDIT_RATIONALE) if you want that recorded on the audit row create_annotation→ mark the change on the timeline so the next responder can correlate a metric shift with this edit- Failure branch: wrong dashboard or a bad edit —
observability-aiops undo listthenobservability-aiops undo applyrestores the captured prior model (or recreates a deleted dashboard from it). If the write fails outright, that is the connecting account's permissions (this tool does not gate it) — check the token's role before assumingobservability-aiops doctorconnectivity is at fault.
Governance & Safety
The skill delivers reads and writes and records them; it does not decide whether a write is permitted. That is your agent's judgement, or the permission of the account you connect it with (give it a Grafana token with only Viewer scope, and a Prometheus/Alertmanager reached without the admin/write API — writes then fail at the server). There is no read-only switch, policy file, or approval gate.
- Audit is the guarantee, and it is not bypassable. Every operation — MCP and CLI alike — is
logged to
~/.observability-aiops/audit.db(relocatable viaOBSERVABILITY_AIOPS_HOME): params, result, status, duration, and the risk tier. The CLI writes the same row the MCP path does. OBSERVABILITY_AUDIT_APPROVED_BY/OBSERVABILITY_AUDIT_RATIONALEare optional annotations recorded on the audit row (who/why); they are never required and never block.- Runaway guard — a safety backstop, not authorization: the same call looped in a tight window
trips a circuit breaker. Disable with
OBSERVABILITY_RUNAWAY_MAX=0. - Writes support
--dry-run/dry_run=Trueand double confirmation at the CLI. - Silences are time-boxed (require a positive duration). Reversible writes capture the real fetched before-state and record an inverse descriptor (create_silence→expire, update/delete dashboard→restore/recreate).
References
references/capabilities.md— full tool + platform + API-path referencereferences/cli-reference.md— CLI command referencereferences/setup-guide.md— onboarding, credentials, and connectivityreferences/agent-guardrails.md— running this with a smaller / local model: what the harness enforces for you, and a ready-made system prompt for the rest
相关技能
Use this skill whenever the user needs to operate a managed-endpoint fleet (thin clients, VDI endpoints, centrally-managed devices) — a one-shot fleet health overview, endpoint inventory (list/get), a composite per-endpoint health score (which endpoints are worst?), login & boot sessions, login-storm analysis (detect morning login storms and rank the slowest login/boot contributors), patch/config drift (which endpoints deviate from the fleet baseline), and two guarded writes (assign a config profile, reboot an endpoint). Always use this skill for "endpoint fleet overview", "list managed endpoints", "which endpoints are worst", "endpoint health score", "rank endpoints by risk", "why is login slow this morning", "login storm", "boot time analysis", "patch drift", "config drift", "which endpoints are behind on patches", "assign a profile to an endpoint", or "reboot a thin client" when the context is an endpoint-management fleet. Do NOT use when the target is OT / industrial equipment (Mod
Use this skill whenever the user needs to operate or troubleshoot a PostgreSQL server/cluster as a DBA — a one-shot cluster health overview; server reads (version/uptime, settings, extensions, databases, roles); activity (sessions, idle-in-transaction, long-running queries, locks); query stats (pg_stat_statements top-N, EXPLAIN a statement); index health (unused indexes, missing-index hints, bloat, invalid/duplicate); table health (sizes, dead-tuple bloat, autovacuum status); replication (standby lag, replication slots, WAL); three flagship analyses — slow-query RCA (worst pg_stat_statements entry + EXPLAIN → cause/action), bloat & vacuum analysis (dead tuples + autovacuum lag → recommendation), and blocking lock-chain RCA (build the wait-for tree, name the root blocker); and guarded writes (terminate a backend, cancel a query, VACUUM/ANALYZE, create/drop an index, REINDEX, ALTER SYSTEM SET a parameter, reset query stats). Always use this skill for "postgres health check", "why is this
Use this skill whenever the user needs to operate a network / infrastructure monitoring NOC on SolarWinds Orion (SWIS REST + SWQL), Paessler PRTG (web API), or Zabbix 6.x/7.x (JSON-RPC) — a one-shot NOC overview, canned SWQL answers (nodes down, flapping interfaces, muted, high-CPU nodes, full volumes, unmanaged/scheduled), a validated read-only SWQL passthrough, deduped/rolled-up active alerts, SolarWinds node/interface/volume/application health and top-N, PRTG sensors/devices/groups/history/alarms, Zabbix problems/hosts/host-groups/triggers/events/item-history/maintenances, and guarded writes (acknowledge, mute/unmute, schedule maintenance, unmanage/remanage, remove node, pause/resume sensor, create/delete Zabbix maintenance window). Always use this skill for "SolarWinds", "Orion", "SWQL", "THWACK question", "PRTG", "Paessler", "Zabbix", "Zabbix problem", "Zabbix trigger", "Zabbix maintenance", "NOC overview", "which nodes are down", "flapping interfaces", "interface flap storm", "al
Use this skill whenever the user needs to operate a single container host through the Docker Engine API, Portainer, or Podman — a one-shot host overview; container reads (list/inspect, logs tail, CPU/memory stats, top processes, restart summary); image reads (list, inspect with history, dangling, disk usage); volume reads (list, inspect, dangling); network reads (list, inspect); system reads (info, version, df disk-usage, recent events); Portainer stacks + endpoints; Compose-project rollups (list_compose_stacks, docker+podman); Podman pods (list_pods, podman-only); three flagship analyses — restart-loop RCA (crash-looping containers + cause/action), resource-pressure analysis (CPU/memory vs limits), and image & volume bloat (prune candidates + reclaimable bytes); and eight guarded writes (restart/stop/start/remove a container, prune images/volumes, update resource limits, recreate a Portainer stack). Always use this skill for "Docker host overview", "which containers are crash-looping"
Use this skill whenever the user needs to operate a Kubernetes cluster — list/inspect pods, deployments, statefulsets, daemonsets, replicasets, jobs, cronjobs, services, ingresses, endpoints, configmaps, secrets (names/keys only), PVCs/PVs/storageclasses, nodes, namespaces, and events; read pod logs; describe pods/nodes; pod/node top (metrics); read-only diagnostics / RCA (pod-health, workload-readiness); scale deployments/statefulsets; rollout status/history/undo/pause/resume and set image; delete pods/deployments/jobs; create/delete namespaces; and cordon/uncordon/drain nodes. Works with any kubeconfig-reachable cluster (standard Kubernetes, k3s, EKS, GKE, AKS). Always use this skill for "list k8s pods", "scale deployment", "kubernetes pod logs", "describe pod", "why is my pod crashing", "diagnose pods", "which deployments are unhealthy", "rollout undo", "set image", "top pods", "drain node", "cordon node", "restart deployment", "k3s", or "kubectl"-style tasks when the context is exp