[ZBX-13294] escaping backslashes and quoting spaces in JMX keys described not very correctly Created: 2018 Jan 05 Updated: 2024 Apr 10 Resolved: 2018 Feb 05 |
|
Status: | Closed |
Project: | ZABBIX BUGS AND ISSUES |
Component/s: | Documentation (D) |
Affects Version/s: | 3.4.4 |
Fix Version/s: | 4.0 (plan) |
Type: | Documentation task | Priority: | Major |
Reporter: | Oleksii Zagorskyi | Assignee: | dimir |
Resolution: | Fixed | Votes: | 0 |
Labels: | escaping, jmx, key, quoting | ||
Remaining Estimate: | Not Specified | ||
Time Spent: | Not Specified | ||
Original Estimate: | Not Specified |
Attachments: | jmx-right-square-bracket-in-object-name.png | ||||
Issue Links: |
|
||||
Team: | Team C | ||||
Sprint: | Sprint 25, Sprint 26 | ||||
Story Points: | 0 |
Description |
https://www.zabbix.com/documentation/3.4/manual/config/items/itemtypes/jmx_monitoring says that: 1. A backslash character should be escaped as well. 1st statemet has many exceptions. I have this real ObjectName: com.example:type="metrics.akka.systems.ClusterSystem.dispatchers.akka_profile-dispatcher.actors._user_backendProxyprofile_\*.mailbox-size" Yes, it contains quoted part. Attribute name in this case is simple word, we omit it for now. Working JMX key for this Mbean is: jmx[com.example:type="metrics.akka.systems.ClusterSystem.dispatchers.akka_profile-dispatcher.actors._user_backendProxyprofile_\*.mailbox-size",simple] So, to monitor such Mbean, I have to ignore note on the documentation about quoting and for escaping. Let's get back to escaping in Attribute: Practical tests show that successful result is when number of backslashes in attribute:
Yes, single backslash may stay unescaped, but 2 backslashes should be written in key as 3 or 4 backslashes. So, documentation requirement for escaping is incorrect in general. It should be separated for ObjectName and Attribute. Some details as for response: My answer for 2nd doc statement: And at the end, notes just in case: All tests performed using zabbix 3.4.4 |
Comments |
Comment by dimir [ 2018 Jan 29 ] |
Documented here: https://www.zabbix.com/documentation/3.4/manual/config/items/itemtypes/jmx_monitoring#other_issues As to "right square bracket ] in ObjectName may be used as is, without any escaping or quoting", maybe I misunderstood, but you can't add such an item: So, looks like in this case object name must be quoted: jmx["com.example:type=Hellos]",simple] dimir, do you approve zalex? zalex_ua in a queue to review zalex_ua as for "right square bracket ] in ObjectName" - yeah, I didn't try to configure it using zabbix frontend, just tried a sender.pl script to get value directly from java gateway. Should be ignored. zalex_ua Doc changes/fixes look good to me. |
Comment by dimir [ 2018 Jan 30 ] |
Thank you, zalex_ua! |
Comment by dimir [ 2018 Feb 02 ] |
ZBXNEXT-4370 asks for automatic JMX item key escaping. |