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

JMX - problem with tabular data


    • S24-W8/9, S24-W10/11, S24-W12/13, S24-W14/15
    • 4

      I'm trying to retrieve data from composite attribute LastGcInfo (domain: java.lang, bean: java.lang:name=G1 Young Generation,type=GarbageCollector), but it seems like not all data from this attribute is properly discovered or accessible by Zabbix.  

      There is no problem getting values for top-level composite data, such as LastGcInfo.GcThreadCount or LastGcInfo.id, but when it comes to more complex tabular data, Zabbix either doesn't detect it at all or (when asked explicitly) returns errors.

      File GarbColAttrs_Zabbix lists all attributes detected by Zabbix, for comparison file GarbColAttrs_JMXterm lists all parameters for the LastGcInfo attribute seen in JMXterm tool. Only simple parameters (i.e. starttime, endtime, duration, id, GcThreadCount) overlap, more complex data is not existant from Zabbix perspective.

      I've tried various combinations of paths in Zabbix item key, but in each case, depending on the length of the path, I've received different errors.


      Key Error
      • jmx["java.lang:type=GarbageCollector,name=G1 Young Generation","LastGcInfo.memoryUsageBeforeGc.Metaspace.value.used"]
      • jmx["java.lang:type=GarbageCollector,name=G1 Young Generation","LastGcInfo.memoryUsageBeforeGc.Metaspace.value"]
      • jmx["java.lang:type=GarbageCollector,name=G1 Young Generation","LastGcInfo.memoryUsageBeforeGc.Metaspace"]
      • jmx["java.lang:type=GarbageCollector,name=G1 Young Generation","LastGcInfo.memoryUsageBeforeGc.Metaspace.['value']"]
      unsupported data object type along the path: class javax.management.openmbean.TabularDataSupport
      • jmx["java.lang:type=GarbageCollector,name=G1 Young Generation","LastGcInfo.memoryUsageBeforeGc"]
      • jmx["java.lang:type=GarbageCollector,name=G1 Young Generation","LastGcInfo"]
      Data object type cannot be converted to string.
      jmx["java.lang:type=GarbageCollector,name=G1 Young Generation","LastGcInfo.*"] Argument key="*" is not an existing item name for this CompositeData instance.

      Referring to ZBXNEXT-2727 support for tabular data should be possible from version 5.0.0, but it looks like this support is not complete.

      How to correctly retrieve data from nested parameters?
      If inability to pass through nested tables is not a bug (or is już not possible), would it be possible to return whole table in such cases?  In that case, it wolud be possible to extract the neccesary data via preprocessing in Zabbix.

      Steps to reproduce:

      • Install Tomcat and enable its default sample application
      • Communicate it with Zabbix Server via Zabbix Java Gateway
      • Try to discover attributes for Garbage Collector

            JMX agent, key: jmx.discovery[attributes,"*:type=GarbageCollector,name=*"]       

      • Try to get data from specific attribute

             JMX agent, e.g. key: jmx["java.lang:type=GarbageCollector,name=G1 Young Generation","LastGcInfo.memoryUsageBeforeGc.Metaspace.value.used"]

      Thanks in advance for help.

            dimir dimir
            jacek kupski Jacek
            Team A
            9 Vote for this issue
            10 Start watching this issue