[ZBX-13390] Zabbix Discovery Rule - Error for duplicate item prototype key gets lost when difference in upper / lower case Created: 2018 Jan 24  Updated: 2018 Mar 18  Resolved: 2018 Mar 18

Status: Closed
Project: ZABBIX BUGS AND ISSUES
Component/s: None
Affects Version/s: 2.2.21
Fix Version/s: None

Type: Incident report Priority: Minor
Reporter: Stefan Moser Assignee: Unassigned
Resolution: Won't fix Votes: 0
Labels: templates
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: JPEG File discovery_error_process_process.JPG     Text File example_calls.txt     JPEG File items_available_Process_process2.JPG     JPEG File items_missing_Process_process.JPG     JPEG File no_discovery_error_Process_process.JPG     XML File zbx_export_templates.xml    

 Description   

Please find an example template with a discovery rule attached.

Steps to reproduce:

  1. Import the attached discovery template.
  2. Create a host and attach the imported TMPL:APPL:Windows:Mona:Test template
  3. Send a discovery for the host via zabbix sender for the key: ifx.mona.discovery.processes that contains the following data:
    {\"data\":[{\"{#NAME}\":\"Process.exe\",\"{#NAME_WITHOUT_EXTENSION}\":\"Process\"}, {\"{#NAME}\":\"process\",\"{#NAME_WITHOUT_EXTENSION}\":\"process\"} ]}
    

Full example call:

./zabbix_sender --zabbix-server <zbxserver> --host TEMPLATE_TEST_HOST --key ifx.mona.discovery.processes --value "{\"data\":[{\"{#NAME}\":\"Process.exe\",\"{#NAME_WITHOUT_EXTENSION}\":\"Process\"}, {\"{#NAME}\":\"process\",\"{#NAME_WITHOUT_EXTENSION}\":\"process\"} ]}" --verbose

Result:
The 3 perf_counter["\Process({#NAME_WITHOUT_EXTENSION}) items are missing due to an internal zabbix error
--> the #NAME_WITHOUT_EXTENSION leads to a duplicate key, but the error is not reflected in Zabbix

Expected:
The discovery rule should be marked with an error (as shown in the attached image: no_discovery_error_Process_process)

Note:
When the upper / lower case of the macro is the same the error works -> shown in the other example image: discovery_error_process_process

Easy to reprodue by changing the call to:

{\"data\":[{\"{#NAME}\":\"Process.exe\",\"{#NAME_WITHOUT_EXTENSION}\":\"process\"}, {\"{#NAME}\":\"process\",\"{#NAME_WITHOUT_EXTENSION}\":\"process\"} ]}


 Comments   
Comment by Stefan Moser [ 2018 Jan 24 ]

I noticed that the example calls got lost in translation after ticket creation - i added a txt that contains the example calls.

Comment by Glebs Ivanovskis (Inactive) [ 2018 Jan 27 ]

I doubt this issue will be fixed in 2.2, it's in limited support status now.

Comment by Alexander Vladishev [ 2018 Mar 18 ]

Your database is not configured as case-sensitive. You need use utf8_bin collate instead of *_ci.

See documentation for more details.

You can also open the log file of the Zabbix server and see the corresponding errors. Something like:

 22238:20180318:233156.722 [Z3005] query failed: [1062] Duplicate entry '10106-perf_counter["\Process(process)\% Processor Time",15]' for key 'items_1' [insert into items (itemid,name,key_,hostid,type,value_type,data_type,delay,delay_flex,history,trends,status,trapper_hosts,units,multiplier,delta,formula,logtimefmt,valuemapid,params,ipmi_sensor,snmp_community,snmp_oid,port,snmpv3_securityname,snmpv3_securitylevel,snmpv3_authprotocol,snmpv3_authpassphrase,snmpv3_privprotocol,snmpv3_privpassphrase,authtype,username,password,publickey,privatekey,description,interfaceid,flags,snmpv3_contextname) values (23702,'Process.exe Process: CPU usage in % Agent','perf_counter["\\Process(Process)\\% Processor Time",15]',10106,7,0,0,300,'',7,365,0,'','%',0,0,'1','',null,'','','','','','',0,0,'',0,'',0,'','','','','',null,4,''),(23703,'process Process: CPU usage in % Agent','perf_counter["\\Process(process)\\% Processor Time",15]',10106,7,0,0,300,'',7,365,0,'','%',0,0,'1','',null,'','','','','','',0,0,'',0,'',0,'','','','','',null,4,'');
]

I close this issue as "Won't Fix".

Generated at Wed Jun 03 19:55:57 EEST 2026 using Jira 10.3.18#10030018-sha1:5642e4ad348b6c2a83ebdba689d04763a2393cab.