说明
查看、启动、停止、更新和卸载Agent需使用root用户。
前提条件
已成功Agent安装配置方式说明。
查看Agent版本
使用root账号,登录主机。
执行如下命令,确认使用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停止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插件,卸载后云监控服务将不再主动采集ECS或BMS秒级粒度的监控数据。如需再次使用,请参考在ECS/BMS中安装配置Agent(Linux)重新安装。重新安装Agent前,请手动清理之前的Agent安装包。