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

Duplicate Host Creation using Auto Registration + API

    Details

    • Type: Incident report
    • Status: Closed
    • Priority: Minor
    • Resolution: Duplicate
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: API (A), Server (S)
    • Environment:
      Duplicated on Zabbix Server, Proxy, and Agent version 2.4.8, but probably possible in all 2.x+ versions. All LInux environment. MySQL db.

      Description

      I have automated my host creation by having a Chef recipe install the agent and call the Zabbix API to create and configure my hosts. However, I also had a leftover Auto Registration rule that matched the metadata. I ended up with two hosts with the exact same name added to the DB.

      This seems to be a race condition of some sort. See attached debug level 4 server log.

      Setting this as minor since few people are going to encounter this situation and it's easily avoided by getting rid of the auto registration rule. Mostly wanted to make you aware of a path to having duplicate hosts in case it suggests other concerns.

      +--------+--------------+--------------------------+--------+--------------------------+-------+------------+-------------------------------------------------+
      | hostid | proxy_hostid | host                     | status | name                     | flags | templateid | description                                     |
      +--------+--------------+--------------------------+--------+--------------------------+-------+------------+-------------------------------------------------+
      |  10425 |        10237 | duplicate.test.server.us |      0 | duplicate.test.server.us |     0 |       NULL | Managed by Chef - Any changes will be reverted. |
      |  10427 |        10237 | duplicate.test.server.us |      0 | duplicate.test.server.us |     0 |       NULL |                                                 |
      +--------+--------------+--------------------------+--------+--------------------------+-------+------------+-------------------------------------------------+
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                LarryDorman Larry Dorman
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: