[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: |
|
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 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. 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 |