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

Misleading lld warning "item with the same key already exists" when not all macro defined

XMLWordPrintable

    • Icon: Incident report Incident report
    • Resolution: Won't fix
    • Icon: Trivial Trivial
    • None
    • 2.4.6
    • Server (S)

      Short story before:
      I need to monitor count different http response codes for url provided by my application.
      For this case I want to create lld rule which will create following items prototypes:

       - url.counter.response[{#GOOD_CODE}]
       - url.counter.response[{#BAD_CODE}] + trigger prototype
      

      So my lld rule reply looks like:

       {"data":[
      {"{#GOOD_CODE}": "200", "{#BAD_CODE}": "403"},
      {"{#BAD_CODE}": "404"}]}
      

      But since second json object doesn't have {#GOOD_CODE}" macro, zabbix show error:

      Cannot create item: item with the same key "url.counter.response[{#GOOD_CODE}]" already exists.

      I found this error message very misleading and think that it shouldn't be shown because:

      items like key_name[{#MACRO}] are created by default in lld rule, and items (in my case) url.counter.response[200], url.counter.response[403], url.counter.response[404] were successfully created too

            Unassigned Unassigned
            dmitrys Dmitry Sytsko
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: