zoukankan      html  css  js  c++  java
  • zabbix自定义key监控目标IP的指定端口

      为了监控某个IP的端口是否正常,zabbix内置tcp监控的key值" net.tcp.port[IP,port]  返回结果1表示端口正常,返回0表示不存在",既触发器配置" {Zabbix server:net.tcp.port[113.143.100.199,8899].last()}=0 "

      该监控项只能在zabbix-server的主机监控项下配置,通过server端来获取状态的监控

    2,目标icmp的监控

     

      配置好的监控项出现红色感叹号的位置错误(failed: 1.81.7.103: Address family for hostname not supported),该错误表示zabbix_server和zabbix-agent的sourceip问题导致,亦或者fping的权限问题

    解决思路:

    1,Fping的权限问题

    [root@begon ~]# ls -l /usr/sbin/fping*
    -rwsr-xr-x 1 root zabbix 32960 Oct 26 2014 /usr/sbin/fping
    -rwsr-xr-x 1 root root 32960 Oct 26 2014 /usr/sbin/fping6
    2,服务端可对外访问的IP

    [root@begon ~]# grep -i sourceip /etc/zabbix/zabbix_server.conf
    ### Option: SourceIP
    SourceIP=X.X.X.X

    3,zabbix-server的IP

    [root@begon ~]# grep -i Server= /etc/zabbix/zabbix_agentd.conf
    # Example: Server=127.0.0.1,192.168.1.0/24,::1,2001:db8::/32,zabbix.example.com
    # Server=
    Server=X.X.X.X

    4,Fping的路径

    [root@begon ~]# grep -i fping /etc/zabbix/zabbix_server.conf
    ### Option: FpingLocation
    # Location of fping.
    # Make sure that fping binary has root ownership and SUID flag set.
    FpingLocation=/usr/sbin/fping
    ### Option: Fping6Location
    # Location of fping6.
    # Make sure that fping6 binary has root ownership and SUID flag set.
    # Make empty if your fping utility is capable to process IPv6 addresses.
    # Fping6Location=/usr/sbin/fping6
    [root@begon ~]#

  • 相关阅读:
    AspNetCore打造一个“最安全”的api接口
    efcore分表分库原理解析
    对于经常接触的分页你确定你真的会吗
    Monitor的扩展支持string的超时锁
    Excel导出
    搭建私有Git服务器-GitLab
    C# 爬取网易Buff进行购买
    .Net Core 使用弹性和瞬态故障处理库Polly
    JS Table表格添加多选框
    JS 用户头像展示
  • 原文地址:https://www.cnblogs.com/dengcongcong/p/13871151.html
Copyright © 2011-2022 走看看