These instructions are known to work with version 5.10.1 of the packaged linux Datadog Agent
Using the AttachAPI can require running JMXFetch as the same user as the JVM you want to monitor.
To run JMXFetch as the jmv_user
user (once you've identified which user your JVM is running as), please follow these steps:
- Make 2 changes on the
/etc/dd-agent/supervisor.conf
file:supervisord
should be configured to run withuser=root
andjmxfetch
withuser=jvm_user
. See lines 20 and 58 of the attached file below. - Add
jvm_user
to thedd-agent
group (on Debian distros:sudo usermod -G dd-agent jvm_user
, on RHEL:sudo gpasswd -a jvm_user dd-agent
) - Grant the
dd-agent
group write access to the JMXFetch log file and the agent'srun
directory (/opt/datadog-agent/run/
):sudo chmod -R g+w /var/log/datadog/jmxfetch.log /opt/datadog-agent/run/