帮助手册

PagerDuty 日志

PagerDuty 是一款 SaaS 事件管理平台,可帮助您在同一控制台中管理所有告警。您可以将 PagerDuty 的事件日志及相关信息转发至 Site24x7 AppLogs,从而在一个控制台中创建、监控和分析您的仪表板。

请按照以下步骤将 Site24x7 AppLogs 与 PagerDuty 集成。

在 Site24x7 AppLogs 中创建日志类型

  1. 登录您的 Site24x7 账户 > 管理 > AppLogs > 添加日志类型
  2. 输入显示名称
  3. 日志类型下拉列表中选择 PagerDuty

  4. 输入保留期限最大上传限制
  5. 以下是 Site24x7 AppLogs 为 PagerDuty 日志默认识别的日志模式:
    • 日志模式:
      json $event.occurred_at as EventTime:date:yyyy-MM-dd'T'HH:mm:ss.SSS'Z'$ $event.agent.summary as Agent$ $event.event_type as EventType$ $event.resource_type as ResourceType$ $event.client.name as ClientName$ $event.id as EventId$ $event.data.resolve_reason as ResolveReason$ $event.data.title as Title$ $event.data.escalation_policy.summary as EscalationPolicy$ $event.data.priority.summary as Priority$ $event.data.number as IncidentNumber:number$ $event.data.urgency as Urgency$ $event.data.service.summary as service$ $event.data.id as IncidentId$ $event.data.status as Status$ $event.data.assignees[0].summary as User$ $event.data.teams[0].summary as Team$
    • 示例日志:
      {"event":{"id":"5ac64822-4adc-4fda-ade0-410becf0de4f","event_type":"incident.priority_updated","resource_type":"incident","occurred_at":"2020-10-02T18:45:22.169Z","agent":{"html_url":"https://acme.pagerduty.com/users/PLH1HKV","id":"PLH1HKV","self":"https://api.pagerduty.com/users/PLH1HKV","summary":"Tenex Engineer","type":"user_reference"},"client":{"name":"PagerDuty"},"data":{"id":"PGR0VU2","type":"incident","self":"https://api.pagerduty.com/incidents/PGR0VU2","html_url":"https://acme.pagerduty.com/incidents/PGR0VU2","number":2,"status":"triggered","title":"A little bump in the road","service":{"html_url":"https://acme.pagerduty.com/services/PF9KMXH","id":"PF9KMXH","self":"https://api.pagerduty.com/services/PF9KMXH","summary":"API Service","type":"service_reference"},"assignees":[{"html_url":"https://acme.pagerduty.com/users/PTUXL6G","id":"PTUXL6G","self":"https://api.pagerduty.com/users/PTUXL6G","summary":"User 123","type":"user_reference"}],"escalation_policy":{"html_url":"https://acme.pagerduty.com/escalation_policies/PUS0KTE","id":"PUS0KTE","self":"https://api.pagerduty.com/escalation_policies/PUS0KTE","summary":"Default","type":"escalation_policy_reference"},"teams":[{"html_url":"https://acme.pagerduty.com/teams/PFCVPS0","id":"PFCVPS0","self":"https://api.pagerduty.com/teams/PFCVPS0","summary":"Engineering","type":"team_reference"}],"priority":{"html_url":"https://acme.pagerduty.com/account/incident_priorities","id":"PSO75BM","self":"https://api.pagerduty.com/priorities/PSO75BM","summary":"P1","type":"priority_reference"},"urgency":"high","conference_bridge":{"conference_number":"+1 1234123412,,987654321#","conference_url":"https://example.com"},"resolve_reason":null}}}
  6. 如截图所示,复制下方给出的 API 端点 URL。
  7. 点击保存

将 Site24x7 AppLogs 与 PagerDuty 集成

  1. 登录您的 PagerDuty 账户。
  2. 导航至您的仪表板,选择集成选项卡,然后点击 Webhooks

  3. 点击创建新 Webhook
  4. 在 Webhook URL 字段中粘贴从 Site24x7 复制的 API 端点 URL
  5. 选择范围类型,在要发送的事件下选择发送所有事件发送所选事件
  6. 点击添加 Webhook

查看数据

  1. 登录您的 Site24x7 账户 > AppLogs
  2. 将日志类型输入为 PagerDuty Logs
  3. PagerDuty 日志可查看以下指标:
    • 已触发事件
    • 已解决事件
    • 已升级事件
    • 已确认事件
    • 未确认事件
    • 已重新开启事件
    • 告警最多的服务
    • 告警最多的事件
    • 最多使用的升级策略
    • 按紧急程度划分的事件
    • 已触发事件汇总
    • 按优先级划分的事件
    • 随时间变化的告警服务
    • 分配给团队的事件
    • 分配给用户的事件
    • 按升级策略划分的事件

相关日志类型

本文档对您有帮助吗?

您愿意帮助我们改进文档吗?请告诉我们哪些方面可以做得更好。


很抱歉本文档未能让您满意。我们希望了解可以从哪些方面改进您的体验。


感谢您抽出时间分享反馈。我们将利用您的反馈来改进在线帮助资源。

短链接已复制!