[ZBXNEXT-4583] Java Gateway not generates valid lld macro names during bean discovery Created: 2018 Jun 01 Updated: 2019 Nov 29 Resolved: 2018 Jul 10 |
|
Status: | Closed |
Project: | ZABBIX FEATURE REQUESTS |
Component/s: | Java gateway (J) |
Affects Version/s: | None |
Fix Version/s: | None |
Type: | Change Request | Priority: | Minor |
Reporter: | Tomáš Heřmánek | Assignee: | Unassigned |
Resolution: | Duplicate | Votes: | 2 |
Labels: | javagateway, jmx, lld, macros, patch, templates | ||
Remaining Estimate: | Not Specified | ||
Time Spent: | Not Specified | ||
Original Estimate: | Not Specified | ||
Environment: |
Centos 7 64bit, zabbix 3.4.9, Wildlfy 12, Template: https://share.zabbix.com/official-templates/wildfly-eap-jboss-discovery |
Attachments: | Item_prototype.png JMXItemChecker.java Latest_data.png zabbix-java-gateway-3.4.9-1.el7.x86_64.rpm | ||||||||
Issue Links: |
|
Description |
The same problem is in this (CLOSED) issue https://support.zabbix.com/browse/ZBX-12705. But we need name of datasource for better readable in item. We found another problems with this “-“ pattern in other JMX path, this little change solved everything. This fix replace problem paterns. [ root @ tst-monit-001 ~ ] # ./zabbix_get_jmx.sh 'jmx.discovery[beans,"jboss.as:subsystem=datasources,data-source=*,statistics=pool"]' | jq '.data[0].value | fromjson | .data' Output: [ { "{#JMXDOMAIN}": "jboss.as", "{#JMXDATA-SOURCE}": "NAV_DS", "{#JMXSUBSYSTEM}": "datasources", "{#JMXSTATISTICS}": "pool", "{#JMXOBJ}": "jboss.as:subsystem=datasources,data-source=NAV_DS,statistics=pool" } This is exactly the same problem like in the issue. *What I change in this file is: ** *JMXItemChecker.java 274 // This is changed for replace special characters [ root @ tst-monit-001 ~ ] # ./zabbix_get_jmx.sh 'jmx.discovery[beans,"jboss.as:subsystem=datasources,data-source=*,statistics=pool"]' | jq '.data[0].value | fromjson | .data' Output: [ { "{#JMXDOMAIN}": "jboss.as", "{#JMXDATA_SOURCE}": "NAV_DS", "{#JMXSUBSYSTEM}": "datasources", "{#JMXSTATISTICS}": "pool", "{#JMXOBJ}": "jboss.as:subsystem=datasources,data-source=NAV_DS,statistics=pool" } {#JMXDATA_SOURCE} is valid for zabbix macros |
Comments |
Comment by Vjaceslavs Bogdanovs [ 2018 Jul 10 ] |
Is a duplicate of |