Uploaded image for project: 'ZABBIX BUGS AND ISSUES'
  1. ZABBIX BUGS AND ISSUES
  2. ZBX-12858

JMX beans discovery fails when JSON return illegal character for a LLD MACRO

XMLWordPrintable

    • Icon: Incident report Incident report
    • Resolution: Duplicate
    • Icon: Minor Minor
    • None
    • 3.4.1
    • Java gateway (J)
    • Linux

      if I do a jmx discovery for jboss jdbc datasources in zabbix, i get the following:

      jmx.discovery[beans,"jboss.as:subsystem=datasources,statistics=jdbc,data-source=*"]
      
      {"data":[
      			{
      				"{#JMXDOMAIN}":"jboss.as",
      				"{#JMXSUBSYSTEM}":"datasources",
      				"{#JMXSTATISTICS}":"jdbc",
      				"{#JMXOBJ}":"jboss.as:subsystem=datasources,data-source=DB_IDI_USER,statistics=jdbc",
      				"{#JMXDATA-SOURCE}":"DB_IDI_USER"
      			}
      		]
      }
      

      Because {#JMXDATA-SOURCE} contains illegal character "-" this macro cannot be used inside the name for ITEM PROTOTYPE.

      There is no way to circumvent this, because there is no preprocessing available for the item name, but for the item value ONLY

      I could use {#JMXOBJ} in place of {#JMXDATA-SOURCE} of course, but we would have very long item names such as "jboss.as:subsystem=datasources,data-source=DB_IDI_USER,statistics=jdbc" which is something I really don't want

      I think we should have something similar to value preprocessing also for the prototype item name

      Thank you for listening to me
      Best regards
      Andrea

            Unassigned Unassigned
            andrea.rafreider Andrea Rafreider
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: