云监控服务 CES-管理Agent:管理Agent(Linux)

时间:2024-06-13 16:20:31

管理Agent(Linux)

查看、启动、停止、更新和卸载Agent需使用root用户。

  • 查看Agent版本
    1. 使用root账号,登录主机。
    2. 执行如下命令,确认使用Agent的版本。

      if [[ -f /usr/local/uniagent/extension/install/telescope/bin/telescope ]]; then

      /usr/local/uniagent/extension/install/telescope/bin/telescope -v; elif [[ -f /usr/local/telescope/bin/telescope ]]; then echo "old agent"; else echo 0; fi

      • 返回“old agent”,表示使用老版本Agent,请参考老版本操作指令。
      • 返回版本号,表示使用新版本Agent,请参考新版本操作指令。
      • 返回“0”,表示未安装Agent。
  • 查看Agent状态(新版本)

    以root用户登录主机,执行以下命令,查看Agent状态。

    /usr/local/uniagent/extension/install/telescope/telescoped status

    当系统返回以下内容,则表示Agent为正常运行状态。

    "Telescope process is running well." 
  • 启动Agent(新版本)

    执行以下命令,启动Agent。

    /usr/local/uniagent/extension/install/telescope/telescoped start
  • 重启Agent(新版本)

    执行以下命令查看telescope的PID。

    /usr/local/uniagent/extension/install/telescope/telescoped restart
    图1 重启Agent
  • 停止Agent(新版本)

    登录主机,执行以下命令,停止Agent。

    service uniagent stop
    /usr/local/uniagent/extension/install/telescope/telescoped stop
  • 卸载Agent(新版本)

    执行以下命令,即可卸载Agent。

    bash /usr/local/uniagent/script/uninstall.sh

    用户可手动卸载Agent插件,卸载后云监控服务将不再主动采集主机的监控数据。如需再次使用,请参考操作步骤操作步骤重新安装。

  • 查看Agent状态(老版本)

    以root用户登录ECS或BMS,执行以下命令,查看Agent状态。

    service telescoped status

    当系统返回以下内容,则表示Agent为正常运行状态。

    "Active(running)"或"Telescope process is running well." 
  • 启动Agent(老版本)

    执行以下命令,启动Agent。

    /usr/local/telescope/telescoped start
  • 重启Agent(老版本)

    执行以下命令,重启Agent。

    /usr/local/telescope/telescoped restart
  • 停止Agent(老版本)

    登录ECS或BMS,执行以下命令,停止Agent。

    service telescoped stop

    如果Telescope安装失败,可能会导致无法正常停止Agent,可通过执行以下命令进一步尝试;

    /usr/local/telescope/telescoped stop

  • 卸载Agent(老版本)

    执行以下命令,即可卸载Agent。

    /usr/local/telescope/uninstall.sh

    用户可手动卸载Agent插件,卸载后云监控服务将不再主动采集主机的监控数据。如需再次使用,请参考操作步骤操作步骤重新安装。

support.huaweicloud.com/usermanual-ces/ces_01_0035.html