Rudder 9.1.5 常用 CLI 命令详解

Rudder 9.1.5 命令行工具详解:rudder agent/server/relay/directive/remote/package 六大命令域子命令逐条实测,含参数全集、真实回显、退出码约定与破坏性命令清单。

RudderRudder自动化部署服务器管理2026/10/22

Rudder 9.1.5 常用 CLI 命令详解

目标:完整梳理 Rudder 9.1.5 自带命令行工具(rudder 主命令六大命令域 + rudder package 插件管理器),逐条给出用途、语法与真实回显。文中全部命令于 2026-10-22 在两台 Ubuntu 24.04.5 LTS 真实服务器(Rudder 9.1.5)上执行取证:agent 域命令在被管节点实测,server/relay/package 域命令在根服务器实测,回显逐字照抄;变更类/破坏类命令明确标注「未实测」及原因。

一、环境信息

实测环境(2026-10-22,时区 Asia/Shanghai):

角色主机名IP 地址操作系统软件版本
根服务器rudder-server10.89.61.2Ubuntu 24.04.5 LTSrudder-server9.1.5-ubuntu24.04
被管节点rudder-agent10.89.61.3Ubuntu 24.04.5 LTSrudder-agent9.1.5-ubuntu24.04

版本核对(节点上执行):

rudder agent version

实测回显:

Rudder agent 9.1.5

二、工具概览

2.1 顶层命令树

rudder 不支持 --help 风格参数,顶层帮助命令是 rudder help:

rudder help

实测回显:

Usage: rudder help
       rudder agent <command> [parameters ...]
       rudder directive <command> [parameters ...]
       rudder relay <command> [parameters ...]
       rudder remote <command> [parameters ...]
       rudder server <command> [parameters ...]

  This is rudder generic command line interface.

  help: this help
  agent: rudder agent related commands
  directive: rudder directive related commands
  relay: rudder relay related commands
  remote: rudder remote related commands
  server: rudder server related commands

五大命令域与本文实测位置:

命令域子命令数(9.1.5 实测)执行位置用途
rudder agent22被管节点(服务端亦可自管)策略拉取、收敛运行、清单、状态与排障
rudder server12根服务器用户管理、策略生成、技术库与动态组重载
rudder relay4根服务器/中转节点relayd 服务启停与重载
rudder directive2节点单指令级运行(调试用)
rudder remote1节点触发远端节点运行
rudder package9服务端/节点插件管理器(独立 Rust 工具,支持 --help)

2.2 agent 域完整子命令清单

rudder agent help

实测回显:

Usage: rudder agent help
       rudder agent <command> [parameters ...]
       rudder agent <command> --help

  Run commands on agent.

  Available commands:
    check       check if rudder agent has no problem and is running properly
    diff        show diff between current file and the one before agent modification
    disable     forbid rudder-agent to be run by cron or service
    enable      re-enable a disabled rudder-agent
    factory-reset       re-initialise the agent to make it be seen as a new node on the server
    health      monitor agent health
    history     read log of old agent runs
    info        display a summary of agent information
    inventory   force the agent to create and send a new inventory
    log         read log of old agent runs
    modified    list modified files
    policy-server       displays or set the policy server
    reset       reset agent status and cache
    restore     restore a file as it was before Rudder modification
    run         force run agent policies
    server-keys-reset   Reset all keys known from this node.
    set-force-audit     force rudder-agent to run in audit mode
    start       start the agent
    status      show the agent status
    stop        stop the agent
    unset-force-audit   allow agent to run in enforce mode (default)
    update      update policies on agent
    version     get the agent version

2.3 server 域完整子命令清单

rudder server help

实测回显:

Usage: rudder server help
       rudder server <command> [parameters ...]
       rudder server <command> --help

  Run commands on server.

  Available commands:
    create-user create an admin user account
    debug       run a debug _cf-serverd_ intended for a specific node
    directive-migrate-package   create a new package directive based on an out-to-date package directive.
    directive-replace   replace a directive occurrence in all the Rudder rules by another directive.
    directive-upgrade   Upgrade directives to use latest technique version available
    disable-policy-distribution Stop Rudder from distributing new policies as a server
    enable-policy-distribution  Re-enable Rudder to distribute new policies as a server
    health      monitor server health
    reload-groups       reload dynamic groups
    reload-techniques   reload techniques
    trigger-policy-generation   trigger a policy generation
    upgrade-techniques  Upgrade techniques in the configuration repository from the packaged ones

