Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
yoldar opened this issue Nov 21, 2020 · 2 comments
Open
Labels

Comments

@yoldar
Copy link

yoldar commented Nov 21, 2020

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?

@ogaca-dd ogaca-dd added the core label Nov 27, 2020
@ogaca-dd
Copy link
Contributor

@yoldar,

Unable to get metrics from is just a warning meaning that JMXFetch does not support directly the type String and you can safely ignore these warnings.

Can you try running datadog-agent jmx list collected and datadog-agent jmx list everything? There are also other debugging commands for JMX that can help understanding your issue.

List attributes matched by JMXFetch.

Usage:
  datadog-agent jmx list [command]

Available Commands:
  collected         List attributes that will actually be collected by your current instances configuration.
  everything        List every attributes available that has a type supported by JMXFetch.
  limited           List attributes that do match one of your instances configuration but that are not being collected because it would exceed the number of metrics that can be collected.
  matching          List attributes that match at least one of your instances configuration.
  not-matching      List attributes that don’t match any of your instances configuration.
  with-metrics      List attributes and metrics data that match at least one of your instances configuration.
  with-rate-metrics List attributes and metrics data that match at least one of your instances configuration, including rates and counters.

@skysbsb
Copy link

skysbsb commented Jan 10, 2024

@yoldar did u manage to fix it? how?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants