PagerDuty 日志
PagerDuty 是一个 SaaS 事件管理平台,您可以通过它在一个控制台下管理告警。您可以将 PagerDuty 事件日志和周围信息转发到 Site24x7 AppLogs。这将使您能够在一个控制台下创建、监控和分析仪表板。
要将 Site24x7 AppLogs 与 PagerDuty 集成,请按照以下步骤操作。
目录
在 Site24x7 AppLogs 中创建日志类型
- 登录到您的Site24x7 帐户> 管理> AppLogs>添加日志类型。
- 输入显示名称。
- 从日志类型下拉列表中选择PagerDuty
- 输入保留期和最大上传限制。
- 默认情况下,这是 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}}}
- 日志模式:
- 复制下面给出的 API 端点 URL,如屏幕截图所示。
- 单击保存。
将 Site24x7 AppLogs 与 PagerDuty 集成
- 登录到您的PagerDuty帐户。
- 导航到您的仪表板,选择集成选项卡,然后单击Webhooks。
- 单击创建新 Webhook。
- 在 Webhook URL 字段中添加从 Site24x7 复制的API 端点 URL
- 选择Scope Type并在Events to send下选择Send all events或Send selected events。
- 单击添加 Webhook。
查看数据
- 登录到您的Site24x7 帐户> AppLogs。
- 输入PagerDuty Logs作为日志类型。
- 可以查看 PagerDuty 日志的以下指标:
- 事件触发
- 事件已解决
- 事件升级
- 事件已确认
- 未确认的事件
- 事件重新打开
- 排名靠前的告警服务
- 最重要的告警事件
- 最高升级政策
- 紧急事件
- 事件触发摘要
- 按优先级排序的事件
- 随着时间的推移告警服务
- 分配给团队的事件
- 分配给用户的事件
- 事件升级策略