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

Duplicate Host Creation using Auto Registration + API

    XMLWordPrintable

Details

    • Incident report
    • Status: Closed
    • Minor
    • Resolution: Duplicate
    • None
    • None
    • API (A), Server (S)
    • 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

              Unassigned Unassigned
              LarryDorman Larry Dorman
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: