• 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 ~]#

  • 相关阅读:
    php 类 成员变量 $this->name='abc'
    php类的实现
    php 生成类的对象 $a=new test();
    php 对象的执行
    php 对象调用方法
    php 连接字符串. ZEND_ASSIGN_CONCAT/ZEND_CONCAT原理
    function 的声明
    vim用法
    ubuntn系统下将文件拷贝到优盘中及挂载概念理解
    windows远程连接linux-安装xfce界面,ubuntn添加新用户
  • 原文地址:https://www.cnblogs.com/dengcongcong/p/13871151.html
Copyright © 2020-2023  润新知