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.
Prerequisites:
- You have a running Artifactory application with JMX enabled (https://jfrog.com/knowledge-base/how-do-i-use-jmx-remote-monitoring/)
- You have a running Datadog agent which has access to your Artifactory JMX port
Configuration:
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:init_config: new_gc_metrics: true instances: - host: localhost # If DD agent is running on the same host port: 9010 user: <USER_NAME> password: <PASSWORD> name: artifactory-app
tags: env: pord
conf: - include: domain: org.jfrog.artifactory bean: - org.jfrog.artifactory:instance=Artifactory, type=Storage,prop=Binary Storage - org.jfrog.artifactory:instance=Artifactory, type=Repositories,prop=test-repo attribute: # Ginary storage size - Size # Repo - ArtifactsTotalSize - ArtifactsCount - include: domain: Catalina bean: - Catalina:type=ThreadPool,name="http-nio-8081" attribute: - maxThreads - currentThreadCount - currentThreadBusyThis 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 (https://docs.datadoghq.com/integrations/java/):
conf:
- include:
domain: org.apache.cassandra.db
attribute:
- 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.
No comments:
Post a Comment