zabbix_sender can't update items if hosts have been created via API

XMLWordPrintable

    • Type: Incident report
    • Resolution: Won't fix
    • Priority: Minor
    • None
    • Affects Version/s: 1.8.4, 1.8.5
    • Component/s: API (A)
    • None
    • Environment:
      OS : debian 5.0.3
      mysql : 5.1.41

      After creating a series of hosts using the api, and associating them with a template containing only item type of zabbix trapper. zabbix_sender is unable to update any of those items.

      A work around is to edit a host configuration and change something ; it can be anything (ip, dns, proxy port, "connect to" drop down menu, etc). After confirming and using zabbix_sender, the host can have it's items updated.

      Unfortunatly, a massive update on the hosts does not work, so does exporting all the hosts and re-importing them after doing a simple change. The only way the work around works is by going single handly on every host files.

      I'm using a perl module to interface with the api. Here's the code I've been using to create the hosts :

      my $z = Net::Zabbix->new($url,$user,$password);
      
      my @lines = read_file('hostlist.log');
      
      foreach my $hostname (@lines){
          my $host = $z->create('host',{host => $hostname, useip => '1', groups => [{groupid => '8'}], templates => [{templateid =>'10085'}]});
      }
      

            Assignee:
            Unassigned
            Reporter:
            Guillaume Douté
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: