Skip to content

Commit 5abd3c8

Browse files
committed
bootstrap documentation
1 parent 171b141 commit 5abd3c8

File tree

3 files changed

+39
-0
lines changed

3 files changed

+39
-0
lines changed

jmx-scraper/README.md

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,41 @@ The JMX MBeans and their metric mappings are defined in YAML and reuse implement
77
This is currently a work-in-progress component not ready to be used in production.
88
The end goal is to provide an alternative to the [JMX Gatherer](../jmx-metrics/README.md) utility.
99

10+
## Usage
11+
12+
The general command to invoke JMX scraper is `java -jar scraper.jar <config>`, where `scraper.jar`
13+
is the `build/libs/opentelemetry-jmx-scraper-<version>.jar` packaged binary when building this module.
14+
15+
Minimal configuration required
16+
- `otel.jmx.service.url` for example `service:jmx:rmi:///jndi/rmi://server:9999/jmxrmi` for `server`
17+
host on port `9999` with RMI JMX connector.
18+
- `otel.jmx.target.system` or `otel.jmx.custom.scraping.config`
19+
20+
Configuration can be provided through:
21+
- command line arguments: `java -jar scraper.jar --config `
22+
- system properties `java -jar scraper.jar`
23+
- java properties file: `java -jar config.properties`
24+
25+
TODO: update this once autoconfiguration is supported
26+
27+
### Configuration reference
28+
29+
TODO
30+
31+
### Extra libraries in classpath
32+
33+
By default, only the RMI JMX connector is provided by the JVM, so it might be required to add extra
34+
libraries in the classpath when connecting to remote JVMs that are not directly accessible with RMI.
35+
36+
One known example of this is the Wildfly/Jboss HTTP management interface for which the `jboss-client.jar`
37+
needs to be used to support `otel.jmx.service.url` = `service:jmx:remote+http://server:9999`.
38+
39+
When doing so, the `java -jar` command can´t be used, we have to provide the classpath with
40+
`-cp`/`--class-path`/`-classpath` option and provide the main class file name:
41+
```
42+
java -cp scraper.jar:jboss-client.jar io.opentelemetry.contrib.jmxscraper.JmxScraper <config>
43+
```
44+
1045
## Component owners
1146

1247
- [Jason Plumb](https://github.com/breedx-splk), Splunk

jmx-scraper/test-app/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
This is a test CLI application that is only used for integration tests.
2+
The goal of this application is to publish custom MBeans in JMX and then allow end-to-end testing.

jmx-scraper/test-webapp/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
This is a test web application that is only used for integration tests when metrics are published
2+
only when an application is deployed to the container, for example with Wildfly session metrics.

0 commit comments

Comments
 (0)