三、前置条件

  1. root 权限执行:全部子命令均要求 root。
  2. 分清在哪台机器上跑:agent 域在被管节点执行;server/relay/package 在根服务器执行(服务端本身也是一台自管节点,agent 域命令同样存在,实测在服务端可列出 directive/remote 域)。
  3. 了解输出格式:收敛类命令的结果表头行为 M| State Technique Component Key Message,Enforce 模式的结果行以 E| 开头,提示行以 info 开头,R: 前缀是底层引擎的原始日志行(下文回显可见)。
  4. 退出码约定(实测):成功为 0;rudder agent update 失败退出码 2(复现实录见《Rudder 9.1.5 配置参数详解》5.8 节);rudder agent run 的退出码官方定义见 4.2 节参数表后说明。
  5. 破坏性命令先识别:factory-reset(重置节点身份)、server-keys-reset(清空本节点已知密钥)、reset(清缓存)三类命令影响节点与服务端的信任关系,生产环境慎用;本文实测 reset(可自动恢复),前两者未实测。

四、rudder agent 命令详解

4.1 信息查看类

version / info / status / health —— 四个最常用的状态命令:

rudder agent version
rudder agent info
rudder agent status
rudder agent health

version 回显见第一章。info 实测回显(完整):

General
           Hostname: rudder-agent
               UUID: 6bd04aae-f6b5-4c83-a3aa-1dba2218521c
      Policy server: rudder-server
               Role: node
            Version: 9.1.5

Policies
             Status: enabled
        Report mode: full-compliance
       Run interval: 5 min
           Next run: 2026-10-22 10:35:50+0000
     Inventory time: 2026-10-22 04:15:49+0000
  Forced audit mode: since 2026-10-22 10:33:45+0000
   Configuration id: 20261022-093533-53237c60
     Policy updated: 2026-10-22 10:30:49+0000
     Inventory sent: 2026-10-22 09:51:00+0000

Key/Certificate
           Key hash: MD5=fd36ee10898e0628d37ceabf85778cb4
           Key hash: sha256//xHFvJbwoaJelD5thGG/D/1oePe8DTnFqqIWFQVgNY/o=
  Cert. fingerprint: 4B:02:52:BB:13:28:87:88:D6:1C:60:AD:49:D3:89:20:56:C4:47:F5
        Key pinning: only CFEngine
     Cert. creation: 2026-10-22 09:19:51+0000
   Cert. expiration: 2036-10-19 09:19:51+0000

💡 info 是排障第一入口:策略服务器指向(Policy server)、收敛周期(Run interval: 5 min)、当前策略版本(Configuration id)、最近策略/清单更新时间、审计模式状态一目了然。

status 实测回显:

rudder-cf-serverd: enabled
rudder-cf-execd: enabled
● rudder-agent.service - Rudder agent umbrella service
     Loaded: loaded (/usr/lib/systemd/system/rudder-agent.service; enabled; preset: enabled)
     Active: active (exited) since Thu 2026-10-22 09:40:58 UTC; 1h 24min ago
       Docs: man:rudder(8)
             https://docs.rudder.io
   Main PID: 4778 (code=exited, status=0/SUCCESS)
        CPU: 1ms

Oct 22 09:40:58 rudder-agent systemd[1]: Starting rudder-agent.service - Rudder agent umbrella service...
Oct 22 09:40:58 rudder-agent systemd[1]: Finished rudder-agent.service - Rudder agent umbrella service.

health 实测回显:

OK

check —— 自检并尝试修复 agent 本身(比 health 更深入,会核对计划任务与组件状态):

rudder agent check

实测回显:

FINISH: Rudder agent check ran properly, please look at messages above to see if there has been any error.

history / log —— 历史运行汇总与最近一次运行的详细日志:

rudder agent history

实测回显(节选前 5 行):

