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

    Details

    • Type: Change Request
    • Status: Reopened
    • Priority: Trivial
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Java gateway (J)
    • Labels:
    • Team:
      Team A
    • Sprint:
      Sprint 38, Sprint 39, Sprint 40, Sprint 41

      Description

      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.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned Unassigned
              Reporter:
              dimir dimir
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Dates

                Created:
                Updated: