說明
查看、啟動、停止、更新和卸載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安裝包。