[ZBX-13682] jmx discovery appear error "Cannot create item: item with the same key ..." Created: 2018 Apr 02 Updated: 2018 Apr 03 Resolved: 2018 Apr 03 |
|
Status: | Closed |
Project: | ZABBIX BUGS AND ISSUES |
Component/s: | Java gateway (J) |
Affects Version/s: | 3.4.7 |
Fix Version/s: | None |
Type: | Incident report | Priority: | Major |
Reporter: | majun | Assignee: | Unassigned |
Resolution: | Workaround proposed | Votes: | 0 |
Labels: | None | ||
Remaining Estimate: | Not Specified | ||
Time Spent: | Not Specified | ||
Original Estimate: | Not Specified |
Attachments: |
![]() ![]() ![]() ![]() |
Description |
jmx discovery appear error "Cannot create item: item with the same key ..." i think discovery do not need this error |
Comments |
Comment by Andrei Gushchin (Inactive) [ 2018 Apr 02 ] |
Key should be unique by a host. So it seems item prototype is not correct and creates duplicates what is forbidden. |
Comment by richlv [ 2018 Apr 02 ] |
majun, are you attempting to discover multiple JVMs on the same host by any chance ? |
Comment by majun [ 2018 Apr 02 ] |
I not attempting to discover multiple JVMs on the same host. two Item prototypes data is normal. just jmx discovery appear error "Cannot create item: item with the same key ..." |
Comment by majun [ 2018 Apr 02 ] |
I not attempting to discover multiple JVMs on the same host. ,maxThreads]. two Item prototypes data is normal. just jmx discovery appear error "Cannot create item: item with the same key ..." |
Comment by Andrei Gushchin (Inactive) [ 2018 Apr 02 ] |
Please increase log level for java pollers and grab from the output the JSON which is used for jmx.discovery[attributes,"*:type=ThreadPool,name=*"]. I think there are some duplicates. |
Comment by majun [ 2018 Apr 02 ] |
if we can use zabbix_get to check it , and What is the format of the command。 |
Comment by Andrei Gushchin (Inactive) [ 2018 Apr 02 ] |
No zabbix_get not help here. Only parse debug log. |
Comment by majun [ 2018 Apr 02 ] |
my zabbix_java and zabbix_server is in a host and i not found Increase the log level configuration option in settings.sh. if edit increase log level for java pollers in zabbix_server.conf files? |
Comment by Alexander Vladishev [ 2018 Apr 03 ] |
majun, you should increase log level of the zabbix_server. To increase log level in run time mode you can use zabbix_server option -R. For example: zabbix_server -R log_level_increase=java\ poller |
Comment by majun [ 2018 Apr 03 ] |
thank you. but i not found error in log. |
Comment by Andrei Gushchin (Inactive) [ 2018 Apr 03 ] |
This not fit to initial problem. 59117:20180403:102003.886 JSON before sending [{"request":"java gateway jmx","jmx_endpoint":"service:jmx:rmi:///jndi/rmi://11.8.44.146:8449/jmxrmi","keys":["jmx.discovery[Catalina,\"*:type=ThreadPool,name=*\"]"]}] 59117:20180403:102003.898 JSON back [{"response":"success","data":[{"error":"invalid discovery mode: Catalina"}]}] Which error do you have for this rule? |
Comment by Glebs Ivanovskis (Inactive) [ 2018 Apr 03 ] |
Based on example outputs of jmx.discovery from the documentation I can make a conclusion that {#JMXOBJ} is not necessarily unique. Therefore your discovery rule tries to create multiple items with same keys. I think you should have a single item prototype jmx[{#JMXOBJ},{#JMXATTR}] and leave only {#JMXATTR} equal to currentThreadCount or maxThreads using LLD filters. |
Comment by majun [ 2018 Apr 03 ] |
ok i will try it. |
Comment by Glebs Ivanovskis (Inactive) [ 2018 Apr 03 ] |
Changing resolution to Workaround proposed. |