认证
此提供商需要身份验证。
- api_key: New Relic 用户密钥。要接收 webhook,请使用管理员账户的"用户密钥"(必需:True,敏感:True)
- account_id: New Relic 账户 ID(必需:True,敏感:False)
- new_relic_api_url: New Relic API URL(必需:False,敏感:False)
某些范围可能需要才能通过提供商执行特定操作或查询。以下是相关范围及其用例的摘要:
- ai.issues:read: 需要读取问题和相关信息(强制)(文档)
- ai.destinations:read: 需要读取 Keep webhook 是否已注册(文档)
- ai.destinations:write: 需要注册 Keep webhook(文档)
- ai.channels:read: 需要了解通知频道的信息。(文档)
- ai.channels:write: 需要创建通知频道(文档)
在工作流中
此提供商可用于工作流。
作为"步骤"来查询数据,示例:
yaml
steps:
- name: Query newrelic
provider: newrelic
config: "{{ provider.my_provider_name }}"
with:
nrql: {value}
query: {value} # 要执行的查询请查看以下工作流示例:
连接 Provider
- 前往 https://one.newrelic.com/admin-portal/api-keys/home 创建 User Key。
- 从创建的密钥中获取
api_key和account_id。 - 根据区域从此处获取
api_url:https://docs.newrelic.com/docs/apis/rest-api-v2/get-started/introduction-new-relic-rest-api-v2 。
Webhook 集成修改
webhook 集成将 Keep 添加为 New Relic 内"Alerts and AI" API 中的目标。 这授予 Keep 对 New Relic 内以下范围的访问权限:
ai.destinations:readai.destinations:writeai.channels:readai.channels:write