All Projects → newrelic → nrjmx

newrelic / nrjmx

Licence: Apache-2.0 license
Command line tool to connect to a JMX server and retrieve the MBeans it exposes.

Programming Languages

java
68154 projects - #9 most used programming language
go
31211 projects - #10 most used programming language
shell
77523 projects
Makefile
30231 projects
powershell
5483 projects
Dockerfile
14818 projects

Projects that are alternatives of or similar to nrjmx

Fogg
Manage Infrastructure as Code with less pain.
Stars: ✭ 181 (+546.43%)
Mutual labels:  infrastructure
Lyra
Open Source Workflow Engine for Cloud Native Infrastructure
Stars: ✭ 203 (+625%)
Mutual labels:  infrastructure
Awesome Digitalocean
A curated list of amazingly awesome DigitalOcean resources inspired by Awesome Sysadmin
Stars: ✭ 236 (+742.86%)
Mutual labels:  infrastructure
Pentagon
A framework for building repeatable, containerized, cloud-based infrastructure as code with Kubernetes.
Stars: ✭ 183 (+553.57%)
Mutual labels:  infrastructure
Linode Cli
The Linode CLI
Stars: ✭ 198 (+607.14%)
Mutual labels:  infrastructure
Minicron
🕰️ Monitor your cron jobs
Stars: ✭ 2,351 (+8296.43%)
Mutual labels:  infrastructure
Vividus
Vividus is all in one test automation tool
Stars: ✭ 170 (+507.14%)
Mutual labels:  infrastructure
Red Team Infrastructure Wiki
Wiki to collect Red Team infrastructure hardening resources
Stars: ✭ 2,981 (+10546.43%)
Mutual labels:  infrastructure
Temporal
☄️ Temporal is an easy-to-use, enterprise-grade interface into distributed and decentralized storage
Stars: ✭ 202 (+621.43%)
Mutual labels:  infrastructure
Keepalived
Keepalived
Stars: ✭ 2,877 (+10175%)
Mutual labels:  infrastructure
Infra
Infrastructure to set up the public Compiler Explorer instances and compilers
Stars: ✭ 184 (+557.14%)
Mutual labels:  infrastructure
Deploykit
A toolkit for creating and managing declarative, self-healing infrastructure.
Stars: ✭ 2,237 (+7889.29%)
Mutual labels:  infrastructure
Kontemplate
Extremely simple Kubernetes resource templates | Source has moved to https://git.tazj.in/tree/ops/kontemplate
Stars: ✭ 217 (+675%)
Mutual labels:  infrastructure
Mlcomp
Distributed DAG (Directed acyclic graph) framework for machine learning with UI
Stars: ✭ 183 (+553.57%)
Mutual labels:  infrastructure
Rdbox
RDBOX is an advanced IT platform for robotics and IoT developers that highly integrates cloud-native and edge computing technologies.
Stars: ✭ 246 (+778.57%)
Mutual labels:  infrastructure
Opunit
🕵️‍♂️ Sanity checking containers, vms, and servers
Stars: ✭ 176 (+528.57%)
Mutual labels:  infrastructure
Oci Cli
Command Line Interface for Oracle Cloud Infrastructure
Stars: ✭ 207 (+639.29%)
Mutual labels:  infrastructure
Magento-2-aws-cluster-terraform
Magento 2 AWS autoscaling cluster with Terraform and Packer or ImageBuilder. Adobe Commerce Cloud alternative. The best ecommerce infrastructure. Drive more sales online. Transparent billing. Developer-friendly. No hidden bottlenecks.
Stars: ✭ 107 (+282.14%)
Mutual labels:  infrastructure
Doctl
The official command line interface for the DigitalOcean API.
Stars: ✭ 2,856 (+10100%)
Mutual labels:  infrastructure
Catalyst
Accelerated deep learning R&D
Stars: ✭ 2,804 (+9914.29%)
Mutual labels:  infrastructure

Community Plus header

New Relic JMX fetcher

A tool for extracting data out of any application exposing a JMX interface. It also provides support for golang.

Golang library

Starting from v2 you can call nrjmx from Go applications by using our gojmx module. If you want to read more about or to contribute you can check our develop docs.

Installation

Using a package manager

Common package managers can be used for this purpose: yum, apt, zypper.

For example: yum install nrjmx

Using the tarball

