公司最近IIS出了个很奇怪的问题,但是没有追查到原因,所以要求对IIS添加更为完善的监控。
以下监控都是通过抓取Windows机器中性能监视器的值得到的结果,所以不需要写脚本。
性能监视器介绍:
http://kms.lenovots.com/kb/article.php?id=7045
http://www.cnblogs.com/upDOoGIS/archive/2010/11/19/1881970.html
需求:
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命令输出的结果:
http://www.iyunv.com/thread-126099-1-1.html这里是获取监视器的使用以及如何获取监控项路径的方法
获取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页面添加模板监控项这里就不说了