Uploaded image for project: 'ZABBIX BUGS AND ISSUES'
  1. ZABBIX BUGS AND ISSUES
  2. ZBX-12705

Java Gateway generates invalid lld macro names during bean discovery

XMLWordPrintable

    • Team C
    • 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.

            vjaceslavs Vjaceslavs Bogdanovs
            Sverre Sverre Boschman
            Team C
            Votes:
            2 Vote for this issue
            Watchers:
            10 Start watching this issue

              Created:
              Updated:
              Resolved: