Zabbix监控:监控端口

63 篇文章 0 订阅
6 篇文章 0 订阅

文章来源:Zabbix监控(七):手动监控windows端口


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



3、在模板中添加Item

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



4、添加第二个Item

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



5、添加第三个Item

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



6、添加第四个Item

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



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

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



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



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



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



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


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


12、主机HV03的监控图像


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





  • 3
    点赞
  • 9
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值