[ZBX-12705] Java Gateway generates invalid lld macro names during bean discovery Created: 2017 Sep 11 Updated: 2024 Apr 10 Resolved: 2017 Nov 21 |
|
Status: | Closed |
Project: | ZABBIX BUGS AND ISSUES |
Component/s: | Java gateway (J) |
Affects Version/s: | 3.4.0 |
Fix Version/s: | 3.4.5rc1, 4.0.0alpha1, 4.0 (plan) |
Type: | Problem report | Priority: | Minor |
Reporter: | Sverre Boschman | Assignee: | Vjaceslavs Bogdanovs |
Resolution: | Fixed | Votes: | 2 |
Labels: | jmx, lld | ||
Remaining Estimate: | Not Specified | ||
Time Spent: | Not Specified | ||
Original Estimate: | Not Specified |
Issue Links: |
|
||||||||||||||||
Team: | Team C | ||||||||||||||||
Sprint: | Sprint 17, Sprint 18, Sprint 19, Sprint 20, Sprint 21 | ||||||||||||||||
Story Points: | 1 |
Description |
The Java Gateway generates lld macro names based on JMX keys during bean discovery (JMXItemChecker.json line 268: counter.put("{#JMX" + property.getKey().toUpperCase() + "}" , property.getValue());) From lld macro documentation: JMX keys can contain characters not supported by lld macro names, f.e. a dash: The java gateway returns the following json:
trapper got '{"request":"proxy data","host":"intern-zbxproxy01","history data":[{"itemid":205773,"clock":1505134449,"ns":247214183,"value":"{\"data\":[{\"{#JMXDOMAIN}\":\"jboss.as\",\"{#JMXSUBSYSTEM}\":\"datasources\",\"{#JMXSTATISTICS}\":\"pool\",\"{#JMXOBJ}\":\"jboss.as:subsystem=datasources,data-source=Example,statistics=pool\",\"{#JMXDATA-SOURCE}\":\"Example\"}]}"}],"version":"3.4.1","clock":1505134450,"ns":367875262}'
The {#JMXDATA_SOURCE} macro is not replaced in item prototypes based on the discovery rule, unlike the {#JMXSUBSYSTEM} and {#JMXSTATISTICS} macros: In substitute_lld_macros() data:'Active connections {#JMXDATA-SOURCE} - {#JMXSUBSYSTEM} - {#JMXSTATISTICS}' End of substitute_lld_macros():SUCCEED data:'Active connections {#JMXDATA-SOURCE} - datasources - pool' Discovery rule: jmx.discovery[beans,"jboss.as:subsystem=datasources,data-source=*,statistics=pool"] Perhaps it can be documented as a known issue for 3.4 pending a fix. |
Comments |
Comment by Kaio César Nascimento Peixoto [ 2017 Sep 11 ] |
The same problem here when trying to use jmx discovery with jboss eap 6. |
Comment by Andrea Biscuola (Inactive) [ 2017 Sep 27 ] |
Successfully tested |
Comment by Vjaceslavs Bogdanovs [ 2017 Nov 10 ] |
Available in: |