360 Secure SkillHub
360 安全技能中心

alibabacloud-sls-alerting

通过 Aliyun CLI 的 SLS 插件管理阿里云日志服务告警规则与通知资源,涵盖规则创建、更新、启停、静音,通知对象、策略与内容模板管理,以及告警事件诊断与历史查询;附带 Python 校验与静音脚本,要求 CLI 版本不低于 3.3.22 与相应 RAM 权限,不接触用户凭据。

sdk-team
sdk-team
热度 21.77
最近更新 2026-09-22 02:55:07
分类:自动化依赖:代码执行 / 第三方 API / 读写文件应用场景:DevOps / 自动化脚本 / API 集成 / 工作流 ...

安装技能

复制下面的话术发给你的 Agent,它会通过 secure-skills 检索并安装该技能。

执行命令安装此 skill: npx secure-skills-cli add alibabacloud-sls-alerting
Metadata
name
alibabacloud-sls-alerting
description
Manage Alibaba Cloud SLS alerts and notifications. Use when configuring SLS alert rules, managing notification resources, or investigating alert events.

Alibaba Cloud SLS Alerting

Prerequisites

Complete these checks before executing commands; explanation-only requests do not require CLI setup.

Install Aliyun CLI

Run aliyun version to verify version >= 3.3.22. If missing or outdated, follow the CLI installation guide.

Update Plugins

Check aliyun sls version and the requested command's help. When an update is needed, update the SLS plugin:

aliyun plugin update --name sls

Profile selection

Use the CLI's configured profile by default; add --profile only when the user specifies a profile.

Observability (MUST follow for every aliyun api command)

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:

--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.

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.

Skill usage troubleshooting

For problems running commands or bundled scripts, use skill usage troubleshooting. Rule behavior and alert outcomes belong to the functional branches above.

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.

Reference Documents

These references support all operation branches; consult them when needed.