Skip to content
forked from newrelic/nrjmx

Command line tool to connect to a JMX server and retrieve the MBeans it exposes.

License

Notifications You must be signed in to change notification settings

cjmccarthy/nrjmx

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NR-JMX

New Relic's JMX fetcher, a simple tool for extracting data out of any application exposing a JMX interface.

Build

NR-JMX uses Maven for generating the binaries:

$ mvn package

This will create the nrjmx.jar file under the ./bin/ directory. Copy bin/nrjmx & bin/nrjmx.jar files to your preferred location. Both files must be located under the same folder.

Usage

The applicaton just expects the connection parameters to the JMX interface.

$ ./bin/nrjmx -hostname 127.0.0.1 -port 7199 -username user -password pwd

The tool will read lines from the standard input which should contain object name patterns for which we want to fetch their attributes. For each line, it will get the beans matching the pattern and output a JSON which all the attributes found.

For instance, if you want to fetch some beans from Cassandra JMX metrics, you could execute:

$ echo
"org.apache.cassandra.metrics:type=Table,keyspace=*,scope=*,name=ReadLatency" | java -jar target/nrjmx-0.0.1-SNAPSHOT-jar-with-dependencies.jar -hostname 127.0.0.1 -port 7199 -username user -password pwd

About

Command line tool to connect to a JMX server and retrieve the MBeans it exposes.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Java 98.7%
  • Shell 1.3%