ArtifactoryDataDog
Overview
Artifactory is a binary repository manager. Basically it's an equivalent to using something like git, except for built artifacts.
If that sentence doesn't mean anything to you, you can stop reading.
I recently had to figure out how to set up monitoring of Artifactory. The available documentation isn't very good, so here are my notes on how to get everything set up.
JMX
Artifactory is a Tomcat web app and it exposes monitoring information via Java Management Extensions (JMX). The first step is to enable jmx for your artifactory instance.
Assuming you have artifactory installed in /data/artifactory-pro.
add to artifactory java startup options in /etc/opt/jfrog/artifactory/default:
-Dcom.sun.management.jmxremote \ -Dcom.sun.management.jmxremote.port=7199 \ -Dcom.sun.management.jmxremote.authenticate=true \ -Dcom.sun.management.jmxremote.ssl=false \ -Dcom.sun.management.jmxremote.password.file=/data/artifactory-pro/jmxpass"
create file /data/artifactory-pro/jmxpass:
monitorRole readonly
create datadog jmx config file /etc/dd-agent/conf.d/jmx.yaml:
--- init_config: ~ instances: - host: localhost name: artifactory password: readonly port: 7199 user: monitorRole conf: - include: attribute: - ArtifactsTotalSize - CorePoolSize - MaximumPoolSize - LargestPoolSize - MaxIdle - MaxWait - MinIdle - MaxActive - Size - NumIdle - NumActive - Active - Idle - MaxAge - InitialSize - AbandonWhenPercentageFull - MinEvictableIdleTimeMillis - NumTestsPerEvictionRun - ValidationInterval - SuspectTimeout - TimeBetweenEvictionRunsMillis - ValidationQueryTimeout domain: org.jfrog.artifactory - include: attribute: ActiveConnectionCount: metric_type: counter ActiveCount: metric_type: counter ArtifactsCount: metric_type: counter CompletedTaskCount: metric_type: counter IdleConnectionsCount: metric_type: counter SelectQueriesCount: metric_type: counter TaskCount: metric_type: counter UpdateQueriesCount: metric_type: counter WaitCount: metric_type: counter domain: org.jfrog.artifactory - include: attribute: - maxTime - bytesReceived - bytesSent - processingTime - size - maxSize - processingTime - backlog - objectMaxSize - cacheSize - activeSessions - available - maxThreads - currentThreadsBusy - maxActive - expiredSessions - sessionCreateRate - sessionExpireRate - sessionMaxAliveTime - rejectedSessions - sessionAverageAliveTime - activeSessions - maxInstances - maxActiveSessions domain: Catalina exclude: bean_regex: - Catalina.*type=RequestProcessor.* - include: attribute: acceptorThreadCount: metric_type: counter accessCount: metric_type: counter countAllocated: metric_type: counter currentThreadCount: metric_type: counter errorCount: metric_type: counter hitCount: metric_type: counter lookupCount: metric_type: counter maxHeaderCount: metric_type: counter pollerThreadCount: metric_type: counter requestCount: metric_type: counter sessionCounter: metric_type: counter domain: Catalina exclude: bean_regex: - Catalina.*type=RequestProcessor.*
Restart and Check Status
restart artifactory and datadog
check /var/log/datadog/*.log files
sud dd-agent configcheck
sudo dd-agent jmx list_matching_attributes
ToDo
Document nginx monitoring config
Document how to pick monitoring variables in datadog