[ZBXNEXT-1307] Add field for manual entry of jmx-url instance name, instead of hardcoded "jmxrmi". Created: 2012 Jul 11  Updated: 2014 Mar 11  Resolved: 2012 Jul 12

Status: Closed
Project: ZABBIX FEATURE REQUESTS
Component/s: Java gateway (J)
Affects Version/s: 2.0.0, 2.0.1
Fix Version/s: None

Type: Change Request Priority: Major
Reporter: Zbigniew Tokarczyk Assignee: Unassigned
Resolution: Duplicate Votes: 0
Labels: agent, items, javagateway, jmx
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

ALL


Issue Links:
Duplicate
duplicates ZBXNEXT-1274 Configurable JMX Endpoint Closed

 Description   

Now the jmx-url has hard coded suffix with instance name as '/jmxrmi'. That works in most simple scenarios, but sometimes it is needed to distinguish between application instances that are running on same jmx port.
The case is for example Apache ESB, that can run child instances under different names, and the default url ends with '/karaf-root' - see http://fusesource.com/docs/esb/4.4.1/esb_migration/ESBMigrationConfig-JMX.html

The change should be fairly simple - change the '/jmxrmi' suffix for some new field defined in monitored jmx item.

File to be edited: src/zabbix_java/src/com/zabbix/gateway/JMXItemChecker.java: variable url



 Comments   
Comment by Zbigniew Tokarczyk [ 2012 Jul 11 ]

I've digged into the java gateway code a little, and I see that all jmx items are queried in one step.
I wonder how this can be solved if all monitored application/instances would use same items - don't these need to have unique names at one host? Would we need to separate them to different quasi-hosts or change item names for each instance?

Maybe one can use ie. DNS name in host- jmx interface definition for quick'n'dirty hack to query different instances?

Comment by Zbigniew Tokarczyk [ 2012 Jul 11 ]

I've managed to use DNS name of jmx interface to store whole jmx service address and then use it directly in JMXItemChecker class. Unfortunately since zabbix web interface checks DNS field validity it needs to be updated directly in DB - not very convienient solution.

Maybe it would be good to add this application instance name, as part of item key - then we would have unique keys for host? Then run JMXItemChecker queries for all of the items filtered by this instance name subkey. Something like: jmx["java.lang:type=Runtime",VmVersion]"inst_name=XYZ", then splik keys by '' and create lists for each of instances.

Comment by richlv [ 2012 Jul 11 ]

i assume this is the same as ZBXNEXT-1274 - please reopen if not

Generated at Sat Apr 20 07:29:45 EEST 2024 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.