闲社服务运行正常AI智能体自动化平台
p

PagerDuty代理管理

技能标识:pagerduty-agent

Manage PagerDuty incidents, on-call schedules, services, and maintenance windows directly from your agent.

作者:admin | 来源记录:ClawHub
登记来源
ClawHub
版本
V 1.0.0
检测标记
后台标记通过
免费
免费获取
1
收藏
来源与检测标记为平台登记信息,并不代表已展示可复核的检测报告。使用前请核对版本、依赖和所需权限,建议先在隔离环境中运行。
概述
安装方式
版本历史

PagerDuty代理管理

PagerDuty Agent

⚠️ 这是一个非官方的社区技能,与 PagerDuty, Inc. 无关联且未获其认可。

无需离开你的代理工作流,即可触发、确认和解决 PagerDuty 事件,查看值班人员,管理维护窗口以及检查服务。

设置

  1. 1. 生成一个 PagerDuty API 密钥:PagerDuty → Integrations → API Access Keys → Create New Key
  2. 导出所需的环境变量:

bash
export PAGERDUTYAPIKEY=your-v2-api-key
export PAGERDUTYFROMEMAIL=you@yourcompany.com # 写操作必需

PAGERDUTYFROMEMAIL 必须是你的账户中有效 PagerDuty 用户的邮箱。PagerDuty 的 REST API 要求所有 POST/PUT 请求都提供此信息。

使用方法

所有命令均通过将 { command, params } JSON 对象管道传输至 node pagerduty.js 来调用。该技能在标准输出中返回结构化的 JSON。

bash
echo {command:list_incidents,params:{status:triggered}} | node pagerduty.js



命令

事件


trigger_incident

在某个服务上创建新事件。

参数

字段类型必填描述
service_idstring✓PagerDuty 服务 ID(例如 P1ABCDE)
title
string | ✓ | 事件标题/摘要 |
| severity | string | | critical、error、warning、info — 映射到紧急程度 |
| body | string | | 详细描述/操作手册上下文 |

示例

json
{
command: trigger_incident,
params: {
service_id: P1ABCDE,
title: 数据库复制延迟超过 60 秒,
severity: critical,
body: 副本 db-02 落后主库 90 秒。请检查 pgstatreplication。
}
}

响应

json
{
id: Q2W3E4R,
incident_number: 1042,
title: 数据库复制延迟超过 60 秒,
status: triggered,
urgency: high,
html_url: https://your-subdomain.pagerduty.com/incidents/Q2W3E4R,
created_at: 2026-03-04T12:00:00Z,
service: { id: P1ABCDE, name: 生产数据库 }
}



acknowledge_incident

确认一个事件,表示正在处理中。

参数

字段类型必填描述
incident_idstring✓PagerDuty 事件 ID

示例

json
{ command: acknowledgeincident, params: { incidentid: Q2W3E4R } }

响应

json
{
id: Q2W3E4R,
incident_number: 1042,
title: 数据库复制延迟超过 60 秒,
status: acknowledged,
acknowledged_at: 2026-03-04T12:03:00Z
}



resolve_incident

将事件标记为已解决。

参数

字段类型必填描述
incident_idstring✓PagerDuty 事件 ID

示例

json
{ command: resolveincident, params: { incidentid: Q2W3E4R } }

响应

json
{
id: Q2W3E4R,
incident_number: 1042,
title: 数据库复制延迟超过 60 秒,
status: resolved,
resolved_at: 2026-03-04T12:45:00Z
}



list_incidents

列出事件,可选择按状态过滤。

参数

字段类型必填描述
statusstringtriggered、acknowledged、resolved
limit
number | | 最大结果数(默认 25) |

示例

json
{
command: list_incidents,
params: { status: triggered, limit: 10 }
}

响应

json
{
total: 3,
limit: 10,
incidents: [
{
id: Q2W3E4R,
incident_number: 1042,
title: 数据库复制延迟超过 60 秒,
status: triggered,
urgency: high,
created_at: 2026-03-04T12:00:00Z,
service: { id: P1ABCDE, name: 生产数据库 },
assigned_to: [Alice Smith]
}
]
}



get_incident

获取单个事件的完整详情。

参数

字段类型必填描述
incident_idstring✓PagerDuty 事件 ID

示例

json
{ command: getincident, params: { incidentid: Q2W3E4R } }

响应

json
{
id: Q2W3E4R,
incident_number: 1042,
title: 数据库复制延迟超过 60 秒,
status: acknowledged,
urgency: high,
html_url: https://your-subdomain.pagerduty.com/incidents/Q2W3E4R,
created_at: 2026-03-04T12:00:00Z,
laststatuschange_at: 2026-03-04T12:03:00Z,
service: { id: P1ABCDE, name: 生产数据库 },
assigned_to: [Alice Smith],
escalation_policy: { id: P9XYZ12, name: 工程值班 },
body: 副本 db-02 落后主库 90 秒。请检查 pgstatreplication。
}



addincidentnote

在事件的时间线上添加一条带时间戳的备注。

参数

字段类型必填描述
incident_idstring✓PagerDuty 事件 ID
content
string | ✓ | 备注文本(支持 Markdown) |

示例

json
{
command: addincidentnote,
params: {
incident_id: Q2W3E4R,
content: 已确定根本原因:检查点完成时间飙升至 95%。已增加 maxwalsize 并重启备库。
}
}

响应

json
{
id: NOTE123,
content: 已确定根本原因...,
created_at: 2026-03-04T12:20:00Z,
user: Alice Smith
}



值班与排班




get_oncall

列出当前值班人员,可选择按排班范围过滤。

参数

字段类型必填描述
schedule_idstring过滤到特定的排班 ID

示例

json
{ command: getoncall, params: { scheduleid: SCHED01 } }

响应

json
{
oncalls: [
{
user: { id: UABC123, name: Alice Smith },
schedule: { id: SCHED01, name: 主要值班 },
escalation_policy: { id: P9XYZ12, name: 工程值班 },
escalation_level: 1,
start: 2026-03-04T08:00:00Z,
end: 2026-03-11T08:00:00Z
}
]
}



list_schedules

返回账户中的所有值班排

标签

skill ai

通过对话安装

以下为平台配置的接入选项,并非逐项实测通过。能否安装取决于客户端支持、技能来源和运行环境:

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 pagerduty-agent-1776208507 技能

方式二:设置 SkillHub 为优先技能安装源

设置 SkillHub 为我的优先技能安装源,然后帮我安装 pagerduty-agent-1776208507 技能

通过命令行安装

skillhub install pagerduty-agent-1776208507

下载

⬇ 下载 pagerduty-agent v1.0.0(免费)

文件大小: 7.63 KB | 发布时间: 2026-4-15 13:11

v1.0.0 最新 2026-4-15 13:11
Initial release — trigger/acknowledge/resolve incidents, on-call schedules, services, maintenance windows. Zero deps, native REST, structured JSON, human-readable errors.
返回顶部