Ad Widget

Collapse

Bulk add of 700 hosts to zabbix

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • georgew
    Member
    • Mar 2008
    • 50

    #1

    Bulk add of 700 hosts to zabbix

    I have 700 hosts to add to zabbix.

    It is not possible to do this by IP range, as the IP ranges are not unique to these hosts. These systems are served IP addresses by DHCP, and other similar hosts will be in those ranges.

    I can produce a list of DNS names of the hosts, but I need some method of automating the creation of these 700+ hosts, and applying a common template to these.

    I understand we have an XML import capability. What is the format for this XML import? Is there a command line tool?
  • Aly
    ZABBIX developer
    • May 2007
    • 1126

    #2
    1. Structure of XML you can see by exporting any host..
    2. In ZABBIX 1.8, there will be JSON API available.
    Zabbix | ex GUI developer

    Comment

    • georgew
      Member
      • Mar 2008
      • 50

      #3
      Ok, I am now able to freely add large groups of hosts to zabbix.

      However I have found a problem that I believe is a bug.

      If I export a host that is in several groups, the xml for the groups looks like this:

      - <groups>
      <group>Carts</group>
      <group>UMCB SHIVERS Carts</group>
      <group>UMCB Carts</group>
      <group>UMCB SERVICES Carts</group>
      <group>UMCB RT Carts</group>
      </groups>

      If the group does not exist already, I get an error.

      For host, item, trigger and graph I have options to add or skip. For group there is no option to add or skip.

      This means moving large blocks of systems from one zabbix system to another is difficult, as groups cannot be imported in the XML, but they can clearly be exported.

      When moving data from one system to another using the XML import/export, it seems like groups could be part of that process.

      Comment

      • vinny
        Senior Member
        • Jan 2008
        • 145

        #4
        u can try a bulk insert directly in the DB for groups.

        vinny
        -------
        Zabbix 1.8.3, 1200+ Hosts, 40 000+ Items...zabbix's everywhere

        Comment

        Working...