Recently, I've been studying Zabbix monitoring Windows machines, involving how to quickly install agents, how to modify and refine Windows monitoring templates, and more. I would like to share my experience with you and hope to help you.
1) Install Agent Client
First share the AGENTD installation script Zabbix_agentd_install_windows.bat I wrote about automating the installation of Windows machines.
@echo offcolor fdcd #IP from Zabbix Server or proxy where Data should be send to. Set zabbix_server_ip=ipecho creating zabbix install dirmkdir c:\zabbixmkdir c:\zabbix\confmkdir c:\zabbix\binmkdir c:\zabbix\logmkdir c:\zabbix\install_fileecho copying zabbix install filexcopy \\ Shared Server Ip\share\zabbix_agents_2.2.1.win c:\ Zabbix\install_file /scopy /y c:\zabbix\install_file\conf\zabbix_agentd.win.conf c:\zabbix \confecho modiy zabbix configuration filesecho logfile=c:\zabbix\log\zabbix_ agentd.log >> c:\zabbix\conf\zabbix_agentd.win.confecho server=%zabbix_server_ip% >> c:\zabbix\conf\zabbix_agentd.win.confecho hostname=%computername% >> c:\ Zabbix\conf\zabbix_agentd.win.confecho startagents=10 >> c:\zabbix\conf\zabbix_agentd. win.confecho timeout=30 >> c:\zabbix\conf\zabbix_agentd.win.confecho echo copy zabbix start-up fileif %processor_architecture% equ x86 copy /y c:\zabbix\install_file\bin\win32 c:\zabbix\binif %processor_architecture% equ amd64 copy /y C:\zabbix\install_file\bin\win64 C:\zabbix\binecho start zabbix servicc:\zabbix\bin\zabbix_agentd.exe -i -c c:\zabbix\conf\zabbix_agentd.win.confecho start zabbix servicesnet start "Zabbix agent" echo set zabbix service autosc config "Zabbix agent" start= autoecho Zabbix Agentd configuration and install successful
If the monitoring winows machine has hundreds of units, with the above installation script installation efficiency is improved a lot, but still not ideal, below to share a small tool (http://technet.microsoft.com/en-us/Sysinternals/bb897553.aspx).
The PsExec tool is similar to telnet and does not require the installation of the client software on the remote access server to execute the Setup program and execute the installation script in bulk, no less than a shell script. Here's how to use it:
usage:psexec [\\computer[,computer2[,...] | @file]][-u User [-P psswd][-n s][-r servicename][-h][-l][-s|-e][-x][-i [ session]][-c [-f|-v]][-w directory][-d][-<priority>][-a n,n,...] cmd [arguments] just need to know the following commands: @file PsExec Remote execution host list, such as IP address, host name. -u Specifies the optional user name that is used to log on to the remote computer. -p Specifies the password for the user name. The program specified by-c is copied to the remote system to execute, which is the installation script.
Example:
PsExec.exe @ComputerList. Txt-u "Sfzhang" –c Zabbix_agentd_install_windows.bat
2) Get monitoring performance metrics
Zabbix monitoring Windows Common key can refer to the official documentation (HTTPS://WWW.ZABBIX.COM/DOCUMENTATION/2.2/MANUAL/CONFIG/ITEMS/ITEMTYPES/ZABBIX_ Agent/win_keys):
The most commonly used key is perf_counter[counter,<interval>], you can get the data for Windows Performance Monitor. Windows Performance Monitor data can be obtained through Typeperf and can redirect all data in the Performance Monitor to a text file View TYPEPERF-QX > win2003_ Performance.txt. here's how to get Windows CPU usage.
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/47/AA/wKioL1P9k-biGWm2AAJLWHx7g0Y757.jpg "title=" 1.jpg " alt= "Wkiol1p9k-bigwm2aajlwhx7g0y757.jpg"/>
Define key for the monitoring item:
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/47/A8/wKiom1P9lNPQGPUHAAK6QlMFj7I207.jpg "title=" 3.jpg " alt= "Wkiom1p9lnpqgpuhaak6qlmfj7i207.jpg"/>
Define the trigger within trigger,5 minutes if the CPU usage is greater than 85% alarm.
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/47/AA/wKioL1P9lsqzULlbAAGksTMDktI188.jpg "title=" 1.jpg " alt= "Wkiol1p9lsqzullbaagkstmdkti188.jpg"/>
3) Display of performance indicators
CPU utilization, CPU, and disk Idle time.
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/47/AB/wKioL1P9mjjQ7bhaAATmKuRONPQ124.jpg "title=" 1.jpg " alt= "Wkiol1p9mjjq7bhaaatmkuronpq124.jpg"/>
4) Zabbix monitor Windows network card traffic, Zabbix monitor the Windows NIC stream is the traffic that monitors all interfaces.
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/47/AB/wKioL1P9nhjyMW3IAAbFdIg_k-A944.jpg "title=" 1.jpg " alt= "Wkiol1p9nhjymw3iaabfdig_k-a944.jpg"/>
Using Zabbix macro solves the need to monitor local network cards. where IPAddress is Zabbix Macro, said to be the IP address of the monitoring machine, with the following key can be taken into and out of traffic.
Net.if.in[{ipaddress},bytes]
Net.if.out[{ipaddress},bytes]
5) Other performance indicators:
Read response time for Physical disk: perf_counter["\physicaldisk (_total) \avg. Disk Sec/read"]
Write response time for physical disk: perf_counter["\physicaldisk (_total) \avg. Disk Sec/write"]
Percentage of memory used: vm.memory.size[pused]
CPU load: SYSTEM.CPU.LOAD[ALL,AVG1]
Summary: Zabbix self-monitoring Windows machine templates There are few monitoring metrics, many metrics need to be optimized, and data needs to be fetched through Windows Performance Monitor, whether at the system level (load, memory utilization, etc.) or application plane (IIS, SQL Server, etc.) can be obtained.
This article is from the "Simple Dreamer" blog, please be sure to keep this source http://sfzhang88.blog.51cto.com/4995876/1545761
Zabbix How to monitor Windows machines