alicloud-observability-openclaw-sls-integration
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseOpenClaw SLS Integration
OpenClaw SLS 集成配置
This skill provisions Alibaba Cloud SLS observability for OpenClaw on Linux and keeps reruns safe.
At a high level, execute this flow:
- Check and install CLI (install latest when missing)
aliyun - Install by project region (skip if already running)
LoongCollector - Create an identifier-based machine group (local identifier + cloud machine group)
- Create index and dashboards
logstore - Create collection config
logstore - Bind the collection config to the machine group
本指南用于在Linux环境下为OpenClaw配置阿里云SLS可观测性能力,且所有操作支持重复执行(幂等性)。
整体执行流程如下:
- 检查并安装CLI(若未安装则安装最新版本)
aliyun - 根据项目地域安装(若已运行则跳过)
LoongCollector - 创建基于自定义标识的机器组(本地标识 + 云端机器组)
- 创建索引和仪表盘
logstore - 创建采集配置
logstore - 将采集配置绑定到机器组
Capture Intent Before Execution
执行前确认需求
Before running commands, make sure the user intent is complete:
- Confirm the target and
PROJECT.LOGSTORE - Confirm Linux host access with available.
sudo - Confirm AK/SK are already exported in environment variables.
- If any required input is missing, ask for it first and do not run partial setup.
在执行命令前,请确保用户的需求信息完整:
- 确认目标和
PROJECT名称。LOGSTORE - 确认Linux主机拥有权限。
sudo - 确认环境变量中已配置AK/SK。
- 若缺少任何必要输入,请先向用户询问,不要执行部分配置步骤。
Prerequisites
前置条件
Required:
- : SLS project name
PROJECT - : SLS logstore name
LOGSTORE
Read from environment variables:
ALIBABA_CLOUD_ACCESS_KEY_IDALIBABA_CLOUD_ACCESS_KEY_SECRET- (used for the local UID file under
ALIYUN_UID)/etc/ilogtail/users
Recommended optional:
- (auto-resolved from
ALIBABA_CLOUD_REGION_IDwhen not set)PROJECT
If you use different AK/SK variable names, export them to these standard names first.
必填项:
- : SLS项目名称
PROJECT - : SLS日志库名称
LOGSTORE
从环境变量读取:
ALIBABA_CLOUD_ACCESS_KEY_IDALIBABA_CLOUD_ACCESS_KEY_SECRET- (用于
ALIYUN_UID目录下的本地UID文件)/etc/ilogtail/users
推荐可选配置:
- (未设置时将从
ALIBABA_CLOUD_REGION_ID自动解析)PROJECT
若您使用的AK/SK变量名不同,请先将其导出为上述标准变量名。
Expected Result
预期结果
After successful execution, the environment should contain:
- Running (or
LoongCollector) on the hostilogtaild - Machine group
openclaw-sls-collector - Logstore index created on the target
LOGSTORE - Dashboards and
openclaw-auditopenclaw-gateway - Collection config
openclaw-audit_${LOGSTORE} - Config binding between and
openclaw-audit_${LOGSTORE}openclaw-sls-collector
执行成功后,环境将包含以下内容:
- 主机上运行的(或
LoongCollector)ilogtaild - 机器组
openclaw-sls-collector - 目标已创建日志索引
LOGSTORE - 仪表盘和
openclaw-auditopenclaw-gateway - 采集配置
openclaw-audit_${LOGSTORE} - 与
openclaw-audit_${LOGSTORE}的配置绑定关系openclaw-sls-collector
One-Time Execution Flow (Idempotent)
一次性执行流程(幂等性)
The commands below are designed as "exists -> skip" and are safe to rerun. Strict template mode: for index/config/dashboard payloads, always read from files in. Do not handcraft or simplify JSON bodies beyond required placeholder replacement.references/
bash
set -euo pipefail以下命令设计为「已存在则跳过」,可安全重复执行。 严格模板模式:索引/配置/仪表盘的JSON内容请始终从目录下的文件读取。 除必要的占位符替换外,请勿手动编写或简化JSON内容。references/
bash
set -euo pipefail===== User inputs =====
===== 用户输入 =====
: "${PROJECT:?Please export PROJECT}"
: "${LOGSTORE:?Please export LOGSTORE}"
: "${ALIBABA_CLOUD_ACCESS_KEY_ID:?Please export ALIBABA_CLOUD_ACCESS_KEY_ID}"
: "${ALIBABA_CLOUD_ACCESS_KEY_SECRET:?Please export ALIBABA_CLOUD_ACCESS_KEY_SECRET}"
: "${ALIYUN_UID:?Please export ALIYUN_UID}"
MACHINE_GROUP="openclaw-sls-collector"
CONFIG_NAME="openclaw-audit_${LOGSTORE}"
: "${PROJECT:?Please export PROJECT}"
: "${LOGSTORE:?Please export LOGSTORE}"
: "${ALIBABA_CLOUD_ACCESS_KEY_ID:?Please export ALIBABA_CLOUD_ACCESS_KEY_ID}"
: "${ALIBABA_CLOUD_ACCESS_KEY_SECRET:?Please export ALIBABA_CLOUD_ACCESS_KEY_SECRET}"
: "${ALIYUN_UID:?Please export ALIYUN_UID}"
MACHINE_GROUP="openclaw-sls-collector"
CONFIG_NAME="openclaw-audit_${LOGSTORE}"
1) Install aliyun CLI if missing (Linux)
1) Install aliyun CLI if missing (Linux)
if ! command -v aliyun >/dev/null 2>&1; then
if command -v apt-get >/dev/null 2>&1; then
sudo apt-get update
sudo apt-get install -y aliyun-cli
elif command -v dnf >/dev/null 2>&1; then
sudo dnf install -y aliyun-cli
elif command -v yum >/dev/null 2>&1; then
sudo yum install -y aliyun-cli
elif command -v zypper >/dev/null 2>&1; then
sudo zypper -n install aliyun-cli
else
echo "aliyun CLI not found. Install aliyun-cli manually for your Linux distribution." >&2
exit 1
fi
fi
if ! command -v aliyun >/dev/null 2>&1; then
if command -v apt-get >/dev/null 2>&1; then
sudo apt-get update
sudo apt-get install -y aliyun-cli
elif command -v dnf >/dev/null 2>&1; then
sudo dnf install -y aliyun-cli
elif command -v yum >/dev/null 2>&1; then
sudo yum install -y aliyun-cli
elif command -v zypper >/dev/null 2>&1; then
sudo zypper -n install aliyun-cli
else
echo "aliyun CLI not found. Install aliyun-cli manually for your Linux distribution." >&2
exit 1
fi
fi
Export auth variables for aliyun CLI
Export auth variables for aliyun CLI
export ALIBABA_CLOUD_ACCESS_KEY_ID
export ALIBABA_CLOUD_ACCESS_KEY_SECRET
is_loong_running() {
if sudo /etc/init.d/loongcollectord status 2>/dev/null | grep -qi "running"; then
return 0
fi
if sudo /etc/init.d/ilogtaild status 2>/dev/null | grep -qi "running"; then
return 0
fi
return 1
}
export ALIBABA_CLOUD_ACCESS_KEY_ID
export ALIBABA_CLOUD_ACCESS_KEY_SECRET
is_loong_running() {
if sudo /etc/init.d/loongcollectord status 2>/dev/null | grep -qi "running"; then
return 0
fi
if sudo /etc/init.d/ilogtaild status 2>/dev/null | grep -qi "running"; then
return 0
fi
return 1
}
2) Resolve region and install LoongCollector (skip when already running)
2) Resolve region and install LoongCollector (skip when already running)
REGION_ID="${ALIBABA_CLOUD_REGION_ID:-}"
if [ -z "$REGION_ID" ]; then
REGION_ID="$(aliyun sls GetProject --project "$PROJECT" --cli-query 'region' --quiet 2>/dev/null | tr -d '"' || true)"
fi
if [ -z "$REGION_ID" ]; then
echo "Cannot resolve region from project: $PROJECT. Please set ALIBABA_CLOUD_REGION_ID." >&2
exit 1
fi
if ! is_loong_running; then
wget "https://aliyun-observability-release-${REGION_ID}.oss-${REGION_ID}.aliyuncs.com/loongcollector/linux64/latest/loongcollector.sh" -O loongcollector.sh
chmod +x loongcollector.sh
./loongcollector.sh install "${REGION_ID}"
fi
REGION_ID="${ALIBABA_CLOUD_REGION_ID:-}"
if [ -z "$REGION_ID" ]; then
REGION_ID="$(aliyun sls GetProject --project "$PROJECT" --cli-query 'region' --quiet 2>/dev/null | tr -d '"' || true)"
fi
if [ -z "$REGION_ID" ]; then
echo "Cannot resolve region from project: $PROJECT. Please set ALIBABA_CLOUD_REGION_ID." >&2
exit 1
fi
if ! is_loong_running; then
wget "https://aliyun-observability-release-${REGION_ID}.oss-${REGION_ID}.aliyuncs.com/loongcollector/linux64/latest/loongcollector.sh" -O loongcollector.sh
chmod +x loongcollector.sh
./loongcollector.sh install "${REGION_ID}"
fi
Post-install verification: one of loongcollectord/ilogtaild must be running.
Post-install verification: one of loongcollectord/ilogtaild must be running.
if ! is_loong_running; then
sudo /etc/init.d/loongcollectord start >/dev/null 2>&1 || true
sudo /etc/init.d/ilogtaild start >/dev/null 2>&1 || true
fi
if ! is_loong_running; then
echo "LoongCollector installation check failed: neither loongcollectord nor ilogtaild is running." >&2
exit 1
fi
if ! is_loong_running; then
sudo /etc/init.d/loongcollectord start >/dev/null 2>&1 || true
sudo /etc/init.d/ilogtaild start >/dev/null 2>&1 || true
fi
if ! is_loong_running; then
echo "LoongCollector installation check failed: neither loongcollectord nor ilogtaild is running." >&2
exit 1
fi
3) Local user-defined identifier + create machine group
3) Local user-defined identifier + create machine group
sudo mkdir -p /etc/ilogtail
sudo mkdir -p /etc/ilogtail/users
if [ ! -f /etc/ilogtail/user_defined_id ]; then
sudo touch /etc/ilogtail/user_defined_id
fi
RAND8="$(LC_ALL=C tr -dc 'a-z0-9' </dev/urandom | head -c 8)"
USER_DEFINED_ID_PREFIX="${PROJECT}openclaw_sls_collector"
EXISTING_USER_DEFINED_ID="$(sudo awk -v p="${USER_DEFINED_ID_PREFIX}" 'index($0,p)==1 {print; exit}' /etc/ilogtail/user_defined_id 2>/dev/null || true)"
if [ -n "${EXISTING_USER_DEFINED_ID}" ]; then
USER_DEFINED_ID="${EXISTING_USER_DEFINED_ID}"
else
USER_DEFINED_ID="${USER_DEFINED_ID_PREFIX}${RAND8}"
echo "${USER_DEFINED_ID}" | sudo tee -a /etc/ilogtail/user_defined_id >/dev/null
fi
if ! sudo grep -Fxq "${USER_DEFINED_ID}" /etc/ilogtail/user_defined_id 2>/dev/null; then
echo "Failed to persist USER_DEFINED_ID to /etc/ilogtail/user_defined_id" >&2
exit 1
fi
if [ ! -f "/etc/ilogtail/users/${ALIYUN_UID}" ]; then
sudo touch "/etc/ilogtail/users/${ALIYUN_UID}"
fi
if [ ! -f "/etc/ilogtail/users/${ALIYUN_UID}" ]; then
echo "Failed to create UID marker file: /etc/ilogtail/users/${ALIYUN_UID}" >&2
exit 1
fi
if ! aliyun sls GetMachineGroup --project "$PROJECT" --machineGroup "$MACHINE_GROUP" >/dev/null 2>&1; then
cat > /tmp/openclaw-machine-group.json <<EOF
{
"groupName": "${MACHINE_GROUP}",
"groupType": "",
"machineIdentifyType": "userdefined",
"machineList": ["${USER_DEFINED_ID}"]
}
EOF
aliyun sls CreateMachineGroup
--project "$PROJECT"
--body "$(cat /tmp/openclaw-machine-group.json)" fi if ! aliyun sls GetMachineGroup --project "$PROJECT" --machineGroup "$MACHINE_GROUP" >/dev/null 2>&1; then echo "Machine group was not created successfully: ${MACHINE_GROUP}" >&2 exit 1 fi
--project "$PROJECT"
--body "$(cat /tmp/openclaw-machine-group.json)" fi if ! aliyun sls GetMachineGroup --project "$PROJECT" --machineGroup "$MACHINE_GROUP" >/dev/null 2>&1; then echo "Machine group was not created successfully: ${MACHINE_GROUP}" >&2 exit 1 fi
sudo mkdir -p /etc/ilogtail
sudo mkdir -p /etc/ilogtail/users
if [ ! -f /etc/ilogtail/user_defined_id ]; then
sudo touch /etc/ilogtail/user_defined_id
fi
RAND8="$(LC_ALL=C tr -dc 'a-z0-9' </dev/urandom | head -c 8)"
USER_DEFINED_ID_PREFIX="${PROJECT}openclaw_sls_collector"
EXISTING_USER_DEFINED_ID="$(sudo awk -v p="${USER_DEFINED_ID_PREFIX}" 'index($0,p)==1 {print; exit}' /etc/ilogtail/user_defined_id 2>/dev/null || true)"
if [ -n "${EXISTING_USER_DEFINED_ID}" ]; then
USER_DEFINED_ID="${EXISTING_USER_DEFINED_ID}"
else
USER_DEFINED_ID="${USER_DEFINED_ID_PREFIX}${RAND8}"
echo "${USER_DEFINED_ID}" | sudo tee -a /etc/ilogtail/user_defined_id >/dev/null
fi
if ! sudo grep -Fxq "${USER_DEFINED_ID}" /etc/ilogtail/user_defined_id 2>/dev/null; then
echo "Failed to persist USER_DEFINED_ID to /etc/ilogtail/user_defined_id" >&2
exit 1
fi
if [ ! -f "/etc/ilogtail/users/${ALIYUN_UID}" ]; then
sudo touch "/etc/ilogtail/users/${ALIYUN_UID}"
fi
if [ ! -f "/etc/ilogtail/users/${ALIYUN_UID}" ]; then
echo "Failed to create UID marker file: /etc/ilogtail/users/${ALIYUN_UID}" >&2
exit 1
fi
if ! aliyun sls GetMachineGroup --project "$PROJECT" --machineGroup "$MACHINE_GROUP" >/dev/null 2>&1; then
cat > /tmp/openclaw-machine-group.json <<EOF
{
"groupName": "${MACHINE_GROUP}",
"groupType": "",
"machineIdentifyType": "userdefined",
"machineList": ["${USER_DEFINED_ID}"]
}
EOF
aliyun sls CreateMachineGroup
--project "$PROJECT"
--body "$(cat /tmp/openclaw-machine-group.json)" fi if ! aliyun sls GetMachineGroup --project "$PROJECT" --machineGroup "$MACHINE_GROUP" >/dev/null 2>&1; then echo "Machine group was not created successfully: ${MACHINE_GROUP}" >&2 exit 1 fi
--project "$PROJECT"
--body "$(cat /tmp/openclaw-machine-group.json)" fi if ! aliyun sls GetMachineGroup --project "$PROJECT" --machineGroup "$MACHINE_GROUP" >/dev/null 2>&1; then echo "Machine group was not created successfully: ${MACHINE_GROUP}" >&2 exit 1 fi
4) Create logstore (if missing) + index + multiple dashboards
4) Create logstore (if missing) + index + multiple dashboards
if ! aliyun sls GetLogStore --project "$PROJECT" --logstore "$LOGSTORE" >/dev/null 2>&1; then
aliyun sls CreateLogStore --project "$PROJECT"
--body "{"logstoreName":"${LOGSTORE}","ttl":30,"shardCount":2}" fi
--body "{"logstoreName":"${LOGSTORE}","ttl":30,"shardCount":2}" fi
if ! aliyun sls GetIndex --project "$PROJECT" --logstore "$LOGSTORE" >/dev/null 2>&1; then
Use the index template as-is from references/index.json
aliyun sls CreateIndex
--project "$PROJECT"
--logstore "$LOGSTORE"
--body "$(cat references/index.json)" fi
--project "$PROJECT"
--logstore "$LOGSTORE"
--body "$(cat references/index.json)" fi
sed "s/${logstoreName}/${LOGSTORE}/g" references/dashboard-audit.json > /tmp/openclaw-audit-dashboard.json
sed "s/${logstoreName}/${LOGSTORE}/g" references/dashboard-gateway.json > /tmp/openclaw-gateway-dashboard.json
if ! aliyun sls GetLogStore --project "$PROJECT" --logstore "$LOGSTORE" >/dev/null 2>&1; then
aliyun sls CreateLogStore --project "$PROJECT"
--body "{"logstoreName":"${LOGSTORE}","ttl":30,"shardCount":2}" fi
--body "{"logstoreName":"${LOGSTORE}","ttl":30,"shardCount":2}" fi
if ! aliyun sls GetIndex --project "$PROJECT" --logstore "$LOGSTORE" >/dev/null 2>&1; then
Use the index template as-is from references/index.json
aliyun sls CreateIndex
--project "$PROJECT"
--logstore "$LOGSTORE"
--body "$(cat references/index.json)" fi
--project "$PROJECT"
--logstore "$LOGSTORE"
--body "$(cat references/index.json)" fi
sed "s/${logstoreName}/${LOGSTORE}/g" references/dashboard-audit.json > /tmp/openclaw-audit-dashboard.json
sed "s/${logstoreName}/${LOGSTORE}/g" references/dashboard-gateway.json > /tmp/openclaw-gateway-dashboard.json
Create dashboard uses project + body(detail). Update uses path + project + body.
Create dashboard uses project + body(detail). Update uses path + project + body.
if aliyun sls GET "/dashboards/openclaw-audit" --project "$PROJECT" >/dev/null 2>&1; then
aliyun sls PUT "/dashboards/openclaw-audit"
--project "$PROJECT"
--body "$(cat /tmp/openclaw-audit-dashboard.json)" else aliyun sls POST "/dashboards"
--project "$PROJECT"
--body "$(cat /tmp/openclaw-audit-dashboard.json)" fi
--project "$PROJECT"
--body "$(cat /tmp/openclaw-audit-dashboard.json)" else aliyun sls POST "/dashboards"
--project "$PROJECT"
--body "$(cat /tmp/openclaw-audit-dashboard.json)" fi
if aliyun sls GET "/dashboards/openclaw-gateway" --project "$PROJECT" >/dev/null 2>&1; then
aliyun sls PUT "/dashboards/openclaw-gateway"
--project "$PROJECT"
--body "$(cat /tmp/openclaw-gateway-dashboard.json)" else aliyun sls POST "/dashboards"
--project "$PROJECT"
--body "$(cat /tmp/openclaw-gateway-dashboard.json)" fi
--project "$PROJECT"
--body "$(cat /tmp/openclaw-gateway-dashboard.json)" else aliyun sls POST "/dashboards"
--project "$PROJECT"
--body "$(cat /tmp/openclaw-gateway-dashboard.json)" fi
if aliyun sls GET "/dashboards/openclaw-audit" --project "$PROJECT" >/dev/null 2>&1; then
aliyun sls PUT "/dashboards/openclaw-audit"
--project "$PROJECT"
--body "$(cat /tmp/openclaw-audit-dashboard.json)" else aliyun sls POST "/dashboards"
--project "$PROJECT"
--body "$(cat /tmp/openclaw-audit-dashboard.json)" fi
--project "$PROJECT"
--body "$(cat /tmp/openclaw-audit-dashboard.json)" else aliyun sls POST "/dashboards"
--project "$PROJECT"
--body "$(cat /tmp/openclaw-audit-dashboard.json)" fi
if aliyun sls GET "/dashboards/openclaw-gateway" --project "$PROJECT" >/dev/null 2>&1; then
aliyun sls PUT "/dashboards/openclaw-gateway"
--project "$PROJECT"
--body "$(cat /tmp/openclaw-gateway-dashboard.json)" else aliyun sls POST "/dashboards"
--project "$PROJECT"
--body "$(cat /tmp/openclaw-gateway-dashboard.json)" fi
--project "$PROJECT"
--body "$(cat /tmp/openclaw-gateway-dashboard.json)" else aliyun sls POST "/dashboards"
--project "$PROJECT"
--body "$(cat /tmp/openclaw-gateway-dashboard.json)" fi
5) Create collection config (update when already exists)
5) Create collection config (update when already exists)
Render collector config strictly from references/collector-config.json
Render collector config strictly from references/collector-config.json
sed
-e "s/${configName}/${CONFIG_NAME}/g"
-e "s/${logstoreName}/${LOGSTORE}/g"
-e "s/${region_id}/${REGION_ID}/g"
references/collector-config.json > /tmp/openclaw-collector-config.json
-e "s/${configName}/${CONFIG_NAME}/g"
-e "s/${logstoreName}/${LOGSTORE}/g"
-e "s/${region_id}/${REGION_ID}/g"
references/collector-config.json > /tmp/openclaw-collector-config.json
if aliyun sls GetConfig --project "$PROJECT" --configName "$CONFIG_NAME" >/dev/null 2>&1; then
aliyun sls UpdateConfig
--project "$PROJECT"
--configName "$CONFIG_NAME"
--body "$(cat /tmp/openclaw-collector-config.json)" else aliyun sls CreateConfig
--project "$PROJECT"
--body "$(cat /tmp/openclaw-collector-config.json)" fi
--project "$PROJECT"
--configName "$CONFIG_NAME"
--body "$(cat /tmp/openclaw-collector-config.json)" else aliyun sls CreateConfig
--project "$PROJECT"
--body "$(cat /tmp/openclaw-collector-config.json)" fi
sed
-e "s/${configName}/${CONFIG_NAME}/g"
-e "s/${logstoreName}/${LOGSTORE}/g"
-e "s/${region_id}/${REGION_ID}/g"
references/collector-config.json > /tmp/openclaw-collector-config.json
-e "s/${configName}/${CONFIG_NAME}/g"
-e "s/${logstoreName}/${LOGSTORE}/g"
-e "s/${region_id}/${REGION_ID}/g"
references/collector-config.json > /tmp/openclaw-collector-config.json
if aliyun sls GetConfig --project "$PROJECT" --configName "$CONFIG_NAME" >/dev/null 2>&1; then
aliyun sls UpdateConfig
--project "$PROJECT"
--configName "$CONFIG_NAME"
--body "$(cat /tmp/openclaw-collector-config.json)" else aliyun sls CreateConfig
--project "$PROJECT"
--body "$(cat /tmp/openclaw-collector-config.json)" fi
--project "$PROJECT"
--configName "$CONFIG_NAME"
--body "$(cat /tmp/openclaw-collector-config.json)" else aliyun sls CreateConfig
--project "$PROJECT"
--body "$(cat /tmp/openclaw-collector-config.json)" fi
6) Bind collection config to machine group
6) Bind collection config to machine group
aliyun sls ApplyConfigToMachineGroup
--project "$PROJECT"
--machineGroup "$MACHINE_GROUP"
--configName "$CONFIG_NAME"
--project "$PROJECT"
--machineGroup "$MACHINE_GROUP"
--configName "$CONFIG_NAME"
echo "OpenClaw SLS observability setup completed."
---aliyun sls ApplyConfigToMachineGroup
--project "$PROJECT"
--machineGroup "$MACHINE_GROUP"
--configName "$CONFIG_NAME"
--project "$PROJECT"
--machineGroup "$MACHINE_GROUP"
--configName "$CONFIG_NAME"
echo "OpenClaw SLS observability setup completed."
---Response Format
结果返回格式
When this skill completes, return a concise status report with:
- Inputs used: ,
PROJECT, resolvedLOGSTOREREGION_ID - Created/updated resources (machine group, index, dashboards, config, binding)
- Any skipped steps (already existed / already running)
- Next verification commands for the user
本指南执行完成后,请返回简洁的状态报告,包含以下内容:
- 使用的输入参数:、
PROJECT、解析后的LOGSTOREREGION_ID - 创建/更新的资源(机器组、索引、仪表盘、配置、绑定关系)
- 跳过的步骤(资源已存在/服务已运行)
- 提供给用户的后续验证命令
Verification Commands
验证命令
bash
aliyun sls GetMachineGroup --project "$PROJECT" --machineGroup openclaw-sls-collector
aliyun sls GetIndex --project "$PROJECT" --logstore "$LOGSTORE"
aliyun sls GetDashboard --project "$PROJECT" --dashboardName openclaw-audit
aliyun sls GetDashboard --project "$PROJECT" --dashboardName openclaw-gateway
aliyun sls GetConfig --project "$PROJECT" --configName "openclaw-audit_${LOGSTORE}"bash
aliyun sls GetMachineGroup --project "$PROJECT" --machineGroup openclaw-sls-collector
aliyun sls GetIndex --project "$PROJECT" --logstore "$LOGSTORE"
aliyun sls GetDashboard --project "$PROJECT" --dashboardName openclaw-audit
aliyun sls GetDashboard --project "$PROJECT" --dashboardName openclaw-gateway
aliyun sls GetConfig --project "$PROJECT" --configName "openclaw-audit_${LOGSTORE}"Reference Files
参考文件
- Command flow:
references/cli-commands.md - Index definition:
references/index.json - Dashboard templates: ,
references/dashboard-audit.jsonreferences/dashboard-gateway.json - Collection config template:
references/collector-config.json
Read reference files only when needed:
- Use for step-by-step troubleshooting.
cli-commands.md - Use JSON templates when creating/updating resources.
- 命令流程:
references/cli-commands.md - 索引定义:
references/index.json - 仪表盘模板:、
references/dashboard-audit.jsonreferences/dashboard-gateway.json - 采集配置模板:
references/collector-config.json
仅在需要时读取参考文件:
- 分步排障请使用。
cli-commands.md - 创建/更新资源时请使用JSON模板。