You can download and decompress the Java executable from the downloads page.

New Relic JMX integration (nri-jmx)

nrjmx is not bundled within the nri-jmx package. Still, it's declared as a dependency.

So if you have nrjmx already installed while installing nri-jmx, the installed version is kept. Otherwise, nri-jmx will try to get the latest nrjmx release.

Getting started

nrjmx expects the connection parameters to the JMX interface as command line arguments.

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

nrjmx reads lines from the standard input which should contain object name patterns for which we want to fetch their attributes. For each line, it gets the beans matching the pattern and outputs a JSON with all the attributes found.

For example, if you want to fetch some beans from Cassandra JMX metrics, you can 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

or for Windows CMD:

$ echo | set /p="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

Usage

Additional options are listed below.

Custom protocols

JMX allows use of custom protocols to communicate with the application. To use a custom protocol you have to include the custom connectors in the nrjmx classpath.

By default, nrjmx will include the sub-folder connectors in its class path. If this folder does not exist create it under the folder where you have nrjmx installed.

For example, to add support for JBoss, create a folder connectors under the default (Linux) library path /usr/lib/nrjmx/ (/usr/lib/nrjmx/connectors) and copy the custom connector jar ($JBOSS_HOME/bin/client/jboss-cli-client.jar) into it. You can now execute JMX queries against JBoss.

Remote URL connection

If you want to use a remoting-jmx URL you can use the flag -remote. In this case it uses the remoting connection URL: service:jmx:remote://host:port instead of service:jmx:rmi:///jndi/rmi://host:port/jmxrmi.

This sets a URI ready for JBoss Domain mode.

You will need to add support for the custom JBoss protocol. See the previous section Custom protocols.

JBoss standalone mode

This is supported via -remoteJBossStandalone and sets a connection URL to service:jmx:remote+http://host:port.

Example of usage with remoting:

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

You will need to add support for the custom JBoss protocol. See the previous section Custom protocols.

Non-Standard JMX Service URI

If your JMX provider uses a non-standard JMX service URI path (default path is jmxrmi), you can use the flag -uriPath to specify the path portion (without / prefix).

For example:

  • A default URI path could be like: service:jmx:rmi:///jndi/rmi://localhost:1689/jmxrmi (path is last path of the URI without the prefix /)
  • ForgeRock OpenDJ uses a JMX service URI like: service:jmx:rmi:///jndi/rmi://localhost:1689/org.opends.server.protocols.jmx.client-unknown

To extract data from this application:

$ ./bin/nrjmx -hostname localhost -port 1689 -uriPath "org.opends.server.protocols.jmx.client-unknown" -username user -password pwd

Troubleshooting

If you are having difficulties with nrjmx to get data out of your JMX service, You can check our troubleshoot guide.

Building

nrjmx uses Maven for generating the binaries:

$ mvn package

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

It also creates DEB and RPM packages to automatically install nrjmx. If you want to skip the creation of DEB and RPM packages (for example, because your development machine does not provide the required tools), you can disable the deb and rpm Maven profiles from the command line:

mvn clean package -P \!deb,\!rpm,\!tarball,\!test

Support

New Relic hosts and moderates an online forum where customers can interact with New Relic employees as well as other customers to get help and share best practices. Like all official New Relic open source projects, there's a related Community topic in the New Relic Explorers Hub. You can find this project's topic/threads here:

https://discuss.newrelic.com/c/support-products-agents/new-relic-infrastructure

Contributing

We encourage your contributions to improve New Relic JMX fetcher! Keep in mind when you submit your pull request, you'll need to sign the CLA via the click-through using CLA-Assistant. You only have to sign the CLA one time per project. If you have any questions, or to execute our corporate CLA, required if your contribution is on behalf of a company, please drop us an email at [email protected].

A note about vulnerabilities

As noted in our security policy, New Relic is committed to the privacy and security of our customers and their data. We believe that providing coordinated disclosure by security researchers and engaging with the security community are important means to achieve our security goals.

If you believe you have found a security vulnerability in this project or any of New Relic's products or websites, we welcome and greatly appreciate you reporting it to New Relic through HackerOne.

If you would like to contribute to this project, review these guidelines.

To all contributors, we thank you! Without your contribution, this project would not be what it is today.

License

New Relic JMX fetcher is licensed under the Apache 2.0 License.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].