首页域名资讯 正文

zabbix windows性能计数器使用详解(90)

2024-11-09 6 0条评论

概述

windows下的性能计数器让zabbix监控更加轻松,直接获取性能计数器的数值即可完成windows监控。性能计数器如下:

1 perf_counter [ “\Processor(0)\Interrupts/sec” ]

1 perf_counter [ “\Processor(0)\Interrupts/sec” , 10 ]

获取所有性能计数器命令:

1 typeperf qx

数字对应

如上的perf_counter[“\Processor(0)\Interrupts/sec”],里面的\Processor(0)\Interrupts/sec很难记忆,而且不同的windows系统名称不可能不相同,这可能会导致获取到错误的值。基于此,windows有相应的数字与名称对应,比如:system对应2,Memory对应4,有几千个性能计数器名称与数字对。那怎么找到名称对应的数字呢?打开注册表Regedit,找到HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Perflib\009,打开key counter

在win2008下,有5000多行,大概2000多对。贴一部分文字出来吧

1 2 3 4 5 6 7 8 9 10 11 1 1847 2 System 4 Memory 6 % Processor Time 10 File Read Operations / sec

自定义性能计数器key

编辑agentd配置文件,添加PerfCounter自定义内容

1 PerfCounter = UserPerfCounter1 , “\Memory\Page Reads/sec” , 30

或者

1 PerfCounter = UserPerfCounter2 , “\4\24” , 30

UserPerfCounter1与UserPerfCounter2其实是一样的,4取代了Memory,24取代了Page Reads/sec,虽然说可读性差一点,但是推荐大家使用数值。

 

文章转载来自:trustauth.cn

文章版权及转载声明

本文作者:亿网 网址:https://www.edns.com/ask/post/163049.html 发布于 2024-11-09
文章转载或复制请以超链接形式并注明出处。