Ad Widget

Collapse

Double hosts after the second Import procedure

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Lufa
    Member
    • Jul 2007
    • 46

    #1

    Double hosts after the second Import procedure

    When you are tying to import the same XML file (or other XML file butt with the same hosts) - two hosts will be created. They looks exactly the same.

    When you will try to import it for the third time - nothing happened (the same host no. 3 will not appear).

    Zabbix 1.5.4 (nightly build from 02.09.08).

    Import parametres:
    Hosts: Existing-Update, New-Add.

    Thank you.
    Last edited by Lufa; 10-09-2008, 10:56.
  • pgillan
    Junior Member
    • Aug 2008
    • 3

    #2
    Duplicate hosts after import

    I'm getting the same results in 1.6. Deleting either one of the duplicate entries results in both items being deleted.

    Comment

    • Lufa
      Member
      • Jul 2007
      • 46

      #3
      Yes, me too.

      Comment

      • pgillan
        Junior Member
        • Aug 2008
        • 3

        #4
        Duplicate hosts after import

        After a little more research, I found that the servers only show up as duplicates when viewing the Configuration > Hosts page, when viewing a particular group. When viewign the list of servers with "Group" set to "All", there were no duplicates, and there were no duplicate records in the "hosts" table in the database.

        What appears to be happening is that an extra record is being added to the hosts_groups table, the table that defines lists of what servers are in what groups. The server is listed twice, in the same group.

        Running the following SQL statement against the zabbix database after an import seems to be a valid workaround until this is fixed:
        delete hg1 from hosts_groups hg1, hosts_groups hg2 where hg1.hostid=hg2.hostid and hg1.groupid=hg2.groupid and hg1.hostgroupid > hg2.hostgroupid;

        Comment

        Working...