Sunday, May 05, 2019

Datadog- Artifactory JMX Monitoring

Datadog JMX integration collects metrics from applications that expose JMX metrics. A lightweight Java plugin named "JMXFetch" is called by the Datadog Agent to connect to the MBean server and to collect metrics, it can also send service checks that report on the status of your monitored instances.

This plugin sends metrics to the Datadog Agent using DogStatsD server running within the Agent. In the blog we will show you how to collect and send metrics from Artifactory application.


  1. You have a running Artifactory application with JMX enabled (
  2. You have a running Datadog agent which has access to your Artifactory JMX port


You need to enable JMX monitoring in Datadog by creating a file "/etc/datadog-agent/conf.d/jmx.d/conf.yaml" with the following configuration:

  new_gc_metrics: true

  - host: localhost # If DD agent is running on the same host
    port: 9010
    user: <USER_NAME>
    password: <PASSWORD>
    name: artifactory-app
      env: pord
      - include:
        domain: org.jfrog.artifactory
          - org.jfrog.artifactory:instance=Artifactory, type=Storage,prop=Binary Storage
          - org.jfrog.artifactory:instance=Artifactory, type=Repositories,prop=test-repo
          # Ginary storage size
          - Size
          # Repo
          - ArtifactsTotalSize
          - ArtifactsCount

      - include:
        domain: Catalina
          - Catalina:type=ThreadPool,name="http-nio-8081"
          - maxThreads
          - currentThreadCount
          - currentThreadBusy

This following graph shows you a visual mapping between Mbeans and the actual Datadog configuration.

You can also use the new way of MBean configuration, as described following (

    - include:
        domain: org.apache.cassandra.db
          - BloomFilterDiskSpaceUsed
          - BloomFilterFalsePositives
          - BloomFilterFalseRatio
          - Capacity
          - CompressionRatio
          - CompletedTasks
          - ExceptionCount
          - Hits
          - RecentHitRate

But I couldn't get the new confiuration to work as the old one yet, the new one looks much easier to config, but it didn't work for me, for some reason it is not sending metrics to Datadog platform.

You could use "datadog-agent jmx list collected" command to check what JMX metrics that you are collecting.


To run more than one JMX check, create configuration files with the format jmx_<INDEX>.d/conf.yaml (e.g. jmx_1.d/conf.yaml, jmx_2.d/conf.yaml, etc). Each folder should be stored in the conf.d directory. Include the is_jmx option set to true in those configuration files.

The 350 metric limit

Due to the nature of these integrations, it is possible to submit an extremely high number of metrics directly to Datadog. Many customers agree that some of these metrics are not needed. Therefore, Datadog has set the limit at 350 metrics.

No comments: