Uploaded image for project: 'ZABBIX FEATURE REQUESTS'
  2. ZBXNEXT-2231

[Patch] Implement bulk retrieval for JMX items



      Currently the Java gateway sends a separate JMX getAttribute() request for each item. This is quite wasteful, as JMX supports bulk retrieval via getAttributes(). Furthermore, for items from composite objects the gateway currently ends up requesting the exact same object multiple times (in our case we literally have about 100 items in one composite object, so the object is being fetched 100 times, forcing us to add special caching on the server for this object). The result of this is a noticeable load on our monitored servers.

      The attached patch implements bulk retrieval in the gateway, including for discovered items. The approach is basically:
      1. group all requested items by jmx-object (so we can do a bulk attribute retrieval for each), and for each jmx-object collect the list of (top-level) attributes (so composite objects are only retrieved once)
      2. if discovery is requested, do discovery and add those items to the groupings from the previous step
      3. for each jmx-object do a bulk retrieval of all requested attributes
      4. generate the response by extracting the value for each item from the retrieved data in the previous step

      This is working in our production and has noticeably lowered the load on both the monitored servers and zabbix.

      A further enhancement would be improve the zabbix poller to submit requests for items in the same jmx-object in one go, similar to what was discussed for SNMP in ZBXNEXT-98 .

      The patch is against branches/2.2 r43648.




            • Assignee:
              roadrunner A B
            • Votes:
              1 Vote for this issue
              4 Start watching this issue


              • Created: