How does JMX2.0 extension matches the JMX metric name to internal metric name

Hi,

I have a CF application which publishes a metric named “gb.request.count” to JMX. My extension.yaml file used in JMX2.0 defines the metric as follows:

metrics:
  - key: cpi.it-gb.gb.request
  metadata:
    displayName: IT-GB Total Request Count
    description: IT-GB Total Request Count
    unit: Count
    sourceEntityType: process_group_instance
    tags:
      - JMX

The dynatrace shows the metric properly.

My question is how is "cpi.it-gb.gb.request" mapped to “gb.request.count”?

Thanks,

Abhay
extension_for_query.txt (2.04 KB)

The snippet you shared is from the metric metadata. This section of the yaml is only responsible for display names and units and such, no matter the source.

Inside your YAML you also have the the JMX section where you give the metric an ID based on the mbean attribute. If you want to rename the ID of the metric and remove “cpi.it-” from the metric ID, that’s the easiest place to do that.

If you’re just wondering why it added “count” at the end of the metric, that’s because you defined this as a count metric in the jmx section of the YAML.

Hi Mike,

Thank you for the response. I have attached a text file which contains the jmx section too.

My application is pushing the metric to JMX with bean name as "gb.request.count" and the extension file does not have this name anywhere. extension has "cpi.it-gb.gb.request". I am failing to understand how does dynatrace maps cpi.it-gb.gb.request to gb.request.count and display the metric.

Thanks,

Abhay

Inside your yaml you have this section. We fetch the Count attribute from the JMX query you have defined under “query”:

jmx:
  groups:
    - group: jmx
      subgroups:
        - subgroup: metrics:name=gbRequestCount.systemId.dummyId,*
          query: metrics:name=gbRequestCount.systemId.dummyId,*
          metrics:
            - key: cpi.it-gb.gb.request
              value: attribute:Count
              type: gauge
            - key: cpi.it-gb.gb.request.count.rate.count
              value: attribute:Count
              type: count