zabbix windows 数据采集

zabbix对windows的支持,并没有Linux平台那么的强大,但可以通过使用windows的typeperf.exe 对windows性能数据进行采集

TypePerf.exe是一个命令行工具,包括把Windows操作系统的性能计数器数据输出到命令窗口或写入到支持该功能的日志文件格式中。

常见的参数如下:

PerfCounter=UserPerfCountercpu,"\Processor(_Total)\% Processor Time",60    CPU 使用率

UserParameter=ESTABLISHED,netstat -anp tcp | find /c "ESTABLISHED"

UserParameter=TIME_WAIT,netstat -anp tcp | find /c "TIME_WAIT"

UserParameter=LISTENING,netstat -anp tcp | find /c "LISTENING"

UserParameter=CLOSE_WAIT,netstat -anp tcp | find /c "CLOSE_WAIT"

UserParameter=SYN_RECV,netstat -anp tcp | find /c "SYN_RECV"

UserParameter=SYN_SENT,netstat -anp tcp | find /c "SYN_SENT"

UserParameter=LAST_ACK,netstat -anp tcp | find /c "LAST_ACK"

UserParameter=FIN_WAIT,netstat -anp tcp | find /c "FIN_WAIT"

UserParameter=NETSTAT_ALL,netstat -anp  | find /c  "TCP"


PerfCounter=db_userconns,"\SQLServer:General Statistics()\User Connections",60    ###SQLServer 连接数

PerfCounter=db_buffer_cache,"\SQLServer:Buffer Manager\Buffer cache hit ratio",60   

PerfCounter=db_deadlocks, "\SQLServer:Locks(Key)\Number of Deadlocks/sec",60   ###每秒存在的死锁数


PerfCounter=disk_queue,"\PhysicalDisk(_Total)\Avg. Disk Queue Length",60

PerfCounter=disk_write_queue, "\PhysicalDisk(_Total)\Avg. Disk Write Queue Length",60

PerfCounter=disk_write_bytes, "\PhysicalDisk(_Total)\Disk Write Bytes/sec",60

PerfCounter=disk_read_bytes, "\PhysicalDisk(_Total)\Disk Read Bytes/sec",60

PerfCounter=disk_idle,"\PhysicalDisk(_Total)\% Idle Time",60


更多参数,通过cmd 查看:typeperf -qx | more