Datadog Synthetics is now available!

Docker JMX

The standard datadog/agent:latest image for running the Datadog Agent container does not have JMX installed.

If you want to add JMX-related integrations to the Datadog Agent container, use a Docker image that ends in -jmx to install a version that includes JMX, for example datadog/agent:latest-jmx.

Execute a docker-run with a -jmx image and the SD_JMX_ENABLE=true environment variable. Then use Autodiscovery to collect metrics over JMX using your Datadog Agent.


If you want the Agent to automatically discover JMX-based checks:

Use the datadog/agent:latest-jmx image. This image is based on datadog/agent:latest, but it includes a JVM, which the Agent needs to run jmxfetch.

Note: Using %%port%% has proven problematic in practice. If you experience an issue, the best workaround is to replace %%port%% with a hard-coded JMX port.


To check whether Autodiscovery is loading JMX-based checks:

$ docker exec -it <agent_container_name> agent configcheck

=== jmx check ===
Source: Docker
Instance ID: jmx:ae0a29210146d6f3
port: "7199"
- image_tag:latest
- docker_image:my-java-app:latest
- image_name:my-java-app
- short_image:my-java-app
Init Config:
Auto-discovery IDs:
* docker://f7d8dda2e6cb8847f4f172498305e532b08059bf3a700f271d65a90b0c1f0d33

To see JMX-based checks status from the Agent:

$ docker exec -it <agent_container_name> agent status


  Initialized checks
      instance_name : jmx-
      message :
      metric_count : 15
      service_check_count : 0
      status : OK
  Failed checks
    no checks

Further Reading