ZABBIX BUGS AND ISSUES
  1. ZABBIX BUGS AND ISSUES
  2. ZBX-12705

Java Gateway generates invalid lld macro names during bean discovery

    Details

    • 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:
      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.

        Issue Links

          Activity

          Hide
          Kaio César Nascimento Peixoto added a comment -

          The same problem here when trying to use jmx discovery with jboss eap 6.

          Show
          Kaio César Nascimento Peixoto added a comment - The same problem here when trying to use jmx discovery with jboss eap 6.
          Hide
          Andrea Biscuola added a comment -

          Successfully tested

          Show
          Andrea Biscuola added a comment - Successfully tested
          Hide
          Vjaceslavs Bogdanovs added a comment -

          Available in:
          3.4.5rc1 74425
          4.0.0alpha1 (trunk) 74426

          Show
          Vjaceslavs Bogdanovs added a comment - Available in: 3.4.5rc1 74425 4.0.0alpha1 (trunk) 74426

            People

            • Assignee:
              Vjaceslavs Bogdanovs
              Reporter:
              Sverre Boschman
            • Votes:
              2 Vote for this issue
              Watchers:
              9 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Agile