手动监控Windows端口

转载自http://blog.51cto.com/ywzhou/1579917

1、监控端口的几个主要Keys:

 

net.tcp.listen[port]

Checks if this port is in LISTEN state. 0 - it is not, 1 - it is in LISTEN state.

监控TCP端口是否监听

net.tcp.port[<ip>,port]

Check, if it is possible to make TCP connection to the port number. 0 - cannot connect, 

1 - can connect. IP address is optional. If ip is missing, 127.0.0.1 is used. 

Example: net.tcp.port[,80]

检查TCP端口是否可以正常连接。

net.tcp.service[service,<ip>,<port>]

Check if service is available. 0 - service is down, 1 - service is running. 

If ip is missing 127.0.0.1 is used. If port number is missing, default service port is used. 

Example: net.tcp.service[ftp,,45].

检查服务是否可用,FTP服务可直接使用FTP模板

net.tcp.service.perf[service,<ip>,<port>]

Check performance of service "service". 0 - service is down, sec - number of seconds spent on connection to the service. 

If ip is missing 127.0.0.1 is used. If port number is missing, default service port is used.

监控服务(端口)连接性能

net.udp.listen[port]

Checks if this port is in LISTEN state. 0 - it is not, 1 - it is in LISTEN state.

监控UDP端口是否监听(不支持windows)

   说明:Zabbix自带单独服务检测模板,如Template App FTP Service,就是使用的ket.tcp.service[ftp]这个KEY来监控的。

2、创建一组专门用于端口监控的模板

    监控80端口的模板,新建一个组Tcp Port

wKiom1RtO3KiM52fAAIa4EOpREk518.jpg

3、在模板中添加Item

    添加一个监控80端口是否在Listen状态的Item,使用的KEY是net.tcp.listen[]

wKioL1RtO-rRA3-OAADYffaHm2o532.jpg

4、添加第二个Item

    这个Item使用的KEY是net.tcp.port[],用来检查TCP端口是否可以正常连接

wKiom1RtO3LDCm7hAADZ8g5mhuk030.jpg

5、添加第三个Item

    这个Item使用的KEY是net.tcp.service[],用来监控服务是否可用,不指定端口将检查该服务的默认端口

wKioL1RtO-qBh-eBAAELdWuL-qg596.jpg

6、添加第四个Item

    这个Item使用的KEY是net.tcp.service[],用来监控服务(端口)的连接性能,注意下面的数据类型选择float

wKioL1RtO-rgXarxAAEFWrXXJwQ114.jpg

7、给第一个Item创建一个触发器

     第一个Item是监控80端口是否在listen状态,返回0表示不在,返回1表示在

wKiom1RtO3LRsYVLAAEBdWis2Rg853.jpg

8、在模板中创建一个图像,将4个Items显示在图像中

wKioL1RtO-vgBYmQAAMQyKwASlw811.jpg

9、将模板Link到监控主机上

wKiom1RtO3PDUEYTAAFX58pGqwY696.jpg

10、主机HV01显示的监控结果

wKioL1RtO-uDK_KVAAPc2i-wIP8174.jpg

11、主机HV03显示的监控结果

wKiom1RtO3SywhsrAAPrqvYFUXk571.jpg

    说明:通过以上两图可以看到四个Items的区别与作用

12、主机HV03的监控图像

wKioL1RtO-ygDAO6AAScfb_npnI963.jpg

    说明:上图反映了四个端口监控Items的状态与数值,performance反映了HV03服务器的80端口连接性能,越小越好。

猜你喜欢

转载自www.cnblogs.com/jx-linux/p/9492857.html
今日推荐