MCP HubMCP Hub
SKILL·950284

detect-anomalies-aiops

pjt222
업데이트됨 1 month ago
8 조회
26
3
26
GitHub에서 보기
기타aiapi

정보

이 스킬은 시계열 분석(아이솔레이션 포레스트, Prophet, LSTM), 경고 상관관계 및 근본 원인 분석을 활용하여 운영 메트릭에 대한 AI 기반 이상 탐지를 구현합니다. 단순한 정적 임계값을 넘어 시스템 메트릭, 로그 및 트레이스에서 진정한 이상 현상을 지능적으로 식별함으로써 경고 피로를 줄입니다. 운영 팀이 경고 양에 압도될 때, 복잡한 다중 메트릭 이상을 탐지해야 할 때, 또는 계절적 패턴으로 인해 기존 임계값이 효과적이지 않을 때 사용하세요.

빠른 설치

Claude Code

추천
기본
npx skills add pjt222/agent-almanac -a claude-code
플러그인 명령대체
/plugin add https://github.com/pjt222/agent-almanac
Git 클론대체
git clone https://github.com/pjt222/agent-almanac.git ~/.claude/skills/detect-anomalies-aiops

Claude Code에서 이 명령을 복사하여 붙여넣어 스킬을 설치하세요

문서

Detect Anomalies for AIOps

See Extended Examples for complete configuration files and templates.

ML → anomalies in ops metrics + alert correlation + cut false positives.

Use When

  • Ops team drowns in alerts (>100/day)
  • Multi-metric anomalies (not just threshold)
  • Seasonal patterns → static thresholds fail
  • Predict issues before user impact
  • Correlate alerts → root cause
  • Monitoring → too many false positives
  • Subtle perf degradation trends

In

  • Required: Time series metrics (CPU, mem, latency, err rate)
  • Required: Historical data (30-90 days min)
  • Optional: Alert history w/ labels (TP/FP)
  • Optional: Sys topology (svc deps)
  • Optional: Logs → correlation
  • Optional: Deploy/change events → context

Do

Step 1: Env + Load Data

Install deps + prep time series.

# Create virtual environment
python -m venv venv
source venv/bin/activate

# Install anomaly detection libraries
pip install prophet scikit-learn pandas numpy
pip install tensorflow keras  # for LSTM models
pip install pyod  # Python Outlier Detection library
pip install statsmodels  # for statistical methods
pip install prometheus-api-client  # if using Prometheus

# Visualization
pip install plotly matplotlib seaborn

Load + prep:

# aiops/data_loader.py
import pandas as pd
import numpy as np
from datetime import datetime, timedelta
from typing import List, Dict
import logging

logging.basicConfig(level=logging.INFO)
# ... (see EXAMPLES.md for complete implementation)

→ Time series loaded w/ regular intervals, missing vals handled, features engineered.

If err: Prometheus conn fails → verify URL + net. Data gaps → forward-fill or interpolate. Ensure ts col is datetime. Mem issues on large ranges → chunks.

Step 2: Isolation Forest (Multivariate)

Unsupervised Isolation Forest.

# aiops/isolation_forest_detector.py
from sklearn.ensemble import IsolationForest
from sklearn.preprocessing import StandardScaler
import pandas as pd
import numpy as np
from typing import Dict, List
import joblib

# ... (see EXAMPLES.md for complete implementation)

→ Model trained on history, anomalies scored, typically 0.5-2% flagged.

If err: too many (>5%) → reduce contamination or retrain on cleaner baseline. Too few (<0.1%) → increase contamination or check scaling. Verify features have variance.

Step 3: Prophet (Forecast + Anomaly)

Facebook Prophet → seasonality + deviations.

# aiops/prophet_detector.py
from prophet import Prophet
import pandas as pd
import numpy as np
from typing import Dict, Tuple
import logging

logger = logging.getLogger(__name__)
# ... (see EXAMPLES.md for complete implementation)

→ Prophet captures daily/weekly seasonality, anomalies when actuals fall outside 99% CI, forecasts for capacity planning.

If err: too slow (>5 min/metric) → reduce history to 30 days or disable weekly_seasonality. Too many FP → interval_width to 0.995. Missing seasonal → custom seasonalities. TZ consistency in ts.

Step 4: Correlate Alerts + Root Cause

Group related anomalies, find causes.

# aiops/alert_correlation.py
import pandas as pd
import numpy as np
from sklearn.cluster import DBSCAN
from typing import List, Dict
from datetime import timedelta
import networkx as nx

# ... (see EXAMPLES.md for complete implementation)

→ Related anomalies → incidents, root causes via dep graph, incident summaries.

If err: all anomalies as separate → increase time_window_minutes. Root cause unclear → define metric_relationships per architecture. Verify ts sort.

Step 5: Integrate w/ Alerting

Smart alerts + noise suppress.

# aiops/intelligent_alerting.py
import requests
import logging
from typing import Dict, List
from datetime import datetime, timedelta
import json

logger = logging.getLogger(__name__)
# ... (see EXAMPLES.md for complete implementation)

→ High sev → PagerDuty, med → Slack, low → log only, dupes suppressed in 15-min window.

If err: test webhook w/ curl first. Verify severity (0.5-0.9 range). Check rate limit doesn't suppress all. TZ handling for last_alerts.

