认证
此提供商需要身份验证。
- api_token: 您的 PagerTree API 令牌(必需:True,敏感:True)
某些范围可能需要才能通过提供商执行特定操作或查询。以下是相关范围及其用例的摘要:
- authenticated: 用户可以连接到服务器并使用其 API 密钥进行身份验证(强制)
在工作流中
此提供商可用于工作流。
作为"操作"来进行更改或更新数据,示例:
yaml
actions:
- name: Query pagertree
provider: pagertree
config: "{{ provider.my_provider_name }}"
with:
title: {value} # 警报的标题。
urgency: {value} # low|medium|high|critical
incident: {value} # 如果警报是事件,则为 True
severities: {value} # SEV-1|SEV-2|SEV-3|SEV-4|SEV-5|SEV_UNKNOWN
incident_message: {value} # 要在事件中显示的消息
description: {value} # 警报的自定义消息的 UTF-8 字符串。显示在事件描述中
status: {value} # 要发送的警报状态
destination_team_ids: {value} # 发送警报的目标团队 ID
destination_router_ids: {value} # 发送警报的目标路由器 ID
destination_account_user_ids: {value} # 发送警报的目标账户用户 ID
# 要传递的其他参数如果您需要此提供商的工作流示例,请提交 GitHub 问题。
连接 Provider
- 要与 Pagertree API 交互,您需要提供 api_token。
- 您可以在您的 User Settings 页面查看和管理您的 API 密钥。
注意事项
此 provider 使用 Pagertree API 发送告警或根据提供的参数将其标记为事件。如果事件标记为 true,它会调用 __send_alert 或 __send_incident 方法。
相关链接
- Pagertree API documentation: Pagertree API
- Pagertree Authentication: Authentication
- Pagertree Alerts: Alerts & Incident