alibabacloud-sls-alerting

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Alibaba Cloud SLS Alerting

阿里云SLS告警

Prerequisites

前提条件

Complete these checks before executing commands; explanation-only requests do not require CLI setup.
执行命令前请完成以下检查;仅用于说明的请求无需配置CLI。

Install Aliyun CLI

安装阿里云CLI

Run
aliyun version
to verify version >=
3.3.22
. If missing or outdated, follow the CLI installation guide.
运行
aliyun version
确认版本不低于
3.3.22
。若未安装或版本过低,请参考CLI安装指南

Update Plugins

更新插件

Check
aliyun sls version
and the requested command's help. When an update is needed, update the SLS plugin:
bash
aliyun plugin update --name sls
检查
aliyun sls version
及所需命令的帮助信息。若需要更新,请执行以下命令更新SLS插件:
bash
aliyun plugin update --name sls

Profile selection

Profile选择

Use the CLI's configured profile by default; add
--profile
only when the user specifies a profile.
默认使用CLI已配置的Profile;仅当用户指定特定Profile时,才添加
--profile
参数。

Observability (MUST follow for every aliyun api command)

可观测性要求(所有阿里云API命令必须遵守)

Before the first cloud call, read this skill's manifest and use its top-level non-empty string
version
as
{skill-version}
. Stop and report an invalid or missing file/version; never guess it.
Generate a fresh random 32-character lowercase hexadecimal
{session-id}
for this skill in the conversation; reuse it for operations, pagination, and retries. When switching skills, read the selected skill's manifest and use its own session ID and version, including when returning to this skill.
Every cloud API command and request-only dry run MUST include this flag. Local
configure
,
plugin
,
version
, and help commands are exempt:
text
--user-agent "AlibabaCloud-Agent-Skills/alibabacloud-sls-alerting/{session-id} skill-version/{skill-version}"
Set
SLS_ALERT_USER_AGENT
to the resolved value and pass it double-quoted. Do not send literal placeholders, credentials, or personal identifiers.
首次调用云服务API前,请阅读本Skill的manifest,并将其顶层非空字符串
version
的值作为
{skill-version}
。若文件/版本无效或缺失,请停止并上报,切勿猜测。
请为本次对话中的本Skill生成一个全新的32位小写十六进制随机
{session-id}
;在后续操作、分页、重试中复用该ID。切换Skill时,请读取所选Skill的manifest,使用其自身的会话ID与版本号,切回本Skill时也需遵循此规则。
所有云API命令及纯请求式dry run 必须包含此参数。本地
configure
plugin
version
及帮助命令无需添加:
text
--user-agent "AlibabaCloud-Agent-Skills/alibabacloud-sls-alerting/{session-id} skill-version/{skill-version}"
SLS_ALERT_USER_AGENT
设置为解析后的值,并以双引号包裹传递。请勿发送字面量占位符、凭证或个人身份信息。

Select the operation

选择操作类型

Rules define when to raise alerts. Notification resources determine how those alerts are handled and sent. Event diagnosis explains an alert that occurred. Read the matching management or diagnosis entry, then follow only the references needed for the requested operation.
  • Manage alert rules: find, inspect, create, update, disable, enable, delete, or temporarily mute/unmute rules.
  • Manage alert notifications: manage notification objects, alert policies, action policies, and content templates.
  • Diagnose alert events: explain trigger causes, frequency, and duration, or query alert history.
规则用于定义触发告警的条件。通知资源决定告警的处理与发送方式。事件诊断用于解释已发生的告警。请阅读匹配的管理或诊断条目,然后仅遵循请求操作所需的参考文档。
  • 管理告警规则:查找、查看、创建、更新、禁用、启用、删除规则,或临时静音/取消静音规则。
  • 管理告警通知:管理通知对象、告警策略、行动策略及内容模板。
  • 诊断告警事件:解释触发原因、频率、持续时间,或查询告警历史。

Skill usage troubleshooting

Skill使用故障排查

For problems running commands or bundled scripts, use skill usage troubleshooting. Rule behavior and alert outcomes belong to the functional branches above.
若运行命令或内置脚本时遇到问题,请参考Skill使用故障排查。规则行为与告警结果属于上述功能分支的范畴。

Shared operation boundaries

通用操作边界

  • Read before replacement updates and preserve unrelated fields.
  • Execute changes covered by the user's request and existing authorization.
  • Read back writes and compare intended fields. Configuration success does not prove evaluation or delivery success.
  • NEVER run
    aliyun configure get
    .
  • NEVER extract or print AccessKey IDs, AccessKey secrets, or STS tokens from configuration files, environment variables, or command output. Never ask users to paste credentials. Let the CLI use its configured authentication.
  • 执行替换更新前先读取原有配置,保留不相关字段。
  • 仅执行用户请求范围内且已有授权的变更。
  • 写入后回读配置,比对目标字段是否正确。配置成功不代表告警评估或投递成功。
  • 严禁运行
    aliyun configure get
    命令。
  • 严禁从配置文件、环境变量或命令输出中提取或打印AccessKey ID、AccessKey Secret或STS令牌。切勿要求用户粘贴凭证。让CLI使用其已配置的认证方式。

Reference Documents

参考文档

These references support all operation branches; consult them when needed.
  • CLI installation guide: installation, authentication modes, and profiles.
  • Region and endpoint configuration: route rule and ResourceRecord operations to the appropriate endpoint.
  • Related APIs: API parameters and responses.
  • RAM policies: caller permissions and resource scopes.
这些参考文档支持所有操作分支,可按需查阅。
  • CLI安装指南:安装、认证模式及Profile相关内容。
  • 地域与Endpoint配置:将规则及ResourceRecord操作路由至对应的Endpoint。
  • 相关API:API参数与响应说明。
  • RAM策略:调用者权限与资源范围。