-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
26 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,27 @@ | ||
# JMXReporter | ||
Universal tool to report JMX metrics to any backend supported by Metrics4j | ||
Universal tool to report JMX metrics to any backend supported by Metrics4j. | ||
|
||
Yes that is right, say you are running Kafka and want to report JMX metrics to | ||
InfluxDB or Graphite or both at the same time. This tool is for you. | ||
|
||
The main purpose of this tool was to showcase the power of Metrics4j. JMXReporter | ||
is very simple in what it does, it registers JMX metrics as sources for Metrics4j | ||
so they can be reported. | ||
|
||
## Getting Started | ||
1. Download the JMXReporter jar file. | ||
1. For your JMX application (say Kafka) add JMXReporter to the java command line | ||
as a javaagent (-javaagent:path_to_jxmreporter_jar) | ||
1. Place the following simple metrics4j.conf file in the applications classpath. | ||
```hocon | ||
metrics4j: { | ||
_dump-file: "dump.conf" | ||
} | ||
``` | ||
|
||
Run your application and when it shuts down Metrics4j will create the file dump.conf | ||
that shows all the JMX sources that were found. | ||
|
||
Replace the simple metrics4j.conf file with the one from the dump and then follow | ||
the Metrics4j documentation to add a trigger, formatter and sink so it can | ||
send off your JMX metrics. https://github.com/kairosdb/metrics4j |