关于 incident-lifecycle
面向 ServiceNow 的事件管理技能,依照 ITIL 实践指导从登记、分类到分派、调查、解决和关闭的完整流程,并涵盖 MCP 与 REST 操作。
主要功能
- 01创建并分类事件
- 02按影响和紧急程度确定优先级
- 03分派至处理团队
- 04记录调查笔记和客户评论
- 05执行解决与关闭流程
适用场景
- 01记录并路由新事件
- 02根据影响和紧急程度排定优先级
- 03跟踪调查直至解决
- 04确认并关闭已解决的事件
MCP 相关
介绍用于创建、分派、更新、解决和关闭 ServiceNow 事件的 MCP 工具,并列出相应的 REST 操作。
安装
复制下面的命令,在终端中运行。
$
npx skills add https:/ / github.com/ happy-technologies-llc/ happy-platform-skills --skill incident-lifecycle安装后在 Claude Code 中输入/incident-lifecycle确认已加载。
详细介绍
事件生命周期管理
概述
本技能涵盖 ServiceNow 中事件的完整生命周期,并遵循 ITIL 最佳实践:
- 创建 - 记录事件并填写适当的详细信息
- 分类 - 按类型和服务进行分类
- 确定优先级 - 设置影响、紧急程度和优先级
- 分配 - 将事件分派给合适的团队
- 调查 - 诊断问题
- 解决 - 修复问题并记录相关信息
- 关闭 - 验证并关闭事件
先决条件
- 角色: 大多数操作需要
itil,部分特殊操作需要incident_manager - 访问权限: 对事件表具有读写权限
- 知识: ITIL 事件管理基础知识
操作流程
阶段 1:创建事件
创建记录完善的事件,并填写所有必需信息。
使用 MCP:
Tool: SN-Create-Incident
Parameters:
short_description: "Brief summary of the issue"
description: "Detailed description including:
- What happened
- When it started
- Who is affected
- What has been tried"
caller_id: [user_sys_id or username]
category: software
subcategory: application
impact: 2
urgency: 2
assignment_group: Service Desk
使用 REST API:
POST /api/now/table/incident
Content-Type: application/json
{
"short_description": "Brief summary",
"description": "Detailed description...",
"caller_id": "user_sys_id",
"category": "software",
"impact": "2",
"urgency": "2",
"assignment_group": "group_sys_id"
}
创建最佳实践:
- 简短描述应为 10-50 个字符
- 描述应包含谁、什么、何时、何地
- 始终设置报告人(受影响的用户)
- 设置类别/子类别,以便正确分派
阶段 2:分类和确定优先级
确保事件分类正确。
类别层级:
Hardware
├── Computer
├── Monitor
├── Printer
└── Mobile Device
Software
├── Operating System
├── Application
├── Email
└── Database
Network
├── Connectivity
├── VPN
└── WiFi
Request
├── Access
├── Installation
└── Information
优先级矩阵:
| 影响 ↓ / 紧急程度 → | 1-高 | 2-中 | 3-低 |
|---|---|---|---|
| 1-高 | P1 | P2 | P3 |
| 2-中 | P2 | P3 | P4 |
| 3-低 | P3 | P4 | P5 |
阶段 3:分配
将事件分派给合适的解决团队。
使用 MCP:
Tool: SN-Assign-Incident
Parameters:
sys_id: [incident_sys_id]
assignment_group: Desktop Support
assigned_to: john.smith # Optional: specific person
work_notes: "Assigned based on hardware category"
阶段 4:调查和诊断
记录所有调查步骤。
添加工作备注(内部):
Tool: SN-Add-Work-Notes
Parameters:
sys_id: [incident_sys_id]
work_notes: |
Investigation Steps:
1. Verified user credentials - OK
2. Checked network connectivity - OK
3. Reviewed application logs - Found error
4. Identified root cause: Corrupted cache
Next: Clear application cache and test
添加评论(客户可见):
Tool: SN-Add-Comment
Parameters:
sys_id: [incident_sys_id]
comment: "We are investigating your issue and have identified a potential cause. We will update you shortly with a solution."
处理期间的状态转换:
New (1) → In Progress (2) → On Hold (3) → In Progress (2) → Resolved (6)
更新状态:
Tool: SN-Update-Record
Parameters:
table_name: incident
sys_id: [incident_sys_id]
data:
state: 2 # In Progress
work_notes: "Starting investigation"
阶段 5:解决
记录修复情况并解决事件。
使用 MCP:
Tool: SN-Resolve-Incident
Parameters:
sys_id: [incident_sys_id]
resolution_code: Solved (Permanently)
resolution_notes: |
Root Cause: Application cache was corrupted after update
Resolution:
1. Cleared application cache folder
2. Restarted application service
3. Verified user can now access the application
Prevention: Scheduled cache cleanup added to maintenance window
解决代码:
Solved (Permanently)- 问题已彻底解决Solved (Workaround)- 已应用临时修复Not Solved (Not Reproducible)- 无法重现问题Not Solved (Too Costly)- 修复的成本效益不合理Closed/Resolved by Caller- 用户已自行解决
阶段 6:关闭
与用户确认后关闭事件。
添加客户评论以进行确认:
Tool: SN-Add-Comment
Parameters:
sys_id: [incident_sys_id]
comment: "Your incident has been resolved. Please confirm the issue is fixed. If you don't respond within 3 business days, this incident will be automatically closed."
关闭事件:
Tool: SN-Close-Incident
Parameters:
sys_id: [incident_sys_id]
close_code: Solved (Permanently)
close_notes: "User confirmed resolution. Closing incident."
状态流转图
┌─────────┐ ┌────────────┐ ┌─────────┐
│ New │───►│ In Progress│───►│ On Hold │
│ (1) │ │ (2) │◄───│ (3) │
└────┬────┘ └─────┬──────┘ └─────────┘
│ │
│ ▼
│ ┌──────────┐ ┌─────────┐
└────────►│ Resolved │───►│ Closed │
│ (6) │ │ (7) │
└──────────┘ └─────────┘
工具使用摘要
| 阶段 | MCP 工具 | REST 端点 |
|---|---|---|
| 创建 | SN-Create-Incident | POST /incident |
| 更新 | SN-Update-Record | PATCH /incident/{id} |
| 分配 | SN-Assign-Incident | PATCH /incident/{id} |
| 备注 | SN-Add-Work-Notes, SN-Add-Comment | POST /sys_journal_field |
| 解决 | SN-Resolve-Incident | PATCH /incident/{id} |
| 关闭 | SN-Close-Incident | PATCH /incident/{id} |
最佳实践
- 定期更新: 处理进行期间,每隔 30-60 分钟添加工作备注
- 客户沟通: 在关键节点添加评论
- 完整记录: 详细备注有助于处理未来的事件
- 正确关闭: 尽可能始终取得用户确认
- 关联相关记录: 关联问题、变更或知识文章
故障排除
无法更改状态
原因: 不允许进行该状态转换,或缺少必填字段 解决方案: 检查状态转换规则;确保解决前已设置解决字段
工作备注未显示
原因: 日志字段权限问题或字段名称错误
解决方案: 验证角色权限;内部备注使用 work_notes,而非 comments
事件自动重新打开
原因: 用户回复了通知邮件 解决方案: 检查入站邮件操作;更新工作备注以确认收到
相关技能
itsm/incident-triage- 初始分诊流程itsm/major-incident- P1 事件处理itsm/problem-analysis- 根本原因分析reporting/sla-analysis- SLA 跟踪
References
评论
支持 Markdown