一键导入
observability
Log, metric, and trace analysis methodology. Use when analyzing logs, investigating errors, querying metrics, or debugging production issues.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Log, metric, and trace analysis methodology. Use when analyzing logs, investigating errors, querying metrics, or debugging production issues.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
AWS service troubleshooting patterns. Use for EC2, ECS, Lambda, CloudWatch, RDS issues.
Search and read Confluence documentation. Use when looking for internal docs, knowledge base articles, runbooks, or team documentation stored in Confluence.
PostgreSQL database inspection and queries. Use when investigating table schemas, running queries, checking locks, replication status, or long-running queries.
Correlate incidents with recent deployments and code changes. Use when investigating if a deployment caused an issue, finding what changed, or identifying the commit that introduced a bug.
GitHub code search, file reading, PR review, branch/file management, and commit operations. Use when you need to search code patterns, read repository files, review pull requests, create branches, commit files, or open PRs.
Kubernetes debugging methodology and scripts. Use for pod crashes, CrashLoopBackOff, OOMKilled, deployment issues, resource problems, or container failures.
| name | observability |
| description | Log, metric, and trace analysis methodology. Use when analyzing logs, investigating errors, querying metrics, or debugging production issues. |
| allowed-tools | Bash(aws *, kubectl *, python *) |
NEVER start by reading raw logs. Always begin with aggregated statistics:
# Error rate over time
filter @message like /ERROR/
| stats count(*) as errors by bin(5m)
# Top error messages
filter @message like /Exception/
| stats count(*) by @message
| sort count desc
| limit 10
# Latency percentiles
stats pct(@duration, 50) as p50, pct(@duration, 99) as p99 by bin(5m)
# Unique error types
filter @message like /ERROR/
| parse @message /(?<error_type>[\w.]+Exception)/
| stats count(*) by error_type
# List log groups
aws logs describe-log-groups --log-group-name-prefix /ecs/
# Quick error search
aws logs filter-log-events \
--log-group-name <group> \
--start-time <epoch-ms> \
--filter-pattern "ERROR"
# Insights query
aws logs start-query \
--log-group-name <group> \
--start-time <epoch> --end-time <epoch> \
--query-string 'fields @timestamp, @message | filter @message like /ERROR/ | sort @timestamp desc | limit 50'
# Get query results
aws logs get-query-results --query-id <id>
# Pod logs (recent)
kubectl logs <pod> -n <namespace> --tail=100
# All pods in a deployment
kubectl logs deployment/<name> -n <namespace> --tail=50
# Previous container (after crash)
kubectl logs <pod> -n <namespace> --previous
# Follow logs in real-time
kubectl logs -f <pod> -n <namespace>
# Logs from specific time
kubectl logs <pod> -n <namespace> --since=1h
# Node resource usage
kubectl top nodes
# Pod resource usage
kubectl top pods -n <namespace> --sort-by=cpu
kubectl top pods -n <namespace> --sort-by=memory
USE Method (for infrastructure):
RED Method (for services):
When reporting observability findings:
## Observability Analysis
### Time Window
- Start: [timestamp]
- End: [timestamp]
### Statistics
- Total logs: X events
- Error count: Y events (Z%)
- Services affected: N services
- Error rate trend: [increasing/stable/decreasing]
### Top Error Services
1. [service1]: N errors
2. [service2]: M errors
### Error Patterns
- Primary error type: [description]
- First occurrence: [timestamp]
- Correlation: [deployment/traffic/external event]
### Sample Errors
[2-3 representative error messages with context]
### Root Cause Hypothesis
[Based on patterns observed]
### Confidence Level
[High/Medium/Low with explanation]