Community编程与开发github.com

ComposioHQ/New-Relic-Automation

通过 Composio MCP 集成,自动化管理 New Relic 可观测性工作流,包括告警策略、通知渠道、告警条件及应用程序监控。

New-Relic-Automation 是什么?

该技能基于 Composio MCP 集成,允许开发者通过自然语言或 API 调用自动化 New Relic 的可观测性工作流。核心功能包括:创建和管理告警策略(Alert Policy)、配置多种通知渠道(邮件、Slack、Webhook、PagerDuty 等)、查看和创建告警条件、监控 APM 及浏览器应用。它通过一组预定义的 MCP 工具(如 NEW_RELIC_CREATE_ALERT_POLICY、NEW_RELIC_CREATE_ALERT_CHANNEL)暴露操作接口,支持分页查询和条件过滤。该技能适用于希望将 New Relic 告警集成到 CI/CD 流水线或自动化运维场景中的团队,支持本地 MCP 客户端和 Composio 云端平台。使用前需先添加 Composio MCP 服务器并完成 New Relic API Key 认证。文档中详细说明了各工具的输入参数、配置差异和已知陷阱(如策略命名唯一性、渠道配置字段因类型而异、分页要求等),帮助用户避免常见错误。

兼容平台~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/ComposioHQ/awesome-codex-skills/tree/main/composio-skills/new-relic-automation

Installed? Explore more 编程与开发 skills: steipete/bluebubbles, steipete/eightctl, steipete/blucli · View all 6 →

在你喜欢的 AI 中提问

打开一个已预加载此 Agent Skill 的新对话。

文档

New Relic 自动化

自动化您的 New Relic 可观测性工作流——创建和管理告警策略、配置通知渠道(邮件、Slack、Webhook、PagerDuty)、监控 APM 应用程序、检查告警条件,并将 New Relic 告警集成到跨应用流水线中。

工具包文档: composio.dev/toolkits/new_relic


设置

  1. 将 Composio MCP 服务器添加到您的客户端:https://rube.app/mcp
  2. 根据提示连接您的 New Relic 账户(API 密钥认证)
  3. 开始使用以下工作流

核心工作流

1. 列出告警策略

使用 NEW_RELIC_GET_ALERT_POLICIES 查找现有告警策略,支持可选过滤。

工具:NEW_RELIC_GET_ALERT_POLICIES
输入:
  - name:字符串(可选,支持部分匹配)
  - incident_preference:"PER_POLICY" | "PER_CONDITION" | "PER_CONDITION_AND_TARGET"
  - page:整数(从 1 开始的分页)

2. 创建告警策略

使用 NEW_RELIC_CREATE_ALERT_POLICY 为告警条件设置一个新的策略容器。

工具:NEW_RELIC_CREATE_ALERT_POLICY
输入:
  - name:字符串(必填)——在同一账户内必须唯一
  - incident_preference:"PER_POLICY" | "PER_CONDITION" | "PER_CONDITION_AND_TARGET"(默认:PER_POLICY)

事件偏好说明:

  • PER_POLICY——每个策略生成一个问题(推荐用于大多数场景)
  • PER_CONDITION——每个告警条件生成一个问题
  • PER_CONDITION_AND_TARGET——每个条件和信号/目标各生成一个问题

3. 创建告警通知渠道

使用 NEW_RELIC_CREATE_ALERT_CHANNEL 注册用于告警传递的通知端点。

工具:NEW_RELIC_CREATE_ALERT_CHANNEL
输入:
  - type:"email" | "slack" | "webhook" | "pagerduty" | "opsgenie" | "victorops"(必填)
  - name:字符串(必填)——人类可读的渠道名称
  - configuration:对象(必填)——根据类型有所不同:
    邮件:     { recipients: "[email protected],[email protected]" }
    Slack:    { url: "<slack_webhook_url>", channel: "alerts" }
    Webhook:  { url: "https://hooks.example.com/alerts", auth_username, auth_password }
    PagerDuty:{ service_key: "<integration_key>" }
    OpsGenie: { api_key, recipients, tags, teams }
    VictorOps:{ key: "<api_key>", route_key: "<routing_key>" }

4. 获取策略的告警条件

使用 NEW_RELIC_GET_ALERT_CONDITIONS 检查附加到特定策略的告警条件。

工具:NEW_RELIC_GET_ALERT_CONDITIONS
输入:
  - policy_id:整数(必填)

5. 监控应用程序

使用 NEW_RELIC_GET_APPLICATIONS 和 NEW_RELIC_GET_BROWSER_APPLICATIONS 列出 APM 和浏览器监控的应用。

工具:NEW_RELIC_GET_APPLICATIONS
输入:
  - name:字符串(可选,不区分大小写的部分匹配)
  - host:字符串(可选,不区分大小写的部分匹配)
  - ids:字符串(可选,逗号分隔的应用 ID 列表)
  - page:整数(从 1 开始)

工具:NEW_RELIC_GET_BROWSER_APPLICATIONS
输入:
  - filter[name]:字符串(可选,不区分大小写的部分匹配)
  - page:整数(从 1 开始)

