--- tags: Cloud-GCP disqus: hackmd --- # 安裝GCP Cloud Agent監控程式 ## CentOS 6 安裝 stack driver,監控系統效能 curl -sSO https://dl.google.com/cloudagents/add-monitoring-agent-repo.sh && bash add-monitoring-agent-repo.sh && yum install -y stackdriver-agent && service stackdriver-agent start 1. 在終端機執行下列指令 ``` curl -sSO https://dl.google.com/cloudagents/add-monitoring-agent-repo.sh ``` 3. sudo su - 切換root帳號,並增加下載點 ``` bash add-monitoring-agent-repo.sh ``` ![](https://i.imgur.com/xzfkjqX.png) 3. 線上安裝Stackdriver-agent ``` yum install -y stackdriver-agent ``` ![](https://i.imgur.com/Y7kujcb.png) 4. 啟動 stackdriver-agent start ``` service stackdriver-agent start ``` ![](https://i.imgur.com/rT85yPR.png) ### * CentOS 6 安裝google fluentd , 收集Log 1. 在終端機執行下列指令 ``` curl -sSO https://dl.google.com/cloudagents/install-logging-agent.sh sudo bash install-logging-agent.sh ``` 2. 登入至instence ![](https://i.imgur.com/SrBrg0J.png) 3. 切換root 權限 ![](https://i.imgur.com/DNAgpVm.png) 4. 下載安裝檔 ![](https://i.imgur.com/7AuSQIV.png) 5. 執行安裝 ![](https://i.imgur.com/uOGfe63.png) ![](https://i.imgur.com/7csz3e7.png) ##Windows 2008 R2 ##Windows 2019 ``` cd $env:UserProfile; (New-Object Net.WebClient).DownloadFile("https://repo.stackdriver.com/windows/StackdriverMonitoring-GCM-46.exe", ".\StackdriverMonitoring-GCM-46.exe") .\StackdriverMonitoring-GCM-46.exe ``` ![](https://i.imgur.com/EvQzoLR.png) ![](https://i.imgur.com/zbbvQ2i.png) ![](https://i.imgur.com/fqkDYwx.png) ![](https://i.imgur.com/SiDRqe1.png) ![](https://i.imgur.com/nie12o6.png) ![](https://i.imgur.com/LnkT16v.png) ![](https://i.imgur.com/9g6Soyt.png) ![](https://i.imgur.com/OsQQs2B.png) ![](https://i.imgur.com/fhAFoP1.png) ![](https://i.imgur.com/WDcar9Q.png) ![](https://i.imgur.com/QAnVMZ8.png) ![](https://i.imgur.com/CtrCgXA.png)