Step 6: Deploy as Continuous Svc

Auto pipeline on interval.

# aiops/monitoring_service.py
import schedule
import time
import logging
from datetime import datetime, timedelta
from data_loader import MetricsDataLoader
from isolation_forest_detector import IsolationForestDetector
from prophet_detector import ProphetAnomalyDetector
# ... (see EXAMPLES.md for complete implementation)

→ Svc runs continuous, detects every 5 min, alerts on incidents, logs all.

If err: scheduler process alive (systemd/supervisor in prod). Verify Prometheus conn. Models loaded OK. Dead man's switch if svc stops. Monitor mem (reload models periodically if grows).

Check

  • History loaded w/ no missing ts
  • Isolation Forest → known anomalies from test set
  • Prophet captures daily/weekly seasonality
  • Alert correlation groups time-related anomalies
  • Root cause → upstream issues correct
  • Smart alerting suppresses dupes
  • Severity scores (0.5-0.9)
  • Svc runs 7+ days no crash
  • FP rate <10% (labeled data)
  • TP rate >80% (critical incidents)

Traps

  • Train on anomaly data: Baseline must be clean (no incidents). Manual review or labeled data.
  • Ignore seasonality: Static models fail on daily/weekly. Prophet or time features.
  • Too sensitive: 99% CI flags normal peaks. Start 99.5% + tune on FP.
  • Skip missing data: Gaps → model errors. Robust preprocess + interpolate.
  • Alert fatigue from low sev: Filter below threshold. High-conf only.
  • Ignore topology: Treating metrics solo misses cascades. Define deps.
  • Model drift: Old data → stale. Retrain monthly or on sys changes.
  • Resource contention: Detecting every metric costly. Prioritize critical svcs or sample.

  • monitor-model-drift — detect when detection models degrade
  • monitor-data-integrity — data quality before detection
  • setup-prometheus-monitoring — collect ops metrics
  • forecast-operational-metrics — capacity planning w/ Prophet

GitHub 저장소

pjt222/agent-almanac
경로: i18n/caveman-ultra/skills/detect-anomalies-aiops
0
agentsagentskillsai-assisted-developmentclaude-codeskillsteams
FAQ

Frequently asked questions

What is the detect-anomalies-aiops skill?

detect-anomalies-aiops is a Claude Skill by pjt222. Skills package instructions and resources that Claude loads on demand, so Claude can perform detect-anomalies-aiops-related tasks without extra prompting.

How do I install detect-anomalies-aiops?

Use the install commands on this page: add detect-anomalies-aiops to Claude Code as a plugin, or clone its repository into your skills directory, then restart Claude so it picks up the skill.

What category does detect-anomalies-aiops belong to?

detect-anomalies-aiops is in the Other category, tagged ai and api.

Is detect-anomalies-aiops free to use?

Yes. detect-anomalies-aiops is listed on AIMCP and free to install. It runs inside Claude, so no separate service account is required to use the skill itself.

연관 스킬

llamaguard
기타

LlamaGuard는 폭력 및 혐오 발언 등 6가지 안전 범주에서 LLM 입력과 출력을 조정하기 위한 Meta의 70-80억 파라미터 모델입니다. 94-95% 정확도를 제공하며 vLLM, Hugging Face 또는 Amazon SageMaker를 사용해 배포할 수 있습니다. 이 기술을 사용하여 AI 애플리케이션에 콘텐츠 필터링 및 안전 가드레일을 손쉽게 통합하세요.

스킬 보기
cost-optimization
기타

이 Claude Skill은 리소스 적정화, 태깅 전략, 지출 분석을 통해 개발자들이 클라우드 비용을 최적화할 수 있도록 지원합니다. AWS, Azure, GCP에서 클라우드 비용을 절감하고 비용 거버넌스를 구현하기 위한 프레임워크를 제공합니다. 인프라 비용을 분석하거나, 리소스를 적정화하거나, 예산 제약을 충족해야 할 때 사용하세요.

스킬 보기
sports-betting-analyzer
기타

이 Claude Skill은 스프레드, 오버/언더, 프로프 베트를 포함한 스포츠 베팅 시장을 분석합니다. 역사적 추이와 상황별 통계를 검토하여 가치 베트를 발견하고, 교육적 목적으로 실행 가능한 권장 사항이 담긴 구조화된 마크다운 결과를 제공합니다. 개발자는 이 기능을 스포츠 베팅 분석 도구에 활용할 수 있으며, 단순히 엔터테인먼트/교육 목적으로만 설계되었음을 유의해야 합니다.

스킬 보기
quantizing-models-bitsandbytes
기타

이 스킬은 bitsandbytes를 사용하여 LLM을 8비트 또는 4비트 정밀도로 양자화하며, 최소한의 정확도 손실로 50-75%의 메모리 감소를 달성합니다. 제한된 GPU 메모리에서 더 큰 모델을 실행하거나 추론을 가속화하는 데 이상적이며, INT8, NF4, FP4와 같은 형식을 지원합니다. 이 스킬은 HuggingFace Transformers와 통합되어 QLoRA 학습 및 8비트 옵티마이저를 가능하게 합니다.

스킬 보기