6. 管理渠道和策略

使用 NEW_RELIC_UPDATE_ALERT_CHANNEL 修改现有渠道,使用 NEW_RELIC_DELETE_ALERT_POLICY 删除策略。

工具:NEW_RELIC_UPDATE_ALERT_CHANNEL
输入:
  - alert_channel_id:整数(必填)
  - name:字符串(可选)
  - type:字符串(可选,仅用于更改类型)
  - configuration:对象(可选,字段取决于类型)

工具:NEW_RELIC_DELETE_ALERT_POLICY
输入:
  - policy_id:字符串(必填)——要删除的策略 ID

已知陷阱

陷阱详情
策略名称唯一性NEW_RELIC_CREATE_ALERT_POLICY 要求名称在账户内唯一。
渠道配置因类型而异NEW_RELIC_CREATE_ALERT_CHANNEL 的 configuration 对象根据渠道类型有不同的必填字段(例如,邮件的 recipients,PagerDuty 的 service_key)。
必须使用分页所有列表端点返回分页结果。请迭代页面直到结果耗尽。
策略 ID 类型不匹配NEW_RELIC_GET_ALERT_CONDITIONS 期望 policy_id 为整数,而 NEW_RELIC_DELETE_ALERT_POLICY 期望为字符串。
渠道-策略关联创建渠道后,您需要单独将其关联到某个策略,告警才能流向该渠道。

快速参考

工具标识描述
NEW_RELIC_GET_ALERT_POLICIES列出告警策略,支持可选过滤
NEW_RELIC_CREATE_ALERT_POLICY创建新的告警策略
NEW_RELIC_DELETE_ALERT_POLICY按 ID 删除告警策略
NEW_RELIC_CREATE_ALERT_CHANNEL创建通知渠道(邮件、Slack、Webhook 等)
NEW_RELIC_GET_ALERT_CHANNELS列出所有已配置的告警渠道
NEW_RELIC_UPDATE_ALERT_CHANNEL更新现有告警渠道
NEW_RELIC_GET_ALERT_CONDITIONS获取策略的告警条件
NEW_RELIC_GET_APPLICATIONS列出 APM 应用程序
NEW_RELIC_GET_BROWSER_APPLICATIONS列出浏览器监控的应用程序

由 Composio 提供支持

Individual skills in this repo

This repo contains 20 individual skills — each has its own dedicated page.

ComposioHQ/-21risk-automation

Automate 21risk tasks via Rube MCP (Composio). Always search tools first for current schemas.

ComposioHQ/-2chat-automation

Automate 2chat tasks via Rube MCP (Composio). Always search tools first for current schemas.

ComposioHQ/ably-automation

Automate Ably tasks via Rube MCP (Composio). Always search tools first for current schemas.

ComposioHQ/abstract-automation

Automate Abstract tasks via Rube MCP (Composio). Always search tools first for current schemas.

ComposioHQ/abuselpdb-automation

Automate Abuselpdb tasks via Rube MCP (Composio). Always search tools first for current schemas.

ComposioHQ/abyssale-automation

Automate Abyssale tasks via Rube MCP (Composio). Always search tools first for current schemas.

ComposioHQ/accelo-automation

Automate Accelo tasks via Rube MCP (Composio). Always search tools first for current schemas.

ComposioHQ/accredible-certificates-automation

Automate Accredible Certificates tasks via Rube MCP (Composio). Always search tools first for current schemas.

ComposioHQ/acculynx-automation

Automate Acculynx tasks via Rube MCP (Composio). Always search tools first for current schemas.

ComposioHQ/active-campaign-automation

Automate ActiveCampaign tasks via Rube MCP (Composio). Always search tools first for current schemas.

ComposioHQ/addresszen-automation

Automate Addresszen tasks via Rube MCP (Composio). Always search tools first for current schemas.

ComposioHQ/adobe-automation

Automate Adobe tasks via Rube MCP (Composio). Always search tools first for current schemas.

ComposioHQ/adrapid-automation

Automate Adrapid tasks via Rube MCP (Composio). Always search tools first for current schemas.

ComposioHQ/adyntel-automation

Automate Adyntel tasks via Rube MCP (Composio). Always search tools first for current schemas.

ComposioHQ/aeroleads-automation

Automate Aeroleads tasks via Rube MCP (Composio). Always search tools first for current schemas.

ComposioHQ/aero-workflow-automation

Automate Aero Workflow tasks via Rube MCP (Composio). Always search tools first for current schemas.

ComposioHQ/affinda-automation

Automate Affinda tasks via Rube MCP (Composio). Always search tools first for current schemas.

ComposioHQ/affinity-automation

Automate Affinity tasks via Rube MCP (Composio). Always search tools first for current schemas.

ComposioHQ/agencyzoom-automation

Automate Agencyzoom tasks via Rube MCP (Composio). Always search tools first for current schemas.

ComposioHQ/agent-deep-links

Build, validate, and troubleshoot deep links for Codex, Cursor, VS Code, Visual Studio, and similar tools. Use when users ask for clickable links (especially in Slack) that open threads, files, folders, or app settings.

相关技能