Monitoring & Alerting Pipeline 🤖
Core Principles
- The starting point of a monitoring system is core paths, not metric stacking: First identify core business paths, then configure metrics and alerts for those paths. Avoid monitoring everything yet missing what matters
- Alert rules are a balance of signal and noise: Too many alerts equals no alerts. Every alert must be worth human attention
- On-Call runbooks are the last mile of a monitoring system: A monitoring system without On-Call runbooks is incomplete. Alerts firing with no one knowing how to respond equals no monitoring
- Alert attribution is a reasoning chain, not a guess: From confirming authenticity to narrowing scope to correlating events to generating attribution, every step must be supported by evidence
- Correlation analysis is key to attribution: Looking at alerts in isolation inevitably leads to misjudgment. Other events within the time window must be correlated
- Dashboards serve roles, not data: Different roles focus on different metrics. Dashboards must be customized by role
- Escalation is protection, not passing the buck: The purpose of escalation is to get the right people involved at the right time, not to shirk responsibility
Interaction Mode
🤖 AI Auto-Execute (System Configuration Type)
Input
| Input Item |
Type |
Required |
Source |
Description |
| Product Architecture |
JSON/File |
Yes |
User provided |
System architecture diagram, component relationships, dependency chains |
| Metrics System |
JSON |
Yes |
output/pm-metrics-design/metrics-system/metric_system.json |
Business and technical metric definitions to monitor |
| SLA Requirements |
JSON |
Yes |
User provided |
Availability, response time, throughput requirements |
| Existing Monitoring |
JSON |
No |
output/pm-monitoring/monitoring-pipeline/existing_config |
Existing monitoring configurations and alert rules |
| Release Information |
object |
No |
output/pm-monitoring/release-gradual/release_status.json |
Recent release records |
| Configuration Change Records |
object |
No |
User provided |
Configuration modification history |
| Traffic Change Data |
object |
No |
User provided |
Traffic trends and anomalous fluctuations |
| Root Cause Knowledge Base |
object[] |
No |
User provided |
Historical problem-to-root-cause mappings |
| User Roles |
string[] |
Yes |
User provided |
Roles that need Dashboard access |
| Existing Dashboards |
JSON |
No |
output/pm-monitoring/monitoring-pipeline/existing_config |
Existing Dashboard configurations (if any) |
| On-Call Schedule |
JSON |
Yes |
On-Call Management System → Schedule |
On-duty schedule and contact information |
| Knowledge Base |
JSON |
No |
output/pm-monitoring/monitoring-pipeline/knowledge_base |
Issue handling guides and historical cases |
Execution Steps
Step 1: Monitoring System Setup [Core] (from monitoring-system)
Objective: Establish a core path monitoring system, configure metric collection and alert rules
1.1 Core Path Identification [Core]
Method:
- Analyze architecture documents to extract service components
- Identify user request main paths
- Map inter-service dependency relationships
- Mark single point of failure risk points
Output: Core path inventory, including entry services → core services → data layer → external dependencies
1.2 Metric-Alert Rule Generation [Core]
Metric Types:
- Golden Signals: latency, traffic, errors, saturation
- Business Metrics: conversion rate, order volume, DAU/MAU
- Custom Metrics: specific business events
Alert Rule Configuration:
| Rule Type |
Generation Method |
Parameter Source |
| Static Threshold |
Fixed value + SLA requirements |
SLA/SLO definitions |
| Historical Baseline |
Statistical historical data |
7d/30d mean/standard deviation |
| Dynamic Threshold |
Trend analysis + anomaly detection |
Prediction interval |
| Composite Alert |
Multi-metric combination logic |
Business rules |
Alert Parameters:
alert_rule:
name: {metric_name}_alert
severity: critical | high | medium | low
threshold:
operator: > | < | >= | <=
value: {threshold_value}
baseline:
method: historical | moving_average | seasonal
window: 7d | 30d | custom
deviation: {sigma_value}σ
sensitivity: high | medium | low
evaluation_interval: {interval}
for: {duration}
1.3 Alert Deduplication Rules [Conditional]
Deduplication Strategies:
- Alert Grouping: Aggregate by service/component/time window
- Alert Suppression: Parent-child alert relationships, high priority suppresses low priority
- Silence Rules: Auto-silence during maintenance windows
- Dedup Rules: Merge duplicate alert notifications
1.4 On-Call Runbook Generation [Deep]
Runbook Content:
- Problem description
- Self-check checklist
- Common causes
- Quick fix steps
- Escalation conditions
- Related document links
Step 2: Anomaly Detection [Conditional] (from monitoring-anomaly)
Objective: Real-time detection of metric anomalies, identify trend shifts and sudden fluctuations
Cross-module boundary note: After anomaly detection is triggered, attribution analysis is delegated to pm-06 analysis-anomaly. This step is only responsible for anomaly identification and alert triggering, and does not re-implement attribution capabilities.
2.1 Alert Classification [Conditional]
Classification Dimensions:
| Category |
Subcategory |
Characteristics |
| System Layer |
Infrastructure |
CPU/Memory/Disk/Network |
| System Layer |
Container |
Pod/Container restarts/Resource limits |
| System Layer |
Middleware |
Database/Cache/Message Queue |
| Application Layer |
Service Response |
Timeout/Connection failure/Resource exhaustion |
| Application Layer |
Error Exceptions |
Exception stacks/Business exceptions |
| Business Layer |
Business Metrics |
Conversion rate/Order volume/Payment failures |
| Business Layer |
User Behavior |
DAU anomaly/Feature usage anomaly |
| External Layer |
Third-party Services |
API timeout/Error responses |
| External Layer |
CDN/DNS |
Access anomalies/Certificate issues |
Output:
classification:
layer: system | application | business | external
category: {specific_category}
confidence: 0.0-1.0
related_alerts: [alert_ids]
2.2 Correlation Analysis [Conditional]
Analysis Methods:
- Time window correlation (alerts close in time)
- Service topology correlation (same service chain)
- Metric fluctuation correlation (anomalies occurring simultaneously)
- Change event correlation (triggered after release/config change)
Output:
correlation:
is_correlated: true | false
correlation_type: time | topology | metrics | change
related_alerts: [alert_ids]
correlation_score: 0.0-1.0
root_alert: {alert_id} | null
2.3 Root Cause Localization [Deep] (5 Why)
Analysis Methods:
- Common root cause pattern matching based on alert type
- Time-series analysis based on change events
- Upstream tracing based on dependency topology
- Historical case matching based on knowledge base
5 Why Output Format:
root_cause:
why_chain:
- question: "Why {phenomenon}?"
answer: "{direct_cause}"
evidence: "{evidence}"
# ... same structure extensible
root_cause_summary: "{one-line root cause description}"
root_cause_category: {category}
confidence: 0.0-1.0
2.4 Impact Assessment [Conditional]
Assessment Dimensions:
| Dimension |
Metric |
| User Impact |
Number/percentage of affected users |
| Feature Impact |
Core feature availability |
| Business Impact |
Conversion rate/Order volume loss |
| Revenue Impact |
Estimated GMV loss |
| Reputation Impact |
Customer complaint count/Public sentiment |
Output:
impact_scope:
level: critical | major | minor | negligible
affected_users:
count: {number}
percentage: {percentage}
affected_features:
- feature_name: {name}
availability: {percentage}
business_metrics:
- metric: {name}
impact: {value}
duration: {time}
revenue_impact:
estimated_loss: {amount}
confidence: {percentage}
2.5 Remediation Suggestions [Conditional]
Suggestion Types:
| Root Cause Type |
Suggestion Template |
| Resource Insufficiency |
Scale-out/Resource adjustment plan |
| Code Issue |
Rollback/Hotfix plan |
| Configuration Error |
Configuration correction steps |
| Dependency Failure |
Switch/Degradation plan |
| Traffic Anomaly |
Rate limiting/Circuit breaker configuration |
Output:
remediation:
immediate_actions:
- step: {description}
command: {command} | {ui_action}
automated: true | false
rollback_command: {command}
long_term_fixes:
- description: {description}
priority: P0-P3
effort: {story_points}
estimated_resolution_time: {minutes}
Step 3: Dashboard Configuration [Conditional] (from monitoring-dashboard)
Objective: Build visual monitoring dashboards, aggregate key metrics and alert status
3.1 Role Perspective Determination [Conditional]
Role Categories:
| Role |
Focus Areas |
Refresh Rate |
Detail Level |
| Executive |
Business health, overall status |
Low |
Summary |
| Product Owner |
Feature status, user metrics |
Medium |
Overview |
| Engineering Lead |
System status, alerts |
High |
Detailed |
| On-Call Engineer |
Current alerts, issue diagnosis |
Real-time |
Detailed |
| Business Analyst |
Business metrics, conversion funnel |
Medium |
Business |
Role Requirements Mapping:
role_requirements:
- role: executive
focus_areas:
- business_health
# ... same structure extensible
alert_preference: critical_only
refresh_rate: 15m
# ... same structure extensible
3.2 Core Metric Grouping [Conditional]
Grouping Strategy:
| Group Type |
Description |
Example |
| Business View |
Core business metrics |
Order volume, conversion rate, DAU |
| Technical View |
System technical metrics |
CPU, memory, latency |
| Alert View |
Current alerts and events |
Active alerts, historical events |
| Service View |
Grouped by service/component |
User service, order service |
Metric Grouping Output:
metric_groups:
- group_id: GRP-001
group_name: {name}
role: {role}
metrics:
- metric_name: api_response_time_p95
data_source: apm
visualization: time_series
# ... same structure extensible
priority: high | medium | low
refresh_interval: {minutes}
3.3 Visualization Component Selection [Deep]
Component Types:
| Component Type |
Applicable Metrics |
Characteristics |
| Time Series |
Trend metrics |
Shows changes over time |
| Gauge |
Status metrics |
Shows current value/target |
| Stat |
Single value |
Quick overview |
| Table |
List data |
Detailed data display |
| Alert List |
Alert data |
Real-time alert status |
| Heatmap |
Distribution metrics |
Shows distribution patterns |
Component Configuration:
widget_config:
- widget_id: WDG-001
widget_type: time_series | gauge | stat | table | alert_list | heatmap
title: {title}
metrics:
- name: {metric_name}
aggregation: avg | sum | max | min
visualization:
color_scheme: green_yellow_red | blue | custom
thresholds:
warning: {value}
critical: {value}
time_range: 1h | 6h | 24h | 7d | custom
layout:
width: 1 | 2 | 4 | 6 | 12
height: 1 | 2 | 3
position: {row}_{column}
3.4 Dashboard Template Generation [Deep]
Template Structure:
dashboard_template:
- dashboard_id: DASH-001
role: executive
title: Business Overview
description: Executive business health view
widgets:
- widget_id: WDG-001
widget_type: stat
title: Today's Order Volume
metrics:
- name: daily_orders
data_source: business_db
layout:
width: 3
height: 1
# ... same structure extensible
filters:
- filter_type: time_range
default: 7d
# ... same structure extensible
refresh_interval: 15m
Step 4: Alert Escalation [Conditional] (from monitoring-escalation)
Objective: Alert severity classification and escalation handling, ensuring critical alerts reach responsible parties in time
4.1 Auto-Classification [Conditional]
Classification Model:
alert_severity:
critical:
criteria:
- service_availability < 99%
- error_rate > 5%
- response_time_p99 > 5000ms
- affected_users > 10000
response_time_sla: 5 minutes
high:
criteria:
- service_availability < 99.5%
- error_rate > 1%
- response_time_p99 > 2000ms
- affected_users > 1000
response_time_sla: 15 minutes
medium:
criteria:
- service_availability < 99.9%
- error_rate > 0.5%
- response_time_p99 > 1000ms
response_time_sla: 1 hour
low:
criteria:
- non_functional_metrics
- warning_thresholds
response_time_sla: next_business_day
Classification Output:
alert_classification:
alert_id: {id}
original_severity: {level}
assessed_severity: {level}
confidence: {percentage}
factors:
- factor: service_impact
contribution: {value}
# ... same structure extensible
adjusted: true | false
adjustment_reason: {reason}
4.2 Escalation Chain Trigger [Conditional]
Escalation Rules:
escalation_rules:
- rule_id: ESC-001
trigger:
severity: critical
duration: 5 minutes
not_acknowledged: true
escalation_chain:
- level: 1
recipients: [oncall_primary]
notification_channels: [sms, call, slack]
# ... same structure extensible
# ... same structure extensible
Escalation Execution Output:
escalation_chain:
alert_id: {id}
current_level: 1
escalation_history:
- timestamp: {ISO8601}
level: 1
action: initial_notification
recipients: [{name}]
status: sent | delivered | acknowledged
next_escalation:
timestamp: {ISO8601}
level: 2
trigger_reason: {reason}
4.3 Notification Delivery [Conditional]
Notification Channels:
| Channel |
Applicable Severity |
Content Format |
| SMS |
Critical, High |
Brief summary + link |
| Phone Call |
Critical |
Voice broadcast + confirmation |
| Slack |
All |
Detailed card + actions |
| Email |
Medium, Low |
Full report |
| PagerDuty |
All |
Standard format |
Notification Template:
notification:
channels:
- channel: sms
content: |
[CRITICAL] {service_name}
{alert_summary}
Details: {link}
# ... same structure extensible
Delivery Status:
notification_status:
alert_id: {id}
notifications:
- channel: sms
recipient: {phone}
status: sent | delivered | failed
sent_at: {ISO8601}
# ... same structure extensible
acknowledgment:
required: true | false
acknowledged_by: {name}
acknowledged_at: {ISO8601}
4.4 On-Call Report [Deep]
Report Content:
oncall_report:
period:
start: {ISO8601}
end: {ISO8601}
oncall_engineer:
name: {name}
primary: {true | false}
summary:
total_alerts: {count}
critical: {count}
high: {count}
medium: {count}
low: {count}
response_metrics:
average_acknowledgment_time: {minutes}
average_resolution_time: {minutes}
sla_compliance: {percentage}
top_alerts:
- alert_id: {id}
severity: {level}
title: {title}
acknowledged_at: {ISO8601}
resolved_at: {ISO8601}
unresolved_alerts:
- alert_id: {id}
severity: {level}
reason: {reason}
action_items:
- description: {description}
owner: {name}
deadline: {date}
Output
Output File Path: output/pm-monitoring/monitoring-pipeline/
Output Depth Classification
| Depth Level |
Output Scope |
Description |
| quick |
Core path monitoring + basic alert rules |
Core conclusions + minimum viable output, only Step 1.1-1.2 core paths and alert rules |
| standard |
Complete monitoring system (current default) |
Complete output, including all Step 1-4 outputs |
| deep |
Complete system + extended analysis |
Complete output + capacity planning + chaos engineering plan + SRE maturity assessment + decision records + risk assessment |
Output Schema:
{
"type": "object",
"required": ["metrics", "alert_id", "classification", "root_cause", "impact_scope", "dashboards", "report_id", "alerts", "oncall_schedule"],
"properties": {
"metrics": {"type": "array", "description": "Monitoring metric configuration list, including name, category, threshold and baseline"},
"alert_policies": {"type": "object", "description": "Alert policy configuration"},
"suppression_rules": {"type": "object", "description": "Deduplication rule configuration"},
"alert_id": {"type": "string", "description": "Alert ID"},
"timestamp": {"type": "string", "description": "Alert timestamp"},
"classification": {"type": "object", "description": "Alert classification, including layer, category and confidence"},
"root_cause": {"type": "object", "description": "Root cause analysis, including 5Why chain and summary"},
"impact_scope": {"type": "object", "description": "Impact scope, including level, affected users and features"},
"remediation": {"type": "object", "description": "Remediation suggestions, including immediate action list"},
"needs_human_escalation": {"type": "boolean", "description": "Whether human escalation is needed"},
"dashboards": {"type": "array", "description": "Dashboard configuration list, including role, title and widgets"},
"report_id": {"type": "string", "description": "Report unique identifier"},
"generated_at": {"type": "string", "description": "Generation timestamp"},
"alerts": {"type": "array", "description": "Alert list, including severity, escalation level and executed actions"},
"oncall_schedule": {"type": "object", "description": "On-call schedule, including current and next rotation info"},
"oncall_reports": {"type": "array", "description": "On-call reports, including alert count, SLA compliance rate and average resolution time"}
}
}
├── monitoring-pipeline.json
├── monitoring-pipeline.md
├── core_paths.md
├── metrics/
│ ├── availability/
│ │ └── alert_rule.yaml
│ ├── latency/
│ │ └── alert_rule.yaml
│ ├── error_rate/
│ │ └── alert_rule.yaml
│ └── [custom_metrics]/
│ └── alert_rule.yaml
├── alert_policies.yaml
├── suppression_rules.yaml
├── oncall_handbook.md
├── anomaly/
│ ├── {alert_id}/
│ │ ├── classification.md
│ │ ├── correlation.md
│ │ ├── root_cause.md
│ │ ├── impact_assessment.md
│ │ ├── remediation.md
│ │ └── needs_human_escalation.yaml
│ └── escalation_queue.md
├── dashboards/
│ ├── {role}/
│ │ └── {dashboard_name}.yaml
│ ├── shared/
│ │ ├── alert_dashboard.yaml
│ │ └── system_health_dashboard.yaml
│ └── codex-templates/
│ └── dashboard_template.yaml
├── escalation/
│ ├── alerts/
│ │ └── {date}/
│ │ ├── {alert_id}/
│ │ │ ├── severity.yaml
│ │ │ ├── escalation_chain.yaml
│ │ │ └── notification_status.yaml
│ │ └── escalation_summary.yaml
│ ├── oncall_schedule/
│ │ └── {week}.yaml
│ └── oncall_reports/
│ └── {date}.yaml
Decision Rules
| Scenario |
Decision Rule |
| Metric coverage < 80% |
Flag warning, prompt to supplement metrics, list missing core metrics |
| Metric coverage 80%-95% |
Flag notice, suggest supplementing non-core metrics |
| Threshold conflict (same metric ≥ 2 alert rules) |
Keep the rule with highest severity, mark others as duplicate and disable |
| Insufficient baseline data (< 7 days historical data) |
Use static threshold as fallback, mark "needs data supplementation, auto-switch to dynamic baseline after 7 days" |
| New service added |
Auto-inherit basic alert template (CPU≥80%, Memory≥85%, Error rate≥1%), prompt for specialized configuration |
| P0 service alert missing |
Force supplement golden signal alerts, cannot skip |
| Alert noise rate ≥ 15% |
Auto-tighten threshold by 10%, mark for human review |
| Alert storm (≥ 5 alerts/5 minutes) |
Merge into single alert, mark primary cause, suppress correlated alerts |
| Root cause uncertain (≥ 3 candidate causes) |
Mark for human investigation, output Top 3 candidate causes with confidence |
| Impact scope expanding (affected users growing ≥ 20%/10 minutes) |
Auto-escalate severity by 1 level (max P0) |
| Impact scope expanding (affected users growing 5%-20%/10 minutes) |
Auto-escalate severity by 1 level |
| Knowledge base hit (similarity ≥ 0.85) |
Output historical solution, annotate confidence |
| Knowledge base hit (similarity 0.6-0.85) |
Output historical solution, annotate "needs human confirmation of applicability" |
| No historical cases |
Output 5 Why inquiry chain, await feedback |
| After P0 anomaly recovery |
Auto-trigger post-incident review, generate review report within 24 hours |
| Too many metrics |
Auto-group, collapse low priority |
| Too many alerts |
Show only unresolved alerts |
| Slow page load |
Lazy load low priority components |
| Role change |
Auto-adjust metric configuration |
| No metric data |
Display "No Data" status |
| Critical without ACK |
Escalate to L2 after 5 minutes |
| Repeated identical alerts |
Merge notifications, avoid alert fatigue |
| No On-Call response |
Escalate to Manager |
| High false positive rate |
Feedback to adjust threshold |
| Escalation timeout |
Auto-notify emergency contact |
Quality Checks
P0 Checks (must pass for quick/standard/deep)
P1 Checks (must pass for standard/deep)
P2 Checks (must pass for deep only)
Degradation Strategy
Upstream File Missing Degradation Plan
| Missing Upstream Input |
Degradation Plan |
Output Impact |
| Metrics System |
User provides core business metric list, supplement golden signals based on generic metric template |
Basic monitoring metric configuration, lacking metrics system support |
| Product Architecture |
User provides service component list, infer dependencies based on generic microservice architecture |
Basic core path inventory, dependencies are inferred |
| SLA Requirements |
User provides availability targets for key services, adopt industry default thresholds (99.9%/99.5%/99%) |
Alert rules based on default thresholds |
| Existing Monitoring |
Skip compatibility check, generate monitoring config from scratch |
Brand new monitoring configuration |
| Release Information |
Skip change correlation analysis, annotate in attribution "cannot exclude change factors" |
Attribution results excluding change correlation |
| Configuration Change Records |
Skip config change correlation, annotate in attribution "cannot exclude configuration change factors" |
Attribution results excluding config correlation |
| Traffic Change Data |
Skip traffic analysis dimension, annotate missing traffic data in impact assessment |
Analysis results missing traffic dimension |
| Root Cause Knowledge Base |
5 Why analysis relies entirely on logical reasoning, cannot provide historical reference solutions |
Pure reasoning attribution results, no historical case reference |
| User Roles |
Use default role template (Executive/Engineering/On-Call), user adjusts later |
Generic role Dashboard template |
| Existing Dashboards |
Generate Dashboard config from scratch, annotate potential conflicts with existing config |
Brand new Dashboard configuration |
| On-Call Schedule |
User provides current on-duty personnel contact info, AI configures escalation chain accordingly |
Escalation chain based on user input |
| Alert Rules |
Use default escalation rules (Critical 5min/High 15min/Medium 1h), annotate for human confirmation |
Escalation configuration based on default rules |
| Knowledge Base |
Escalation suggestions do not include historical case references, annotate "no historical cases" |
Escalation suggestions without historical reference |
Data Acquisition Instructions
When upstream files are missing, obtain necessary data through the following methods:
- Metrics System Missing: Ask user to provide core business metric list (e.g., order volume, conversion rate, DAU, etc.), AI will auto-supplement generic golden signals (latency, traffic, error rate, saturation) based on product type
- Product Architecture Missing: Ask user to provide service component list or system name list, AI will infer service dependency relationships based on generic architecture patterns, and annotate inferred items for human confirmation in output
- SLA Requirements Missing: Ask user to provide availability targets for key services (e.g., "payment service needs 99.9% availability"), unspecified services adopt industry default standards, annotate default values for human review in output
- Alert Data Missing: Ask user to describe anomaly symptoms, including: symptom manifestation, occurrence time, affected services/features, impact scope (user count/feature points), AI will perform attribution analysis based on description
- Context Data Missing (release/config change/traffic change): AI will explicitly annotate factors that cannot be excluded in attribution analysis, suggest human investigation of these dimensions
- Root Cause Knowledge Base Missing: AI will rely entirely on 5 Why logical reasoning for attribution, annotate "no historical case reference" in output, suggest human verification of attribution conclusions
- User Roles Missing: Use default role template to generate Dashboards, including three standard views: Executive overview, Engineering details, On-Call real-time, user can adjust based on actual role requirements
- On-Call Schedule Missing: Ask user to provide current on-duty personnel names and contact info (phone/Slack/email), AI will configure escalation notification chain accordingly
- Alert Rules Missing: Adopt default escalation rule template (Critical→5min→L1/L2/L3, High→15min→L1/L2), annotate default rules for human review and confirmation in output
Output Validation Rules
| Field Path |
Type |
Required |
Description |
| core_paths |
array |
Yes |
Core path list, at least 1 path |
| core_paths[].path_name |
string |
Yes |
Path name |
| metrics |
object |
Yes |
Monitoring metric configuration, grouped by path |
| alert_policies |
array |
Yes |
Alert policy list, at least 1 rule |
| suppression_rules |
array |
No |
Suppression rule list |
| oncall_handbook |
object |
No |
On-Call runbook, must contain escalation_paths/emergency_procedures |
| classification |
object |
Yes |
Alert classification, must contain alert_type/severity/service |
| classification.severity |
string |
Yes |
Severity, only P0/P1/P2/P3 allowed |
| root_cause |
object |
Yes |
Root cause analysis, must contain 5_whys and conclusion |
| root_cause.5_whys |
array |
Yes |
5 Why chain, 3-5 levels |
| impact_assessment |
object |
No |
Impact assessment, must contain affected_users/affected_services |
| remediation |
object |
No |
Remediation suggestions, must contain immediate_actions/long_term_fixes |
| dashboard_config |
object |
Yes |
Dashboard configuration, must contain role/panels |
| dashboard_config.role |
string |
Yes |
Role name |
| dashboard_config.panels |
array |
Yes |
Panel list, at least 1 panel |
| shared_views |
object |
No |
Shared view configuration |
| templates |
array |
No |
Template list |
| alert_classification |
object |
Yes |
Alert severity classification, must contain alert_id/severity/category |
| alert_classification.severity |
string |
Yes |
Severity, only Critical/High/Medium/Low allowed |
| escalation_chain |
array |
Yes |
Escalation chain, at least 1 level |
| notification_records |
array |
No |
Notification records, each must contain channel/recipient/status |
| oncall_report |
object |
No |
On-call report, must contain total_alerts/resolved_count |
Upstream Change Response
Upstream Change Impact Table
| Upstream Source |
Change Type |
Impact Scope |
Response Action |
| metrics-system |
Metric definition change |
Monitoring metric configuration and alert rules |
Update metric mapping and alert thresholds |
| User provided-Product Architecture |
Architecture change |
Core paths and service dependencies |
Re-identify core paths and dependency chains |
| User provided-SLA |
SLA target change |
Alert thresholds and severity standards |
Adjust alert rules and escalation conditions |
| release-gradual |
Release record update |
Change correlation analysis |
Update correlated events and attribution |
| Root Cause Knowledge Base |
Historical case update |
Root cause matching and suggestions |
Update reference case library |
| User provided-Roles |
Role requirement change |
Dashboard layering and panel layout |
Redesign role views |
| On-Call Management System |
Schedule change |
Notification recipients and escalation chain |
Update On-Call schedule and notification configuration |
Downstream Notification Mechanism Table
| Downstream Consumer |
Notification Condition |
Notification Method |
Notification Content |
| monitoring-orchestrator |
Monitoring & alerting pipeline completed |
Output file update |
Build completion status and key configuration |
| iteration-backlog-grooming |
P0 alert triggered |
Write to output file |
Urgent alert and escalation details |
1---2name: monitoring-pipeline3description: "Use when building a product monitoring and alerting system. End-to-end automated monitoring pipeline construction, from monitoring system setup, anomaly detection, dashboard configuration to alert escalation. Keywords: monitoring system, monitoring configuration, health check, alert rules, monitoring framework, monitoring setup, alert configuration, set up monitoring, configure alerts, anomaly detection, anomaly alerting, alert severity, metric anomaly, monitoring Dashboard, data dashboard, real-time monitoring, visualization, alert escalation, escalation process, On-Call, alert notification, incident response, on-duty."4metadata:5 source: https://skillmd.com/skills/luckyonetwothree/monitoring-pipeline6 module: "Product Monitoring & Iteration"7 sub-module: "Monitoring & Alerting"8 type: "pipeline"9 version: "3.0"10 domain_tags: ["Internet", "SaaS", "General"]11 trigger_examples:12 - "How to set up a monitoring system"13 - "What metrics need monitoring"14 - "How to configure alert rules"15 - "Too many alerts, how to analyze"16 - "Metrics suddenly anomalous, what happened"17 - "Help me build a monitoring dashboard"18 - "How to define alert escalation process"19 - "How to arrange on-call schedule"20 interaction_mode: "ai_auto"21execution_depth:22 default: standard23 quick_description: "Only output core path monitoring + basic alert rules"24 deep_description: "Complete system + capacity planning + chaos engineering plan + SRE maturity assessment"25---2627# Monitoring & Alerting Pipeline 🤖2829## Core Principles30311. **The starting point of a monitoring system is core paths, not metric stacking**: First identify core business paths, then configure metrics and alerts for those paths. Avoid monitoring everything yet missing what matters322. **Alert rules are a balance of signal and noise**: Too many alerts equals no alerts. Every alert must be worth human attention333. **On-Call runbooks are the last mile of a monitoring system**: A monitoring system without On-Call runbooks is incomplete. Alerts firing with no one knowing how to respond equals no monitoring344. **Alert attribution is a reasoning chain, not a guess**: From confirming authenticity to narrowing scope to correlating events to generating attribution, every step must be supported by evidence355. **Correlation analysis is key to attribution**: Looking at alerts in isolation inevitably leads to misjudgment. Other events within the time window must be correlated366. **Dashboards serve roles, not data**: Different roles focus on different metrics. Dashboards must be customized by role377. **Escalation is protection, not passing the buck**: The purpose of escalation is to get the right people involved at the right time, not to shirk responsibility3839## Interaction Mode4041🤖 AI Auto-Execute (System Configuration Type)4243## Input4445| Input Item | Type | Required | Source | Description |46|--------|------|------|------|------|47| Product Architecture | JSON/File | Yes | User provided | System architecture diagram, component relationships, dependency chains |48| Metrics System | JSON | Yes | output/pm-metrics-design/metrics-system/metric_system.json | Business and technical metric definitions to monitor |49| SLA Requirements | JSON | Yes | User provided | Availability, response time, throughput requirements |50| Existing Monitoring | JSON | No | output/pm-monitoring/monitoring-pipeline/existing_config | Existing monitoring configurations and alert rules |51| Release Information | object | No | output/pm-monitoring/release-gradual/release_status.json | Recent release records |52| Configuration Change Records | object | No | User provided | Configuration modification history |53| Traffic Change Data | object | No | User provided | Traffic trends and anomalous fluctuations |54| Root Cause Knowledge Base | object[] | No | User provided | Historical problem-to-root-cause mappings |55| User Roles | string[] | Yes | User provided | Roles that need Dashboard access |56| Existing Dashboards | JSON | No | output/pm-monitoring/monitoring-pipeline/existing_config | Existing Dashboard configurations (if any) |57| On-Call Schedule | JSON | Yes | On-Call Management System → Schedule | On-duty schedule and contact information |58| Knowledge Base | JSON | No | output/pm-monitoring/monitoring-pipeline/knowledge_base | Issue handling guides and historical cases |5960## Execution Steps6162### Step 1: Monitoring System Setup [Core] (from monitoring-system)6364**Objective**: Establish a core path monitoring system, configure metric collection and alert rules6566#### 1.1 Core Path Identification [Core]6768**Method**:69- Analyze architecture documents to extract service components70- Identify user request main paths71- Map inter-service dependency relationships72- Mark single point of failure risk points7374**Output**: Core path inventory, including entry services → core services → data layer → external dependencies7576#### 1.2 Metric-Alert Rule Generation [Core]7778**Metric Types**:79- Golden Signals: latency, traffic, errors, saturation80- Business Metrics: conversion rate, order volume, DAU/MAU81- Custom Metrics: specific business events8283**Alert Rule Configuration**:8485| Rule Type | Generation Method | Parameter Source |86|----------|----------|----------|87| Static Threshold | Fixed value + SLA requirements | SLA/SLO definitions |88| Historical Baseline | Statistical historical data | 7d/30d mean/standard deviation |89| Dynamic Threshold | Trend analysis + anomaly detection | Prediction interval |90| Composite Alert | Multi-metric combination logic | Business rules |9192**Alert Parameters**:9394```yaml95alert_rule:96 name: {metric_name}_alert97 severity: critical | high | medium | low98 threshold:99 operator: > | < | >= | <=100 value: {threshold_value}101 baseline:102 method: historical | moving_average | seasonal103 window: 7d | 30d | custom104 deviation: {sigma_value}σ105 sensitivity: high | medium | low106 evaluation_interval: {interval}107 for: {duration}108```109110#### 1.3 Alert Deduplication Rules [Conditional]111112**Deduplication Strategies**:113- Alert Grouping: Aggregate by service/component/time window114- Alert Suppression: Parent-child alert relationships, high priority suppresses low priority115- Silence Rules: Auto-silence during maintenance windows116- Dedup Rules: Merge duplicate alert notifications117118#### 1.4 On-Call Runbook Generation [Deep]119120**Runbook Content**:121- Problem description122- Self-check checklist123- Common causes124- Quick fix steps125- Escalation conditions126- Related document links127128### Step 2: Anomaly Detection [Conditional] (from monitoring-anomaly)129130**Objective**: Real-time detection of metric anomalies, identify trend shifts and sudden fluctuations131132> **Cross-module boundary note**: After anomaly detection is triggered, attribution analysis is delegated to pm-06 analysis-anomaly. This step is only responsible for anomaly identification and alert triggering, and does not re-implement attribution capabilities.133134#### 2.1 Alert Classification [Conditional]135136**Classification Dimensions**:137138| Category | Subcategory | Characteristics |139|------|------|------|140| System Layer | Infrastructure | CPU/Memory/Disk/Network |141| System Layer | Container | Pod/Container restarts/Resource limits |142| System Layer | Middleware | Database/Cache/Message Queue |143| Application Layer | Service Response | Timeout/Connection failure/Resource exhaustion |144| Application Layer | Error Exceptions | Exception stacks/Business exceptions |145| Business Layer | Business Metrics | Conversion rate/Order volume/Payment failures |146| Business Layer | User Behavior | DAU anomaly/Feature usage anomaly |147| External Layer | Third-party Services | API timeout/Error responses |148| External Layer | CDN/DNS | Access anomalies/Certificate issues |149150**Output**:151152```yaml153classification:154 layer: system | application | business | external155 category: {specific_category}156 confidence: 0.0-1.0157 related_alerts: [alert_ids]158```159160#### 2.2 Correlation Analysis [Conditional]161162**Analysis Methods**:163- Time window correlation (alerts close in time)164- Service topology correlation (same service chain)165- Metric fluctuation correlation (anomalies occurring simultaneously)166- Change event correlation (triggered after release/config change)167168**Output**:169170```yaml171correlation:172 is_correlated: true | false173 correlation_type: time | topology | metrics | change174 related_alerts: [alert_ids]175 correlation_score: 0.0-1.0176 root_alert: {alert_id} | null177```178179#### 2.3 Root Cause Localization [Deep] (5 Why)180181**Analysis Methods**:182- Common root cause pattern matching based on alert type183- Time-series analysis based on change events184- Upstream tracing based on dependency topology185- Historical case matching based on knowledge base186187**5 Why Output Format**:188189```yaml190root_cause:191 why_chain:192 - question: "Why {phenomenon}?"193 answer: "{direct_cause}"194 evidence: "{evidence}"195 # ... same structure extensible196 root_cause_summary: "{one-line root cause description}"197 root_cause_category: {category}198 confidence: 0.0-1.0199```200201#### 2.4 Impact Assessment [Conditional]202203**Assessment Dimensions**:204205| Dimension | Metric |206|------|------|207| User Impact | Number/percentage of affected users |208| Feature Impact | Core feature availability |209| Business Impact | Conversion rate/Order volume loss |210| Revenue Impact | Estimated GMV loss |211| Reputation Impact | Customer complaint count/Public sentiment |212213**Output**:214215```yaml216impact_scope:217 level: critical | major | minor | negligible218 affected_users:219 count: {number}220 percentage: {percentage}221 affected_features:222 - feature_name: {name}223 availability: {percentage}224 business_metrics:225 - metric: {name}226 impact: {value}227 duration: {time}228 revenue_impact:229 estimated_loss: {amount}230 confidence: {percentage}231```232233#### 2.5 Remediation Suggestions [Conditional]234235**Suggestion Types**:236237| Root Cause Type | Suggestion Template |238|----------|----------|239| Resource Insufficiency | Scale-out/Resource adjustment plan |240| Code Issue | Rollback/Hotfix plan |241| Configuration Error | Configuration correction steps |242| Dependency Failure | Switch/Degradation plan |243| Traffic Anomaly | Rate limiting/Circuit breaker configuration |244245**Output**:246247```yaml248remediation:249 immediate_actions:250 - step: {description}251 command: {command} | {ui_action}252 automated: true | false253 rollback_command: {command}254 long_term_fixes:255 - description: {description}256 priority: P0-P3257 effort: {story_points}258 estimated_resolution_time: {minutes}259```260261### Step 3: Dashboard Configuration [Conditional] (from monitoring-dashboard)262263**Objective**: Build visual monitoring dashboards, aggregate key metrics and alert status264265#### 3.1 Role Perspective Determination [Conditional]266267**Role Categories**:268269| Role | Focus Areas | Refresh Rate | Detail Level |270|------|--------|----------|----------|271| Executive | Business health, overall status | Low | Summary |272| Product Owner | Feature status, user metrics | Medium | Overview |273| Engineering Lead | System status, alerts | High | Detailed |274| On-Call Engineer | Current alerts, issue diagnosis | Real-time | Detailed |275| Business Analyst | Business metrics, conversion funnel | Medium | Business |276277**Role Requirements Mapping**:278279```yaml280role_requirements:281 - role: executive282 focus_areas:283 - business_health284 # ... same structure extensible285 alert_preference: critical_only286 refresh_rate: 15m287 # ... same structure extensible288```289290#### 3.2 Core Metric Grouping [Conditional]291292**Grouping Strategy**:293294| Group Type | Description | Example |295|----------|------|------|296| Business View | Core business metrics | Order volume, conversion rate, DAU |297| Technical View | System technical metrics | CPU, memory, latency |298| Alert View | Current alerts and events | Active alerts, historical events |299| Service View | Grouped by service/component | User service, order service |300301**Metric Grouping Output**:302303```yaml304metric_groups:305 - group_id: GRP-001306 group_name: {name}307 role: {role}308 metrics:309 - metric_name: api_response_time_p95310 data_source: apm311 visualization: time_series312 # ... same structure extensible313 priority: high | medium | low314 refresh_interval: {minutes}315```316317#### 3.3 Visualization Component Selection [Deep]318319**Component Types**:320321| Component Type | Applicable Metrics | Characteristics |322|----------|----------|------|323| Time Series | Trend metrics | Shows changes over time |324| Gauge | Status metrics | Shows current value/target |325| Stat | Single value | Quick overview |326| Table | List data | Detailed data display |327| Alert List | Alert data | Real-time alert status |328| Heatmap | Distribution metrics | Shows distribution patterns |329330**Component Configuration**:331332```yaml333widget_config:334 - widget_id: WDG-001335 widget_type: time_series | gauge | stat | table | alert_list | heatmap336 title: {title}337 metrics:338 - name: {metric_name}339 aggregation: avg | sum | max | min340 visualization:341 color_scheme: green_yellow_red | blue | custom342 thresholds:343 warning: {value}344 critical: {value}345 time_range: 1h | 6h | 24h | 7d | custom346 layout:347 width: 1 | 2 | 4 | 6 | 12348 height: 1 | 2 | 3349 position: {row}_{column}350```351352#### 3.4 Dashboard Template Generation [Deep]353354**Template Structure**:355356```yaml357dashboard_template:358 - dashboard_id: DASH-001359 role: executive360 title: Business Overview361 description: Executive business health view362 widgets:363 - widget_id: WDG-001364 widget_type: stat365 title: Today's Order Volume366 metrics:367 - name: daily_orders368 data_source: business_db369 layout:370 width: 3371 height: 1372 # ... same structure extensible373 filters:374 - filter_type: time_range375 default: 7d376 # ... same structure extensible377 refresh_interval: 15m378```379380### Step 4: Alert Escalation [Conditional] (from monitoring-escalation)381382**Objective**: Alert severity classification and escalation handling, ensuring critical alerts reach responsible parties in time383384#### 4.1 Auto-Classification [Conditional]385386**Classification Model**:387388```yaml389alert_severity:390 critical:391 criteria:392 - service_availability < 99%393 - error_rate > 5%394 - response_time_p99 > 5000ms395 - affected_users > 10000396 response_time_sla: 5 minutes397 high:398 criteria:399 - service_availability < 99.5%400 - error_rate > 1%401 - response_time_p99 > 2000ms402 - affected_users > 1000403 response_time_sla: 15 minutes404 medium:405 criteria:406 - service_availability < 99.9%407 - error_rate > 0.5%408 - response_time_p99 > 1000ms409 response_time_sla: 1 hour410 low:411 criteria:412 - non_functional_metrics413 - warning_thresholds414 response_time_sla: next_business_day415```416417**Classification Output**:418419```yaml420alert_classification:421 alert_id: {id}422 original_severity: {level}423 assessed_severity: {level}424 confidence: {percentage}425 factors:426 - factor: service_impact427 contribution: {value}428 # ... same structure extensible429 adjusted: true | false430 adjustment_reason: {reason}431```432433#### 4.2 Escalation Chain Trigger [Conditional]434435**Escalation Rules**:436437```yaml438escalation_rules:439 - rule_id: ESC-001440 trigger:441 severity: critical442 duration: 5 minutes443 not_acknowledged: true444 escalation_chain:445 - level: 1446 recipients: [oncall_primary]447 notification_channels: [sms, call, slack]448 # ... same structure extensible449 # ... same structure extensible450```451452**Escalation Execution Output**:453454```yaml455escalation_chain:456 alert_id: {id}457 current_level: 1458 escalation_history:459 - timestamp: {ISO8601}460 level: 1461 action: initial_notification462 recipients: [{name}]463 status: sent | delivered | acknowledged464 next_escalation:465 timestamp: {ISO8601}466 level: 2467 trigger_reason: {reason}468```469470#### 4.3 Notification Delivery [Conditional]471472**Notification Channels**:473474| Channel | Applicable Severity | Content Format |475|------|----------|----------|476| SMS | Critical, High | Brief summary + link |477| Phone Call | Critical | Voice broadcast + confirmation |478| Slack | All | Detailed card + actions |479| Email | Medium, Low | Full report |480| PagerDuty | All | Standard format |481482**Notification Template**:483484```yaml485notification:486 channels:487 - channel: sms488 content: |489 [CRITICAL] {service_name}490 {alert_summary}491 Details: {link}492 # ... same structure extensible493```494495**Delivery Status**:496497```yaml498notification_status:499 alert_id: {id}500 notifications:501 - channel: sms502 recipient: {phone}503 status: sent | delivered | failed504 sent_at: {ISO8601}505 # ... same structure extensible506 acknowledgment:507 required: true | false508 acknowledged_by: {name}509 acknowledged_at: {ISO8601}510```511512#### 4.4 On-Call Report [Deep]513514**Report Content**:515516```yaml517oncall_report:518 period:519 start: {ISO8601}520 end: {ISO8601}521 oncall_engineer:522 name: {name}523 primary: {true | false}524 summary:525 total_alerts: {count}526 critical: {count}527 high: {count}528 medium: {count}529 low: {count}530 response_metrics:531 average_acknowledgment_time: {minutes}532 average_resolution_time: {minutes}533 sla_compliance: {percentage}534 top_alerts:535 - alert_id: {id}536 severity: {level}537 title: {title}538 acknowledged_at: {ISO8601}539 resolved_at: {ISO8601}540 unresolved_alerts:541 - alert_id: {id}542 severity: {level}543 reason: {reason}544 action_items:545 - description: {description}546 owner: {name}547 deadline: {date}548```549550## Output551552553**Output File Path**: `output/pm-monitoring/monitoring-pipeline/`554555### Output Depth Classification556557| Depth Level | Output Scope | Description |558|----------|----------|------|559| quick | Core path monitoring + basic alert rules | Core conclusions + minimum viable output, only Step 1.1-1.2 core paths and alert rules |560| standard | Complete monitoring system (current default) | Complete output, including all Step 1-4 outputs |561| deep | Complete system + extended analysis | Complete output + capacity planning + chaos engineering plan + SRE maturity assessment + decision records + risk assessment |562563**Output Schema**:564565```json566{567 "type": "object",568 "required": ["metrics", "alert_id", "classification", "root_cause", "impact_scope", "dashboards", "report_id", "alerts", "oncall_schedule"],569 "properties": {570 "metrics": {"type": "array", "description": "Monitoring metric configuration list, including name, category, threshold and baseline"},571 "alert_policies": {"type": "object", "description": "Alert policy configuration"},572 "suppression_rules": {"type": "object", "description": "Deduplication rule configuration"},573 "alert_id": {"type": "string", "description": "Alert ID"},574 "timestamp": {"type": "string", "description": "Alert timestamp"},575 "classification": {"type": "object", "description": "Alert classification, including layer, category and confidence"},576 "root_cause": {"type": "object", "description": "Root cause analysis, including 5Why chain and summary"},577 "impact_scope": {"type": "object", "description": "Impact scope, including level, affected users and features"},578 "remediation": {"type": "object", "description": "Remediation suggestions, including immediate action list"},579 "needs_human_escalation": {"type": "boolean", "description": "Whether human escalation is needed"},580 "dashboards": {"type": "array", "description": "Dashboard configuration list, including role, title and widgets"},581 "report_id": {"type": "string", "description": "Report unique identifier"},582 "generated_at": {"type": "string", "description": "Generation timestamp"},583 "alerts": {"type": "array", "description": "Alert list, including severity, escalation level and executed actions"},584 "oncall_schedule": {"type": "object", "description": "On-call schedule, including current and next rotation info"},585 "oncall_reports": {"type": "array", "description": "On-call reports, including alert count, SLA compliance rate and average resolution time"}586 }587}588```589590```591├── monitoring-pipeline.json592├── monitoring-pipeline.md593├── core_paths.md594├── metrics/595│ ├── availability/596│ │ └── alert_rule.yaml597│ ├── latency/598│ │ └── alert_rule.yaml599│ ├── error_rate/600│ │ └── alert_rule.yaml601│ └── [custom_metrics]/602│ └── alert_rule.yaml603├── alert_policies.yaml604├── suppression_rules.yaml605├── oncall_handbook.md606├── anomaly/607│ ├── {alert_id}/608│ │ ├── classification.md609│ │ ├── correlation.md610│ │ ├── root_cause.md611│ │ ├── impact_assessment.md612│ │ ├── remediation.md613│ │ └── needs_human_escalation.yaml614│ └── escalation_queue.md615├── dashboards/616│ ├── {role}/617│ │ └── {dashboard_name}.yaml618│ ├── shared/619│ │ ├── alert_dashboard.yaml620│ │ └── system_health_dashboard.yaml621│ └── codex-templates/622│ └── dashboard_template.yaml623├── escalation/624│ ├── alerts/625│ │ └── {date}/626│ │ ├── {alert_id}/627│ │ │ ├── severity.yaml628│ │ │ ├── escalation_chain.yaml629│ │ │ └── notification_status.yaml630│ │ └── escalation_summary.yaml631│ ├── oncall_schedule/632│ │ └── {week}.yaml633│ └── oncall_reports/634│ └── {date}.yaml635```636637## Decision Rules638639| Scenario | Decision Rule |640|------|----------|641| Metric coverage < 80% | Flag warning, prompt to supplement metrics, list missing core metrics |642| Metric coverage 80%-95% | Flag notice, suggest supplementing non-core metrics |643| Threshold conflict (same metric ≥ 2 alert rules) | Keep the rule with highest severity, mark others as duplicate and disable |644| Insufficient baseline data (< 7 days historical data) | Use static threshold as fallback, mark "needs data supplementation, auto-switch to dynamic baseline after 7 days" |645| New service added | Auto-inherit basic alert template (CPU≥80%, Memory≥85%, Error rate≥1%), prompt for specialized configuration |646| P0 service alert missing | Force supplement golden signal alerts, cannot skip |647| Alert noise rate ≥ 15% | Auto-tighten threshold by 10%, mark for human review |648| Alert storm (≥ 5 alerts/5 minutes) | Merge into single alert, mark primary cause, suppress correlated alerts |649| Root cause uncertain (≥ 3 candidate causes) | Mark for human investigation, output Top 3 candidate causes with confidence |650| Impact scope expanding (affected users growing ≥ 20%/10 minutes) | Auto-escalate severity by 1 level (max P0) |651| Impact scope expanding (affected users growing 5%-20%/10 minutes) | Auto-escalate severity by 1 level |652| Knowledge base hit (similarity ≥ 0.85) | Output historical solution, annotate confidence |653| Knowledge base hit (similarity 0.6-0.85) | Output historical solution, annotate "needs human confirmation of applicability" |654| No historical cases | Output 5 Why inquiry chain, await feedback |655| After P0 anomaly recovery | Auto-trigger post-incident review, generate review report within 24 hours |656| Too many metrics | Auto-group, collapse low priority |657| Too many alerts | Show only unresolved alerts |658| Slow page load | Lazy load low priority components |659| Role change | Auto-adjust metric configuration |660| No metric data | Display "No Data" status |661| Critical without ACK | Escalate to L2 after 5 minutes |662| Repeated identical alerts | Merge notifications, avoid alert fatigue |663| No On-Call response | Escalate to Manager |664| High false positive rate | Feedback to adjust threshold |665| Escalation timeout | Auto-notify emergency contact |666667## Quality Checks668669### P0 Checks (must pass for quick/standard/deep)670671- [ ] Core path coverage ≥ 95%672- [ ] Each core path has at least 4 golden signals673- [ ] No conflicting or missing alert rules674- [ ] SLA requirements have corresponding metric support675676### P1 Checks (must pass for standard/deep)677678- [ ] Alert noise rate < 15%679- [ ] All P0 services have On-Call runbooks680- [ ] Alert classification accuracy ≥ 85%681- [ ] Remediation suggestions are actionable682- [ ] No missing escalation tags683- [ ] All roles have corresponding Dashboards684- [ ] Core metric coverage ≥ 90%685- [ ] Alert configuration is correct686- [ ] Alert severity classification accuracy ≥ 90%687- [ ] Escalation trigger timeliness 100%688- [ ] Notification delivery rate ≥ 99%689- [ ] SLA response time meets target690- [ ] Escalation chain configuration is correct691692### P2 Checks (must pass for deep only)693694- [ ] Root cause localization accuracy ≥ 80%695- [ ] 5 Why chain is complete (3-5 levels)696- [ ] MTTR reduction target achieved697- [ ] Visualization component selection is reasonable698- [ ] Layout is aesthetically pleasing with clear hierarchy699- [ ] Refresh rate matches role requirements700- [ ] On-call report completeness rate 100%701- [ ] Capacity planning output provided (resource utilization forecast, scale-out thresholds, capacity redundancy assessment)702- [ ] Chaos engineering plan generated (fault injection scenarios, blast radius assessment, recovery verification plan)703- [ ] SRE maturity assessment completed (five-dimensional scoring across monitoring/alerting/response/postmortem/automation)704705## Degradation Strategy706707### Upstream File Missing Degradation Plan708709| Missing Upstream Input | Degradation Plan | Output Impact |710|---------------|---------|---------|711| Metrics System | User provides core business metric list, supplement golden signals based on generic metric template | Basic monitoring metric configuration, lacking metrics system support |712| Product Architecture | User provides service component list, infer dependencies based on generic microservice architecture | Basic core path inventory, dependencies are inferred |713| SLA Requirements | User provides availability targets for key services, adopt industry default thresholds (99.9%/99.5%/99%) | Alert rules based on default thresholds |714| Existing Monitoring | Skip compatibility check, generate monitoring config from scratch | Brand new monitoring configuration |715| Release Information | Skip change correlation analysis, annotate in attribution "cannot exclude change factors" | Attribution results excluding change correlation |716| Configuration Change Records | Skip config change correlation, annotate in attribution "cannot exclude configuration change factors" | Attribution results excluding config correlation |717| Traffic Change Data | Skip traffic analysis dimension, annotate missing traffic data in impact assessment | Analysis results missing traffic dimension |718| Root Cause Knowledge Base | 5 Why analysis relies entirely on logical reasoning, cannot provide historical reference solutions | Pure reasoning attribution results, no historical case reference |719| User Roles | Use default role template (Executive/Engineering/On-Call), user adjusts later | Generic role Dashboard template |720| Existing Dashboards | Generate Dashboard config from scratch, annotate potential conflicts with existing config | Brand new Dashboard configuration |721| On-Call Schedule | User provides current on-duty personnel contact info, AI configures escalation chain accordingly | Escalation chain based on user input |722| Alert Rules | Use default escalation rules (Critical 5min/High 15min/Medium 1h), annotate for human confirmation | Escalation configuration based on default rules |723| Knowledge Base | Escalation suggestions do not include historical case references, annotate "no historical cases" | Escalation suggestions without historical reference |724725### Data Acquisition Instructions726727When upstream files are missing, obtain necessary data through the following methods:7287291. **Metrics System Missing**: Ask user to provide core business metric list (e.g., order volume, conversion rate, DAU, etc.), AI will auto-supplement generic golden signals (latency, traffic, error rate, saturation) based on product type7302. **Product Architecture Missing**: Ask user to provide service component list or system name list, AI will infer service dependency relationships based on generic architecture patterns, and annotate inferred items for human confirmation in output7313. **SLA Requirements Missing**: Ask user to provide availability targets for key services (e.g., "payment service needs 99.9% availability"), unspecified services adopt industry default standards, annotate default values for human review in output7324. **Alert Data Missing**: Ask user to describe anomaly symptoms, including: symptom manifestation, occurrence time, affected services/features, impact scope (user count/feature points), AI will perform attribution analysis based on description7335. **Context Data Missing** (release/config change/traffic change): AI will explicitly annotate factors that cannot be excluded in attribution analysis, suggest human investigation of these dimensions7346. **Root Cause Knowledge Base Missing**: AI will rely entirely on 5 Why logical reasoning for attribution, annotate "no historical case reference" in output, suggest human verification of attribution conclusions7357. **User Roles Missing**: Use default role template to generate Dashboards, including three standard views: Executive overview, Engineering details, On-Call real-time, user can adjust based on actual role requirements7368. **On-Call Schedule Missing**: Ask user to provide current on-duty personnel names and contact info (phone/Slack/email), AI will configure escalation notification chain accordingly7379. **Alert Rules Missing**: Adopt default escalation rule template (Critical→5min→L1/L2/L3, High→15min→L1/L2), annotate default rules for human review and confirmation in output738739## Output Validation Rules740741| Field Path | Type | Required | Description |742|----------|------|------|------|743| core_paths | array | Yes | Core path list, at least 1 path |744| core_paths[].path_name | string | Yes | Path name |745| metrics | object | Yes | Monitoring metric configuration, grouped by path |746| alert_policies | array | Yes | Alert policy list, at least 1 rule |747| suppression_rules | array | No | Suppression rule list |748| oncall_handbook | object | No | On-Call runbook, must contain escalation_paths/emergency_procedures |749| classification | object | Yes | Alert classification, must contain alert_type/severity/service |750| classification.severity | string | Yes | Severity, only P0/P1/P2/P3 allowed |751| root_cause | object | Yes | Root cause analysis, must contain 5_whys and conclusion |752| root_cause.5_whys | array | Yes | 5 Why chain, 3-5 levels |753| impact_assessment | object | No | Impact assessment, must contain affected_users/affected_services |754| remediation | object | No | Remediation suggestions, must contain immediate_actions/long_term_fixes |755| dashboard_config | object | Yes | Dashboard configuration, must contain role/panels |756| dashboard_config.role | string | Yes | Role name |757| dashboard_config.panels | array | Yes | Panel list, at least 1 panel |758| shared_views | object | No | Shared view configuration |759| templates | array | No | Template list |760| alert_classification | object | Yes | Alert severity classification, must contain alert_id/severity/category |761| alert_classification.severity | string | Yes | Severity, only Critical/High/Medium/Low allowed |762| escalation_chain | array | Yes | Escalation chain, at least 1 level |763| notification_records | array | No | Notification records, each must contain channel/recipient/status |764| oncall_report | object | No | On-call report, must contain total_alerts/resolved_count |765766## Upstream Change Response767768### Upstream Change Impact Table769770| Upstream Source | Change Type | Impact Scope | Response Action |771|----------|----------|----------|----------|772| metrics-system | Metric definition change | Monitoring metric configuration and alert rules | Update metric mapping and alert thresholds |773| User provided-Product Architecture | Architecture change | Core paths and service dependencies | Re-identify core paths and dependency chains |774| User provided-SLA | SLA target change | Alert thresholds and severity standards | Adjust alert rules and escalation conditions |775| release-gradual | Release record update | Change correlation analysis | Update correlated events and attribution |776| Root Cause Knowledge Base | Historical case update | Root cause matching and suggestions | Update reference case library |777| User provided-Roles | Role requirement change | Dashboard layering and panel layout | Redesign role views |778| On-Call Management System | Schedule change | Notification recipients and escalation chain | Update On-Call schedule and notification configuration |779780### Downstream Notification Mechanism Table781782| Downstream Consumer | Notification Condition | Notification Method | Notification Content |783|------------|----------|----------|----------|784| monitoring-orchestrator | Monitoring & alerting pipeline completed | Output file update | Build completion status and key configuration |785| iteration-backlog-grooming | P0 alert triggered | Write to output file | Urgent alert and escalation details |