[ZBX-10666] Misleading lld warning "item with the same key already exists" when not all macro defined Created: 2016 Apr 15 Updated: 2017 May 30 Resolved: 2016 Apr 18 |
|
| Status: | Closed |
| Project: | ZABBIX BUGS AND ISSUES |
| Component/s: | Server (S) |
| Affects Version/s: | 2.4.6 |
| Fix Version/s: | None |
| Type: | Incident report | Priority: | Trivial |
| Reporter: | Dmitry Sytsko | Assignee: | Unassigned |
| Resolution: | Won't fix | Votes: | 0 |
| Labels: | lld, warning | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||
| Description |
|
Short story before: - 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 |
| Comments |
| Comment by Aleksandrs Saveljevs [ 2016 Apr 18 ] |
|
The error message is correct: since there was no {#GOOD_CODE} macro, it was left unexpanded in "url.counter.response[{#GOOD_CODE}]". When Zabbix tried to create this item, the key coincided with that of the item prototype, so Zabbix could not create it. It might be that the error message could be improved by saying that "... item prototype with the same key ...", but not sure it is worth the effort. In your particular case, you might wish to use two LLD rules instead of one: a rule for good codes and a rule for bad codes. However, that is better discussed at https://www.zabbix.org/wiki/Getting_help . Therefore, closing as "Won't fix". |