Uploaded image for project: 'ZABBIX FEATURE REQUESTS'
  1. ZABBIX FEATURE REQUESTS
  2. ZBXNEXT-4370

Improve handling of special characters in quoted parameters of JMX item keys

XMLWordPrintable

    • Icon: Change Request Change Request
    • Resolution: Unresolved
    • Icon: Trivial Trivial
    • None
    • None
    • Java gateway (J)
    • Team A
    • Sprint 38, Sprint 39, Sprint 40, Sprint 41

      Currently we force users to escape special characters (e. g. backslashes) in JMX item keys parameters:

      https://www.zabbix.com/documentation/4.0/manual/config/items/itemtypes/jmx_monitoring#other_issues

      This could be done by Zabbix automatically the same way it works with other item types, not forcing user to think about escaping at all.

      In addition, number of escape characters in key parameters and error message can be different (2nd parameter, attributeName "invalid\attributeName" in example below) , which is confusing:

      MBean objectName: com.example:Type=Hello
      attribute: invalid\attributeName
      
      item key:
      jmx[com.example:Type=Hello,"invalid\\attributeName"]
      
      error message:
      getAttribute failed: ModelMBeanAttributeInfo not found for invalid\attributeName
      

      Note that the error message is not so user-friendly also. So, the expected result could be like the following (with error message fixed):

      MBean objectName: com.example:Type=Hello
      attribute: invalid\attributeName
      
      item key:
      jmx[com.example:Type=Hello,"invalid\attributeName"]
      
      error message:
      MBean "com.example:Type=Hello" does not have attribute "invalid\attributeName"
      

      The idea came from ZBX-13294.

        1. fruits.png
          11 kB
          Vladislavs Sokurenko
        2. fruitsbackslashdot.png
          12 kB
          Vladislavs Sokurenko
        3. jmx-double-backslashes.png
          56 kB
          dimir
        4. Screenshot_2018-08-14_12-02-37.png
          50 kB
          Arets Paeglis
        5. screenshot-localhost-2018-08-14-12-01-35.png
          73 kB
          Arets Paeglis

            Unassigned Unassigned
            dimir dimir
            Team A
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated: