-
Problem report
-
Resolution: Fixed
-
Minor
-
3.4.0
-
Sprint 17, Sprint 18, Sprint 19, Sprint 20, Sprint 21
-
1
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:
Allowed symbols for LLD macro names are 0-9 , A-Z , _ , .
Lowercase letters are not supported in the names.
JMX keys can contain characters not supported by lld macro names, f.e. a dash:
jboss.as:subsystem=datasources,data-source=Example,statistics=pool
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.
- depends on
-
ZBXNEXT-4209 Java Gateway should allow discovery of MBean properties with non ASCII characters
- Closed
- is duplicated by
-
ZBX-12858 JMX beans discovery fails when JSON return illegal character for a LLD MACRO
- Closed