• Zabbix网络自动发现规则和自动添加hosts及link模板


    Version: zabbix 3.0

    一、配置网络发现规则(Configuration Discovery)

    Device uniqueness criteria:选择主机名作为唯一标识(Configuation Hosts中显示的NAME)

    二、查看发现的主机(Monitoring->Discovery)

    ps: 显示主机名(m-proxy1)需要在服务器端/etc/hosts定义

    192.168.0.2  m-proxy1

    三、自动添加Hosts(加入到对应组,links对应模板)(Configuration -> Actions Event -> Discovery)

    现在可以看到添加的主机(Configuation->Hosts)

    Q&S

    步骤一后 并未发现hosts

    Solve:

    1 tcpdump -vnn host 172.16.0.116 and port 10050  #发现服务器并没有发送discovery包到客户端

    2 日志开启 debugging (DebugLevel=5)

    tail -f /tmp/zabbix_server.log | grep discover

      9983:20160312:174909.385 __zbx_zbx_setproctitle() title:'discoverer #1 [processed 1 rules in 0.020067 sec, performing discovery]'
      9983:20160312:174909.393 In discover_service()
      9983:20160312:174909.394 discovery: item [system.uname] error: A TLS connection is configured to be used with agent but support for TLS was not compiled into server.
      9983:20160312:174909.394 End of discover_service():FAIL
      9983:20160312:174909.394 In discovery_update_service() ip:'172.16.0.115' dns:'' port:10050 status:1 value:''
      9983:20160312:174909.395 In discovery_register_host() ip:'172.16.0.115' status:1 value:''
      9983:20160312:174909.395 End of discovery_register_host()
      9983:20160312:174909.395 End of discovery_update_service()
      9983:20160312:174909.396 In discovery_update_host()
      9983:20160312:174909.397 End of discovery_update_host()
      9983:20160312:174909.397 In discovery_clean_services()
      9983:20160312:174909.397 End of discovery_clean_services()
      9983:20160312:174909.400 __zbx_zbx_setproctitle() title:'discoverer #1 [processed 1 rules in 0.014707 sec, idle 30 sec]'
      9965:20160312:174923.275 query [txnlev:0] [select refresh_unsupported,discovery_groupid,snmptrap_logging,severity_name_0,severity_name_1,severity_name_2,severity_name_3,severity_name_4,severity_name_5,hk_events_mode,hk_events_trigger,hk_events_internal,hk_events_discovery,hk_events_autoreg,hk_services_mode,hk_services,hk_audit_mode,hk_audit,hk_sessions_mode,hk_sessions,hk_history_mode,hk_history_global,hk_history,hk_trends_mode,hk_trends_global,hk_trends,default_inventory_mode from config]
      9967:20160312:174935.465 In substitute_key_macros() data:'zabbix[process,discoverer,avg,busy]'
      9967:20160312:174935.465 End of substitute_key_macros():SUCCEED data:'zabbix[process,discoverer,avg,busy]'
      9967:20160312:174935.465 In get_value() key:'zabbix[process,discoverer,avg,busy]'
      9985:20160312:174935.671 In evaluate_function() function:'Zabbix server:zabbix[process,discoverer,avg,busy].avg(10m)'
      9983:20160312:174939.404 __zbx_zbx_setproctitle() title:'discoverer #1 [processed 1 rules in 0.014707 sec, performing discovery]'
      9983:20160312:174939.413 In discover_service()
      9983:20160312:174939.413 discovery: item [system.uname] error: A TLS connection is configured to be used with agent but support for TLS was not compiled into server.
      9983:20160312:174939.413 End of discover_service():FAIL

    需要TLS支持(yum install -y openssl openssl-devel)  configure --with-openssl

    (2.0网络发现没有这个要求)

  • 相关阅读:
    字节序(Endian),大端(BigEndian),小端(LittleEndian)
    关于PHOTO SHOP CS9.0无法启动adobe updater 请重新安装应用程序和组件解决方法!
    工作·事业·人生
    多选列表Select之双击删除与添加Demo
    WIN7任务栏修复解决windows7任务栏不能停靠图标的问题
    ip地址被绑定,vmware无法共享上网,
    小屋·小篮子·祭
    基础知识提问:关于HashTable和List两个容器Add改变了属性的同一对象的问题
    [转载]正则表达式30分钟入门教程及MTracer(破解版)
    让程序更健壮,用错误还是抛异常?
  • 原文地址:https://www.cnblogs.com/metasequoia/p/5272116.html
Copyright © 2020-2023  润新知