zabbix monitoring of Windows server

Configuring Windows monitoring zabbix

surroundings

zabbix server

ens192:10.127.0.133
ens256:172.168.0.2

windows server2012

Ens192: 172.168.0.3
Gateway: 172.168.0.2

Internet sharing and port forwarding configuration

Here's windows server2012 environment using esxi virtual machine, because the ip on the public network is not enough, here I do nat, but esxi nat network does not support, so I use port forwarding and iptables achieved on zabbix server to share Internet access

Open zabbix server routing forwarding

echo 1 > /proc/sys/net/ipv4/ip_forward

or

vim /etc/sysctl.conf 
net.ipv4.ip_forward = 1
sysctl -p

Iptables configuration

iptables -t nat -A POSTROUTING -s 172.168.0.0/24 -o ens192 -j SNAT --to-source 10.127.0.133
iptables -t nat -A PREROUTING -d 10.127.0.133 -p tcp --dport 3389 -i ens192 -j DNAT --to-destination 172.168.0.3:3389
iptables-save

Testing Network Connectivity

zabbix monitoring of Windows server

Remote connectivity test

Because Windows server2012 not open remote connection service, you need to add in the Server Manager role and function is relatively simple steps, not repeat them here, directly connected to the 3389 port zabbix server within the network can connect a remote Windows server desktop
zabbix monitoring of Windows server

Download zabbix agent client

download link:

zabbix-agent

start installation

zabbix monitoring of Windows server

zabbix monitoring of Windows server

zabbix monitoring of Windows server

zabbix monitoring of Windows server

After the installation is complete, zabbix agent is added to the service up and running

zabbix monitoring of Windows server

We can also see the port 10050 is in a listening state

zabbix monitoring of Windows server

Adding Windows host on zabbix

Windows host name write the name on it
zabbix monitoring of Windows server

Encounter a problem after creating a host connection agent has reported 104 errors, see the next agent log and found that the network is taking the network card, it may be a bit more before iptables rules, and iptables rules are down from the match, the rules do not lead to the right to match

get value from agent failed: ZBX_TCP_READ() failed;[104] connection reset by peer

The top of the right iptables rules on the chain can be resolved

iptables -t nat -I POSTROUTING -d 172.168.0.0/24 -p tcp -m tcp --dport 10050 -j SNAT --to-source 10.127.0.133
iptables-save

View logs can see the status of agent becomes available
zabbix monitoring of Windows server

zabbix provides a template to monitor a Windows provides a lot of monitoring on the system, and can automatically discover and monitor the service status

Create a Windows monitoring items example

Get IIS process status

agent provides a proc.num [] keys used to monitor the number of processes
zabbix monitoring of Windows server

When the number of processes can be configured to trigger an alarm 0
zabbix monitoring of Windows server

If you want to conduct a detailed monitoring of the IIS process, you can use Windows Performance Monitor to monitor
zabbix monitoring of Windows server

Providing zabbix agent perf_counter [counter, \ <interval>] key on the performance test is collected between the monitored values, where available memory windows for example, to add a first counter

zabbix monitoring of Windows server

Once created only need to add the counter on the path it zabbix
zabbix monitoring of Windows server

zabbix monitoring of Windows server

Of course, the path of these counters can also be represented by numbers, the digital path map value exists in the registry, you need to run regedit, and then locate the HKEY_LOCAL_MACHINE \ SOFTWARE \ Microsoft \ Windows NT \ CurrentVersion \ Perflib \ 009 this registry.
zabbix monitoring of Windows server

Monitoring items such as the above may be expressed using the following method:
zabbix monitoring of Windows server

If we want more information web process monitor, you can add a counter in the process path, inetinfo name for the software to run the web
zabbix monitoring of Windows server

Gets the number of concurrent connections for IIS

Performance Monitor also added a number of IIS connection counter to be monitored, path exists in the Web Service, if the additional information to the IIS (such as CGI requests processed) for obtaining, also in the Web Service path under Add counters
zabbix monitoring of Windows server

zabbix monitoring of Windows server


We welcome you to focus on the public number "Master Chen's no story."
zabbix monitoring of Windows server

Guess you like

Origin blog.51cto.com/12970189/2437174