Uploaded image for project: 'ZABBIX BUGS AND ISSUES'
  1. ZABBIX BUGS AND ISSUES
  2. ZBX-10926

Host auto-registration does not work

XMLWordPrintable

    • Icon: Incident report Incident report
    • Resolution: Won't fix
    • Icon: Major Major
    • None
    • 3.2.0alpha1
    • Frontend (F)
    • None
    • zabbix_server (Zabbix) 3.1.0
      Revision 60696 15 February 2016, compilation time: Jun 20 2016 13:25:42

      I'm trying to setup host auto-registration, but zabbix does not register them

      Debug output from server log:

      20829:20160621:171608.579 trapper got '{"request":"active checks","host":"puppet","host_metadata":"Linux 4.4.0-24-generic [VMware, Inc.]","ip":"172.16.11.19"}'
       20829:20160621:171608.579 In send_list_of_active_checks_json()
       20829:20160621:171608.579 In get_hostid_by_host() host:'puppet'
       20829:20160621:171608.580 query [txnlev:0] [select hostid,status,tls_accept,tls_issuer,tls_subject,tls_psk_identity from hosts where host='puppet' and status in (0,1) and flags<>2 and proxy_hostid is null]
       20829:20160621:171608.585 query [txnlev:1] [begin;]
       20829:20160621:171608.585 query [txnlev:1] [select autoreg_hostid from autoreg_host where proxy_hostid is null and host='puppet']
       20829:20160621:171608.586 query [txnlev:1] [update autoreg_host set listen_ip='172.16.11.19',listen_dns='puppet.matrix',listen_port=10050,host_metadata='Linux 4.4.0-24-generic [VMware, Inc.]' where autoreg_hostid=5]
       20829:20160621:171608.586 In process_events() events_num:1
       20829:20160621:171608.587 In DCget_nextid() table:'events' num:1
       20829:20160621:171608.587 query [txnlev:1] [select max(eventid) from events where eventid between 0 and 9223372036854775807]
       20829:20160621:171608.588 End of DCget_nextid() table:'events' [33776:33776]
       20829:20160621:171608.588 query [txnlev:1] [insert into events (eventid,source,object,objectid,clock,ns,value) values (33776,2,3,5,1466518568,0,1);
      ]
       20829:20160621:171608.588 In process_actions() events_num:1
       20829:20160621:171608.589 In zbx_dc_get_actions_eval()
       20829:20160621:171608.589 End of zbx_dc_get_actions_eval() actions:1
       20829:20160621:171608.589 In check_action_conditions() actionid:9
       20829:20160621:171608.589 In check_action_condition() actionid:9 conditionid:13 cond.value:'Linux' cond.value2:''
       20829:20160621:171608.589 In check_auto_registration_condition()
       20829:20160621:171608.589 query [txnlev:1] [select host_metadata from autoreg_host where autoreg_hostid=5]
       20829:20160621:171608.590 End of check_auto_registration_condition():SUCCEED
       20829:20160621:171608.590 End of check_action_condition():SUCCEED
       20829:20160621:171608.590 In check_action_condition() actionid:9 conditionid:14 cond.value:'VMware' cond.value2:''
       20829:20160621:171608.590 In check_auto_registration_condition()
       20829:20160621:171608.590 query [txnlev:1] [select host_metadata from autoreg_host where autoreg_hostid=5]
       20829:20160621:171608.590 End of check_auto_registration_condition():SUCCEED
       20829:20160621:171608.590 End of check_action_condition():SUCCEED
       20829:20160621:171608.590 End of check_action_conditions():SUCCEED
       20829:20160621:171608.591 In DCget_nextid() table:'escalations' num:1
       20829:20160621:171608.591 query [txnlev:1] [select max(escalationid) from escalations where escalationid between 0 and 9223372036854775807]
       20829:20160621:171608.591 End of DCget_nextid() table:'escalations' [1:1]
       20829:20160621:171608.591 In execute_operations() actionid:9
       20829:20160621:171608.592 query [txnlev:1] [select o.operationtype,g.groupid,t.templateid,oi.inventory_mode from operations o left join opgroup g on g.operationid=o.operationid left join optemplate t on t.operationid=o.operationid left join opinventory oi on oi.operationid=o.operationid where o.actionid=9]
       20829:20160621:171608.592 End of execute_operations()
       20829:20160621:171608.592 query [txnlev:1] [insert into escalations (escalationid,actionid,status,triggerid,itemid,eventid,r_eventid) values (1,9,0,null,null,33776,null);
      ]
       20829:20160621:171608.592 End of process_actions()
       20829:20160621:171608.592 In DBupdate_itservices()
       20829:20160621:171608.592 End of DBupdate_itservices():SUCCEED
       20829:20160621:171608.592 End of process_events()
       20829:20160621:171608.593 query [txnlev:1] [commit;]
       20829:20160621:171608.595 End of get_hostid_by_host():FAIL
       20829:20160621:171608.595 cannot send list of active checks to "172.16.11.19": host [puppet] not found
       20829:20160621:171608.595 send_list_of_active_checks_json() sending [{"response":"failed","info":"host [puppet] not found"}]
       20829:20160621:171608.595 End of send_list_of_active_checks_json():SUCCEED
      

      I've tried to run

      select o.operationtype,g.groupid,t.templateid,oi.inventory_mode from operations o left join opgroup g on g.operationid=o.operationid left join optemplate t on t.operationid=o.operationid left join opinventory oi on oi.operationid=o.operationid where o.actionid=9;
      

      and got output:

      operationtype groupid templateid inventory_mode
      4 NULL NULL NULL
      6 NULL NULL NULL

      Also if i tried to update auto-registration action, i got errors:

      Undefined index: groupids [ in actionconf.php:149]
      Invalid argument supplied for foreach() [ in actionconf.php:149]
      Undefined index: templateids [ in actionconf.php:160]
      Invalid argument supplied for foreach() [ in actionconf.php:160]
      Operation has no group to operate.
      

      and

      Undefined index: groupids [actionconf.php:678 ? CView->render() ? include() ? getActionOperationDescriptions() in include/actions.inc.php:442]
      Invalid argument supplied for foreach() [actionconf.php:678 ? CView->render() ? include() ? getActionOperationDescriptions() in include/actions.inc.php:442]
      Undefined index: templateids [actionconf.php:678 ? CView->render() ? include() ? getActionOperationDescriptions() in include/actions.inc.php:449]
      Invalid argument supplied for foreach() [actionconf.php:678 ? CView->render() ? include() ? getActionOperationDescriptions() in include/actions.inc.php:449]
      Undefined index: groupids [actionconf.php:678 ? CView->render() ? include() ? getActionOperationDescriptions() in include/actions.inc.php:627]
      Invalid argument supplied for foreach() [actionconf.php:678 ? CView->render() ? include() ? getActionOperationDescriptions() in include/actions.inc.php:627]
      Undefined index: templateids [actionconf.php:678 ? CView->render() ? include() ? getActionOperationDescriptions() in include/actions.inc.php:649]
      Invalid argument supplied for foreach() [actionconf.php:678 ? CView->render() ? include() ? getActionOperationDescriptions() in include/actions.inc.php:649]
      

            Unassigned Unassigned
            olfway Pavel Volkovitskiy
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: