[ZBX-6273] Document jmx.discovery item Created: 2013 Feb 15  Updated: 2017 May 30  Resolved: 2014 Apr 10

Status: Closed
Project: ZABBIX BUGS AND ISSUES
Component/s: Documentation (D)
Affects Version/s: 2.0.4
Fix Version/s: None

Type: Incident report Priority: Trivial
Reporter: Javier Barroso Assignee: Unassigned
Resolution: Duplicate Votes: 6
Labels: javagateway
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Duplicate
duplicates ZBXNEXT-1223 JMX items LLD discovery Closed

 Description   

Hello,

While I was preparing jmx monitorization, I saw in the code and in one forum in internet "jmx.discovery" key. But I cannot find any reference in the documentation.

Thank you very much



 Comments   
Comment by Marc [ 2013 Dec 31 ]

Recently asked on IRC.

The key jmx.discovery returns a json object including these macros (for all objects, not only the examples below!):

{"data": [
  {
    "{#JMXATTR}": "ImplementationVendor",
    "{#JMXDESC}": "the JMX implementation vendor (the vendor of this product).",
    "{#JMXOBJ}": "JMImplementation:type=MBeanServerDelegate",
    "{#JMXTYPE}": "java.lang.String",
    "{#JMXVALUE}": "Sun Microsystems"
  },
  {
    "{#JMXATTR}": "HeapMemoryUsage.init",
    "{#JMXDESC}": "java.lang:type=Memory,HeapMemoryUsage.init",
    "{#JMXOBJ}": "java.lang:type=Memory",
    "{#JMXTYPE}": "java.lang.Long",
    "{#JMXVALUE}": "47445376"
  }
]}

Since jmx.discovery returns all objects a proper filter within the discovery rule is needed for almost any scenario.

Example for discovering memory pools:
Filter macro:

{#JMXOBJ}

Filter Regexp: ^java.lang:type=MemoryPool,

Anyhow, jmx.discovery with the current implementation of unique key constraint (see ZBXNEXT-1606) is practically useless.
Possibly that's the reason why it's not mentioned in the documentation yet.

Related issues that request improvement of jmx.discovery:

Comment by Aleksandrs Saveljevs [ 2014 Apr 10 ]

Item "jmx.discovery" in its current form was meant solely for development and testing purposes, and is not useful for general public, because it returns all the objects it can find. This is the reason it is not documented.

ZBXNEXT-1223 strives to improve the item to make it useful. We shall document the new functionality that will appear under that issue, so closing this issue as a duplicate.

Generated at Thu Apr 25 11:54:09 EEST 2024 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.