Ad Widget

Collapse

Active agent auto-registration -> End of get_hostid_by_host():FAIL

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Makc666
    Junior Member
    • Oct 2012
    • 12

    #1

    Active agent auto-registration -> End of get_hostid_by_host():FAIL

    Active agent auto-registration -> End of get_hostid_by_host():FAIL
    1. Configuration -> Actions
    2. Event source -> Auto Registration
    3. The Action is created:
    4. Name: Mail Servers
    5. Conditions: none
    6. Operations:
      • Add host
      • Add to host groups: Mail Servers
      • Link to templates: Template OS FreeBSD
  • zabbix_agentd.conf
    Code:
    ############ GENERAL PARAMETERS #################
    PidFile=/var/run/zabbix/zabbix_agentd.pid
    LogFile=/var/log/zabbix/zabbix_agentd.log
    SourceIP=123.123.123.123
    Server=100.100.100.100
    ListenPort=10050
    ListenIP=123.123.123.123
    StartAgents=3
    ServerActive=100.100.100.100
    Hostname=mail.testhost.com
Last edited by Makc666; 29-10-2012, 00:22.
  • Makc666
    Junior Member
    • Oct 2012
    • 12

    #2
    And here is the error...
    • zabbix_server.log
      Code:
       98154:20121027:221338.710 Trapper got [{
      	"request":"active checks",
      	"host":"mail.testhost.com",
      	"ip":"123.123.123.123"}] len 80
       98154:20121027:221338.710 In send_list_of_active_checks_json()
       98154:20121027:221338.710 In get_hostid_by_host() host:'mail.testhost.com'
       98154:20121027:221338.710 query [txnlev:0] [select hostid,status from hosts where host='mail.testhost.com' and status in (0,1) and proxy_hostid is null and hostid between 1500000000000000 and 1599999999999999]
       98154:20121027:221338.711 query [txnlev:1] [begin;]
       98154:20121027:221338.711 query [txnlev:1] [select autoreg_hostid from autoreg_host where proxy_hostid is null and host='mail.testhost.com' and autoreg_hostid between 1500000000000000 and 1599999999999999]
       98154:20121027:221338.711 query [txnlev:1] [update autoreg_host set listen_ip='123.123.123.123',listen_dns='mail.starnet.ru',listen_port=10050 where autoreg_hostid=1501500000000003]
       98154:20121027:221338.712 In process_event() eventid:0 object:3 objectid:1501500000000003 value:1 value_changed:0
       98154:20121027:221338.712 In add_trigger_info()
       98154:20121027:221338.712 End of add_trigger_info():SUCCEED
       98154:20121027:221338.712 In DBget_nextid() tablename:'events'
       98154:20121027:221338.712 query [txnlev:1] [select nextid from ids where nodeid=15 and table_name='events' and field_name='eventid']
       98154:20121027:221338.712 query [txnlev:1] [update ids set nextid=nextid+1 where nodeid=15 and table_name='events' and field_name='eventid']
       98154:20121027:221338.712 query [txnlev:1] [select nextid from ids where nodeid=15 and table_name='events' and field_name='eventid']
       98154:20121027:221338.712 End of DBget_nextid():1500000000000219 table:'events' recid:'eventid'
       98154:20121027:221338.712 query [txnlev:1] [insert into events (eventid,source,object,objectid,clock,ns,value,value_changed) values (1500000000000219,2,3,1501500000000003,1351361618,0,1,0)]
       98154:20121027:221338.713 In process_actions() eventid:1500000000000219
       98154:20121027:221338.713 query [txnlev:1] [select actionid,evaltype from actions where status=0 and eventsource=2 and actionid between 1500000000000000 and 1599999999999999]
       98154:20121027:221338.713 End of process_actions()
       98154:20121027:221338.713 End of process_event():SUCCEED
       98154:20121027:221338.713 query [txnlev:1] [commit;]
      [B] 98154:20121027:221338.714 End of get_hostid_by_host():FAIL
       98154:20121027:221338.714 cannot send list of active checks to [123.123.123.123]: host [mail.testhost.com] not found
       98154:20121027:221338.714 send_list_of_active_checks_json() sending [{
      	"response":"failed",
      	"info":"host [mail.testhost.com] not found"}][/B]
       98154:20121027:221338.714 End of send_list_of_active_checks_json():SUCCEED

    Comment

    • Makc666
      Junior Member
      • Oct 2012
      • 12

      #3
      The key of the problem was found...

      Really, the problem was in:
      zabbix_server.conf

      And in line:
      Code:
      NodeID=15
      When the setup was made no attention was made to the manual page:
      Zabbix documentation -> 2.2 -> 14. Distributed monitoring -> 2 Nodes

      As the result no command was run during server's setup:
      Code:
      ./zabbix_server -n <node id> -c /usr/local/etc/zabbix_server.conf
      The problem can be solved in two way:
      1. Remove line:
        Code:
        NodeID=15
        or set to default:
        Code:
        NodeID=0
      2. Stop server and run the above command from the manual zabbix_server -n <node id>


      If will be nice if some one will add a NOTE about this one into zabbix_server.conf for section:

      Code:
      ############ GENERAL PARAMETERS #################
      
      ### Option: NodeID
      #       Unique NodeID in distributed setup.
      #       0 - standalone server
      #
      # Mandatory: no
      # Range: 0-999
      # Default:
      # NodeID=0
      I will post a note to JIRA later.

      Comment

      • Working...