1. 程式人生 > >zabbix監控IIS程序記憶體、cpu、錯誤頁面等

zabbix監控IIS程序記憶體、cpu、錯誤頁面等

公司最近IIS出了個很奇怪的問題,但是沒有追查到原因,所以要求對IIS新增更為完善的監控。 以下監控都是通過抓取Windows機器中效能監視器的值得到的結果,所以不需要寫指令碼。 效能監視器介紹: 需求: plat端和management端所有伺服器IIS增加以下監控指標: Requests Queued     堆積請求數 Requests Rejected   拒絕請求數 Requests/Sec           請求速率 Request Errors/Sec  錯誤請求速率 Pages/sec                  Page Faults/sec      “頁面錯誤” iis 程序使用CPU iis 使用記憶體: IIS使用記憶體主要兩個引數: Private Bytes are what your app has actually allocated, but include pagefile usage; Private Bytes是應用實際分配的記憶體數量,既包括在實體記憶體中的,也包括pagefile中的;linked dll分配的記憶體是不包含在private Bytes的。 Working Set is the non-paged Private Bytes plus memory-mapped files; Working Set是在實體記憶體中的Private Bytes加上memory-mapped files,是該程序所佔用的實體記憶體大小; 通過檢視效能監視器中的定義,以及dos命令輸出的結果: 獲取iis的效能引數:
windows下進入cmd,輸入“typeperf -qx | find "Web Service" > C:\typeperf.txt”然後會在c盤下生成 typeperf.txt 檔案,開啟檔案在其中可以搜尋到IIS web server效能相關的引數,利用這些效能計數器路徑就可以獲取相關的效能值.(其實這一步不需要每臺伺服器都要,只是檢視裡面路徑,一臺就夠用啦) 以下是zabbix客戶端需要新增的內容: IIS-platform PerfCounter=Page_Faults_sec,"\Memory\Page Faults/sec",15 PerfCounter=Pages_sec,"\Memory\Pages/sec",15 PerfCounter=Requests_Queued,"\ASP.NET v4.0.30319\Requests Queued",15 PerfCounter=Requests_Rejected,"\ASP.NET v4.0.30319\Requests Rejected",15 PerfCounter=IIS_CPU,"\Process(w3wp)\% Processor Time",15 PerfCounter=Get_Requests_sec,"\Web Service(Platform)\Get Requests/sec",15 PerfCounter=Request_Errors_Sec,"\Web Service(Platform)\Not Found Errors/sec",15 PerfCounter=IIS-Memory1,"\Process(w3wp)\Working Set - Private",15 PerfCounter=IIS-Memory2,"\Process(w3wp)\Private Bytes",15 IIS-management PerfCounter=Page_Faults_sec,"\Memory\Page Faults/sec",15 PerfCounter=Pages_sec,"\Memory\Pages/sec",15 PerfCounter=Requests_Queued,"\ASP.NET v4.0.30319\Requests Queued",15 PerfCounter=Requests_Rejected,"\ASP.NET v4.0.30319\Requests Rejected",15 PerfCounter=IIS_CPU,"\Process(w3wp#1)\% Processor Time",15 PerfCounter=Get_Requests_sec,"\Web Service(Management)\Get Requests/sec",15 PerfCounter=Request_Errors_Sec,"\Web Service(Management)\Not Found Errors/sec",15 PerfCounter=IIS-Memory1,"\Process(w3wp)\Working Set - Private",15 PerfCounter=IIS-Memory2,"\Process(w3wp)\Private Bytes",15 至於zabbix頁面新增模板監控項這裡就不說了