2026-10-22 09:38:14+00:00 (5284s) Enforce:   3 compliant,   4 repaired,   2 N/A,   0 errors  Audit:   0 compliant,   0 non-compliant,   0 N/A,   0 errors
2026-10-22 09:41:46+00:00 (5072s) Enforce:   6 compliant,   1 repaired,   2 N/A,   0 errors  Audit:   0 compliant,   0 non-compliant,   0 N/A,   0 errors
2026-10-22 09:45:49+00:00 (4829s) Enforce:   7 compliant,   0 repaired,   2 N/A,   0 errors  Audit:   0 compliant,   0 non-compliant,   0 N/A,   0 errors
2026-10-22 09:46:22+00:00 (4796s) Enforce:   7 compliant,   0 repaired,   2 N/A,   0 errors  Audit:   0 compliant,   0 non-compliant,   0 N/A,   0 errors
2026-10-22 09:50:50+00:00 (4528s) Enforce:   6 compliant,   1 repaired,   2 N/A,   0 errors  Audit:   0 compliant,   0 non-compliant,   0 N/A,   0 errors

log 实测回显(节选前 5 行):

Rudder agent 9.1.5
Node uuid: 6bd04aae-f6b5-4c83-a3aa-1dba2218521c
Logged at 2026-10-22 11:05:50+0000
Start execution with config [20261022-093533-53237c60]

modified —— 列出被 Rudder 修改过的系统文件(排障「谁改了我的配置」):

rudder agent modified

实测回显:

/etc/cron.d/rudder-agent

4.2 策略与运行类

update —— 从策略服务器拉取新策略(不影响执行):

rudder agent update

实测回显(成功):

ok: Rudder agent policies were updated.

失败样例(策略服务器指向被改错的完整回显与修复,见《Rudder 9.1.5 配置参数详解》5.8 节,退出码 2)。

run —— 强制立即收敛一次策略。参数全集实测(rudder agent run help):

