Skip to content

Docker: Datadog agent stops sending default JMX metrics after adding bean #3902

@yoldar

Description

@yoldar

Datadog docker agent version: datadog/agent:latest-jmx

Configuration before adding bean conf.d/jmx.d/conf.yaml:

init_config:
  is_jmx: true
  collect_default_metrics: true
  new_gc_metrics: true

instances:
  - host: register
    port: 5000

Configuration above works fine. But after adding bean below:

init_config:
  is_jmx: true
  collect_default_metrics: true
  new_gc_metrics: true

instances:
  - host: register
    port: 5000
    conf:
      - include:
        domain: com.zaxxer.hikari:type=Pool (HikariPool-1)
        bean:
          - com.zaxxer.hikari
        attribute:
          IdleConnections:
            metric_type: gauge
            alias: jmx.com.zaxxer.hikari.idle_connections
          ActiveConnections:
            metric_type: gauge
            alias: jmx.com.zaxxer.hikari.active_connections
          TotalConnections:
            metric_type: gauge
            alias: jmx.com.zaxxer.hikari.total_connections
          ThreadsAwaitingConnection:
            metric_type: gauge
            alias: jmx.com.zaxxer.hikari.threads_awaiting_connection

Default JMX metrics are not sent because of this logs:

 INFO | (pkg/jmxfetch/jmxfetch.go:304 in func1) | 2020-11-21 18:24:56 UTC | JMX | WARN  | JmxAttribute | Unable to get metrics from JMImplementation:type=MBeanServerDelegate - MBeanServerId: java.lang.NumberFormatException: For input string: "9b6c307b23cf_1605982746024"
 INFO | (pkg/jmxfetch/jmxfetch.go:304 in func1) | 2020-11-21 18:24:56 UTC | JMX | WARN  | JmxAttribute | Unable to get metrics from JMImplementation:type=MBeanServerDelegate - SpecificationName: java.lang.NumberFormatException: For input string: "Java Management Extensions"
 INFO | (pkg/jmxfetch/jmxfetch.go:304 in func1) | 2020-11-21 18:24:56 UTC | JMX | WARN  | JmxAttribute | Unable to get metrics from JMImplementation:type=MBeanServerDelegate - SpecificationVendor: java.lang.NumberFormatException: For input string: "Oracle Corporation"
 INFO | (pkg/jmxfetch/jmxfetch.go:304 in func1) | 2020-11-21 18:24:56 UTC | JMX | WARN  | JmxAttribute | Unable to get metrics from JMImplementation:type=MBeanServerDelegate - ImplementationName: java.lang.NumberFormatException: For input string: "JMX"
 INFO | (pkg/jmxfetch/jmxfetch.go:304 in func1) | 2020-11-21 18:24:56 UTC | JMX | WARN  | JmxAttribute | Unable to get metrics from JMImplementation:type=MBeanServerDelegate - ImplementationVersion: java.lang.NumberFormatException: multiple points
 INFO | (pkg/jmxfetch/jmxfetch.go:304 in func1) | 2020-11-21 18:24:56 UTC | JMX | WARN  | JmxAttribute | Unable to get metrics from JMImplementation:type=MBeanServerDelegate - ImplementationVendor: java.lang.NumberFormatException: For input string: "Oracle Corporation"
 INFO | (pkg/jmxfetch/jmxfetch.go:304 in func1) | 2020-11-21 18:24:56 UTC | JMX | WARN  | JmxAttribute | Unable to get metrics from java.lang:type=Runtime - SpecName: java.lang.NumberFormatException: For input string: "Java Virtual Machine Specification"

If I remove bean and restart agent default metrics start to send. What is wrong?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions