-
New Feature Request
-
Resolution: Unresolved
-
Minor
-
None
-
2.2.15
-
Prod
Hello,
We required additional functionality within the the Java Gateway to allow JMX Discovery rules with wildcards which allows limiting of the data returned from the JMX request.
This allows us to write Discovery rules as follows.
jmx.discovery["org.mongodb.driver:clusterId=*,host=*,port=*,type=ConnectionPool"]
With item prototypes
jmx["{#JMXOBJ}",CheckedOutCount]
jmx["{#JMXOBJ}",MaxSize]
jmx["{#JMXOBJ}",Size]
jmx["{#JMXOBJ}",WaitQueueSize]
Which provide final host items of
jmx["org.mongodb.driver:clusterId=580860194994c505434e9ed7,host=host04.gst-men,port=27017,type=ConnectionPool",CheckedOutCount]
jmx["org.mongodb.driver:clusterId=580860194994c505434e9ed7,host=host04.gst-men,port=27017,type=ConnectionPool",MaxSize]
jmx["org.mongodb.driver:clusterId=580860194994c505434e9ed7,host=host04.gst-men,port=27017,type=ConnectionPool",Size]
jmx["org.mongodb.driver:clusterId=580860194994c505434e9ed7,host=host04.gst-men,port=27017,type=ConnectionPool",WaitQueueSize]
jmx["org.mongodb.driver:clusterId=580860194994c505434e9ed7,host=host05.gst-men,port=27017,type=ConnectionPool",CheckedOutCount]
jmx["org.mongodb.driver:clusterId=580860194994c505434e9ed7,host=host05.gst-men,port=27017,type=ConnectionPool",MaxSize]
jmx["org.mongodb.driver:clusterId=580860194994c505434e9ed7,host=host06.gst-men,port=27017,type=ConnectionPool",CheckedOutCount]
Additionally we have added the support for Java Maps in exposed JMX attributes.
An example item would be as follows.
jmx["com.gamesparks.jmx:name=AnalysisService",LogCounts.sendMessage]
#JMX returned data
"com.gamesparks.jmx:name=AnalysisService" LogCounts
10/20/2016 12:51:10 +0000 org.archive.jmx.Client LogCounts:
We have been running this code on the Java gateway for over a year with no issues. Originally written for zabbix 2.2.9 and now ported to 2.2.15.
We generated the attached patch file from the source code available http://sourceforge.net/projects/zabbix/files/ZABBIX%20Latest%20Stable/2.2.15/zabbix-2.2.15.tar.gz/download
JMXItemChecker.java.orig - The original file.
JMX.patch - The patch file
JMXItemChecker.java - The patched version of the file from 2.2.15
This maybe related to https://support.zabbix.com/browse/ZBXNEXT-1223
In the future(next few months) we plan to upgrade to Zabbix 3.0LTS.
Thank you for building the core of our monitoring platform. Keep up the good work!
Cheers,
Luke
- duplicates
-
ZBXNEXT-1223 JMX items LLD discovery
- Closed