Usage: rudder agent run [parameters ...]

  This command will force the agent to enforce current policies.
  You can run rudder agent update before to update the policies.

  Options:

    -u: update policy before running the agent (this is now the default)

    -l: do not update policy before running the agent

    -i: run the agent in information mode, prints basic information

    -v: run the agent in verbose mode, prints detailed information (reports won't be sent to the server)

    -d: run the agent in debug mode, prints low-level information (reports won't be sent to the server)

    -q: run the agent in quiet mode (display only error messages)

    -g: run the agent in full compliance mode (even if change only has been configured)

    -w: show full strings, never cut output

    -c: run the agent without color output

    -T: display timing information

    -r: run the agent with raw output

    -R: run the agent in completely unparsed mode, with no return code of 1 in case of error. A little faster.

    -N: do not write log in outputs dir (used when called internally)

    -b: run the agent on a specific bundle, this is a debug command that should generally not be used

    -D: define a class for this run

    -f: run the agent even if it is disabled

    -e: exit with an error if there was an error during policy application

    -E: exit with an error if there a non compliance

  Exit codes:

  0: Agent ran normally

  1: Agent encountered a critical error and could not run properly

  2: Some policy encountered and error and -e parameter was passed

  3: Some policy encountered a non compliance and -E parameter was passed

run -i 实测回显(完整):

Rudder agent 9.1.5
Node uuid: 6bd04aae-f6b5-4c83-a3aa-1dba2218521c
ok: Rudder agent policies were updated.
Start execution with config [20261022-093533-53237c60]

2026-10-22T11:07:01+00:00 R: [INFO] Starting CFEngine 3.24.3 on host rudder-agent (ubuntu_24 x86_64)
M| State         Technique                 Component                 Key                Message
E| compliant     Common                    ncf Initialization                           Configuration library initialization was correct
E| compliant     Common                    Update                                       Policy and configuration library are already up to date. No action required.
E| compliant     Common                    Security parameters                          The internal environment security is acceptable
2026-10-22T11:07:02+00:00 R: [INFO] Executing is-active on cron using the systemctl method
   info          Common                    CRON Daemon                                  Check if the service cron is started  was correct
E| compliant     Common                    CRON Daemon                                  CRON is correctly running
E| n/a           Common                    GPG key                                      No GPG key trust needed
E| compliant     Common                    Log system for reports                       Reports forwarding to policy server was correct
   info          Common                    Monitoring                                   Remove file /var/rudder/tmp/rudder_monitoring.csv  was correct
E| compliant     Common                    Events scheduler                             Scheduling internal events was correct
   info          Inventory                 Compute inventory splay                      Scheduling rudder_run_inventory  was correct
   info          Inventory                 Inventory                                    An inventory was already sent less than 8 hours ago
E| compliant     Inventory                 Inventory                                    Next inventory scheduled between 00:00 and 06:00
E| n/a           Common                    Monitoring                                   No Rudder monitoring information to share with the server

## Summary #####################################################################
9 components verified in 4 directives
   => 9 components in Enforce mode
      -> 7 compliant
      -> 2 not-applicable
Execution time: 0.38s
################################################################################
Reports sent.

要点:-u(先更新策略再运行)已是默认行为;-v/-d 调试模式不会上报报告(参数原文注明),排障后记得用普通模式再跑一次;-f 可让被 disable 的 agent 跑一次。

inventory —— 立即采集并发送节点清单:

rudder agent inventory

实测回显(完整):

Rudder agent 9.1.5
Node uuid: 6bd04aae-f6b5-4c83-a3aa-1dba2218521c
M| State         Technique                 Component                 Key                Message
E| compliant     Inventory                 Inventory                                    The inventory has been successfully sent
info     Rudder agent was run on a subset of policies - not all policies were checked

## Summary #####################################################################
1 components verified in 2 directives
   => 1 components in Enforce mode
      -> 1 compliant
Execution time: 10.65s
################################################################################
Reports sent.

reset —— 重置本地状态与缓存并重新拉取初始策略(实测可自愈,适合策略目录损坏类故障):

rudder agent reset

实测回显:

R: Initial policies have been successfully downloaded from the policy server
ok: Rudder agent policies were updated.
ok: Rudder agent state has been reset.

随后验证 rudder agent update 正常(实测回显 ok: Rudder agent policies were updated.)。

4.3 节点配置类

policy-server —— 查看/设置策略服务器(标准改法,避免手改文件):

rudder agent policy-server
rudder agent policy-server rudder-server

实测回显(查看命令;设置命令无输出、退出码 0):

rudder-server

设置后底层文件 /var/rudder/cfengine-community/policy_server.dat 同步更新(实测内容 rudder-server)。手改文件改错的后果与修复实录见《Rudder 9.1.5 配置参数详解》5.8 节。

set-force-audit / unset-force-audit —— 节点级审计模式开关:

rudder agent set-force-audit
rudder agent info | grep -i audit
rudder agent unset-force-audit
rudder agent info | grep -i audit

实测回显:

ok: Rudder agent is now enforced in audit mode.
  Forced audit mode: since 2026-10-22 10:33:45+0000
ok: Rudder agent is not enforced in audit mode anymore.
  Forced audit mode: no

开关即时生效,下一次运行起所有组件只报告不修复;详细行为分析见《Rudder 9.1.5 配置参数详解》5.9 节。

4.4 生命周期类

disable / enable —— 停用/恢复 agent 的周期运行(计划任务与服务),实测:

rudder agent disable
rudder agent enable

实测回显:

ok: Rudder agent is now disabled.
ok: Rudder agent has been enabled but not started, wait for next cron run.

注意 enable 的提示语:恢复后要等下一个 cron 周期(最长 5 分钟)才自动收敛;急用可 rudder agent run -f 立即跑一次。disable 期间 status 仍显示组件 enabled(实测回显见 4.1 节),判断真实状态以 info 的 Status 字段为准。

start / stop —— 启停 agent 组件;factory-reset / server-keys-reset —— 重置节点身份/密钥(帮助原文用途见 2.2 节清单)。后两者为破坏性命令(执行后节点在服务端视为新节点/信任关系清空),本文未实测,生产环境执行前务必确认并在服务端重新走节点验收流程。

4.5 文件排查类

diff / restore —— 查看/恢复被 Rudder 修改的文件。对 modified 列出的文件实测 diff:

rudder agent diff /etc/cron.d/rudder-agent

实测回显(完整):

--- /var/rudder/modified-files//_etc_cron_d_rudder_agent_1792661894_Thu_Oct_22_09_38_14_2026_cf_before_edit     2026-10-22 09:38:14.968303845 +0000
+++ /etc/cron.d/rudder-agent    2026-10-22 09:38:14.968303845 +0000
@@ -4,6 +4,4 @@
 #
 # To temporarily avoid this behaviour, run 'rudder agent disable'

-
-0,5,10,15,20,25,30,35,40,45,50,55 * * * * root /opt/rudder/bin/rudder agent check -q >> /var/log/rudder/agent-check/check.log 2>&1
-
+${steps} * * * * root /opt/rudder/bin/rudder agent check -q >> /var/log/rudder/agent-check/check.log 2>&1

即「修改前备份 vs 当前文件」的标准 diff;restore <文件> 用备份恢复原文件(本文未执行,避免改变实验环境状态)。

五、rudder server 命令详解

5.1 已实测命令

health —— 服务端健康检查( umbrella 全组件):

rudder server health

实测回显:

OK

create-user —— 创建 Web 登录账号。帮助文本实测(完整):

Usage: rudder server create-user [parameters ...]

  This commands allows inserting a new user account. It is particularly useful
  to create the first admin account on the server. It requires that the
  authentication hash is bcrypt (default from fresh 6.1).

  Options:

    -u: specify the user name ("admin" by default)

    -p: specify the user password (use with care as it is stored in history). Set the value to "" to use $ADMIN_PASSWORD from the environment instead

创建实测:

rudder server create-user -u opsuser -p "Ops#2026x"

实测回显:

User 'opsuser' added, restarting the Rudder server

重复创建同名账号报 User 'admin' already exists, aborting.(实测见《Ubuntu 22.04 安装 Rudder 指南》FAQ Q2);账号存储与删除账号操作见《Rudder 9.1.5 配置参数详解》5.6 节。生产建议用 -p "" 从环境变量 ADMIN_PASSWORD 传口令,避免口令进 shell 历史(帮助原文注明 -p 值会存入 history)。

reload-groups / reload-techniques —— 不重启 Web 应用热重载动态组定义/技术库文件:

rudder server reload-groups
rudder server reload-techniques

实测回显:

ok: reload groups.
ok: reload techniques from files.

trigger-policy-generation —— 手动触发一次策略生成(改完配置不用等定时批次):

rudder server trigger-policy-generation

实测回显:

Successfully triggered a new policy generation

disable-policy-distribution / enable-policy-distribution —— 停止/恢复本服务器对外分发策略(实测为 systemd 单元启停,窗口极短后即恢复):

rudder server disable-policy-distribution
rudder server enable-policy-distribution

实测回显:

Removed "/etc/systemd/system/multi-user.target.wants/rudder-cf-serverd.service".
Removed "/etc/systemd/system/rudder-agent.service.wants/rudder-cf-serverd.service".
Created symlink /etc/systemd/system/multi-user.target.wants/rudder-cf-serverd.service → /usr/lib/systemd/system/rudder-cf-serverd.service.
Created symlink /etc/systemd/system/rudder-agent.service.wants/rudder-cf-serverd.service → /usr/lib/systemd/system/rudder-cf-serverd.service.

⚠️ disable 期间节点 rudder agent update 会拉取失败(策略分发停摆),执行后必须记得 enable;本文 disable 与 enable 连续执行,恢复后 rudder server health 回显 OK。

5.2 未实测命令(仅列用途)

以下命令具有变更性(批量改写指令/技术库),本文不执行,用途取自 rudder server help 原文(2.3 节):

命令用途(帮助原文)
debugrun a debug cf-serverd intended for a specific node(针对特定节点的策略分发调试)
directive-upgrade将指令升级到最新可用技术版本
directive-replace在所有规则中把一个指令替换为另一个
directive-migrate-package基于过期的软件包指令创建新指令
upgrade-techniques从打包版本升级配置仓库中的技术

执行前建议先备份 /var/rudder/configuration-repository(Git 仓库,可回滚)并在测试节点验证。

六、rudder relay 命令详解

根服务器本身就是一台 relay(中转节点需单独部署 relay 角色)。四个子命令实测两个:

status:

rudder relay status

实测回显(节选,略去统计行):

● rudder-relayd.service - Rudder Relay Daemon
     Loaded: loaded (/usr/lib/systemd/system/rudder-relayd.service; enabled; preset: enabled)
     Active: active (running) since Thu 2026-10-22 10:35:53 UTC; 30min ago
   Main PID: 32806 (rudder-relayd)
      Tasks: 17 (limit: 94371)
     Memory: 11.8M (peak: 13.0M swap: 200.0K swap peak: 256.0K)
        CPU: 24.723s

reload -p —— 热重载 relayd 配置(改 relayd 配置文件后的无中断生效方式,Web 平台内部同样调用该命令):

rudder relay reload -p

实测回显:

ok: reload relayd configuration.

start / stop 与 systemd 直接启停 rudder-relayd 等价(帮助原文:start the relay service / stop the relay service),本文未单独实测。

七、rudder package 插件管理

rudder package 是独立的 Rust 插件管理器(底层命令 rudder-package),支持 --help 与 -V,与主命令风格不同。帮助实测:

rudder package --help

实测回显:

Plugin manager for Rudder

Usage: rudder-package [OPTIONS] <COMMAND>

Commands:
  update     Update package index and licenses from the repository
  install    Install plugins, locally or from the repository
  upgrade    Upgrade plugins
  uninstall  Uninstall plugins [aliases: remove]
  list       Display the plugins list
  show       Show detailed information about a plugin
  info       Show general information about plugin management
  enable     Enable installed plugins
  disable    Disable installed plugins
  help       Print this message or the help of the given subcommand(s)

Options:
  -c, --config <CONFIG>  Configuration file path [default: /opt/rudder/etc/rudder-pkg/rudder-pkg.conf]
  -d, --debug            Enable verbose logs
  -q, --quiet            Disable non-error logs
  -h, --help             Print help
  -V, --version          Print version

三个只读/更新命令实测:

rudder package info
rudder package list
rudder package update

实测回显:

Account: none (anonymous)
Repository: https://repository.rudder.io/plugins/
Latest index update: 2026-10-22T09:16:37Z
+------+-----------+--------+------------+---------+-------------+
| Name | Installed | Latest | Web plugin | License | Description |
+------+-----------+--------+------------+---------+-------------+
 INFO Repository index updated
 INFO Not updating licenses as no configured credentials were found

解读:未配置许可证时账号为 anonymous,插件列表为空(商用插件如 CVE 漏洞评估、安全基线需许可证后 install/enable);update 刷新仓库索引成功、许可证步骤自动跳过。安装/升级/启停插件的完整流程属许可证配置范畴,本文未实测。

八、注意事项

  1. rudder --help 是错误用法:实测报 Unknown role '--help'、退出码 3。顶层用 rudder help,域级用 rudder agent help(或对单条命令加 help 参数,如 rudder agent run help);唯一例外是 rudder package 支持 --help。
  2. run -v / -d 不上报报告:调试模式的运行结果不会进服务端合规报表,排障结束务必用普通模式重跑一次,避免报表出现「漏跑」空档。
  3. -u 已是 run 默认:无需先 update 再 run;要省一次策略检查才用 -l。
  4. 破坏性命令白名单意识:factory-reset、server-keys-reset、reset 逐级加重,生产环境先 rudder agent info 记录 UUID 再操作,便于事后在服务端核对。
  5. 服务端命令影响面是全局的:trigger-policy-generation、reload-*、policy-distribution 开关作用于全部节点,变更窗口内执行;enable-policy-distribution 忘了恢复会让全网节点策略停更(实测恢复方法见 5.1 节)。
  6. 命令与配置的对应关系:policy-server 写 policy_server.dat、set-force-audit 写节点本地标记、relay reload -p 重读 relayd/main.conf——改配置与跑命令两条路径都能达到同一状态,但命令版更安全(自动处理证书信任等副作用),详见《Rudder 9.1.5 配置参数详解》第五章。

九、常见问题

Q1:rudder --help 报 Unknown role '--help'。

主命令把 --help 当作「命令域」解析了。改用 rudder help(2.1 节实测),域级帮助用 rudder <域> help,子命令帮助用 rudder <域> <命令> help。

Q2:节点上 rudder agent update 退出码 2,报 could not get an updated configuration。

策略服务器指向错误、节点未被服务端接受、或服务端策略分发被停用,三类原因官方提示原文(完整回显)见《Rudder 9.1.5 配置参数详解》5.8 节 FAQ 与本文 5.1 节。修复后可用 rudder agent run -f 立即验证收敛。

Q3:rudder agent disable 之后忘了 enable,节点多久会恢复正常收敛?

不会自愈,disable 会同时禁用 cron 计划任务与服务,节点永久停止收敛直到执行 rudder agent enable(实测回显提示「wait for next cron run」)。巡检建议把 rudder agent info | grep Status 纳入监控,Status: enabled 才正常。

Q4:rudder agent run 的退出码非 0 怎么判读。

官方定义(4.2 节帮助原文):1=agent 本身故障没跑起来;2=传了 -e 且策略执行出错;3=传了 -E 且存在不合规。把 -e -E 加入 CI 检查可以把合规失败变成构建失败。

Q5:哪里看每条命令的官方文档。

服务端命令:https://docs.rudder.io/reference/9.1/administration/server.html ;命令行总览:https://docs.rudder.io/reference/9.1/administration/command-lines.html (两链接 2026-10-22 实查可访问)。

十、参考链接