JMXFetch is the component of the Agent which is responsible for collecting metrics from Java applications.
These docs are intended to help you test changes to either JMXFetch or JMX-based integrations locally. In other words, you've made changes to how JMXFetch works and you'd like to run JMXFetch via the Agent to validate your changes.
If your goal is to run a JMX-based check and you don't need a custom version of JMXFetch, follow the instructions below:
- Download the
-jar-with-dependencies.jar
build of the latest version of JMXFetch frommaven
- Copy the jar file and rename it to
$GOPATH/src/github.com/DataDog/datadog-agent/dev/dist/jmx/jmxfetch.jar
. - Run
deva agent.run
. - Validate that the JMXFetch section appears in
agent status
.
If you have a JMX-based integration configured to run, it automatically runs in your local JMXFetch instance.
- Build JMXFetch.
- Copy the resulting jar into
$GOPATH/src/github.com/DataDog/datadog-agent/dev/dist/jmx/jmxfetch.jar
. - Run
deva agent.run
. - Validate that the JMXFetch section appears in
agent status
.
If you have a JMX-based integration configured to run, it should automatically be run in your local JMXFetch instance.
- Run your JMX server listening on
localhost
.- A testing JMX server can be found here.
- Add a check configuration that specifies how to connect to your JMX server
- An example for the above test server can be found in the jmxfetch repo.
- This config should live in
dev/dist/conf.d/jmx-test-server.d/conf.yaml
.
- Run
deva agent.run
. - Validate that the check appears as scheduled in
agent status
.