Skip to content

Commit 023c02b

Browse files
authored
jmx-scraper replicate and document jmxmp/sasl config (#1749)
1 parent 453c0c1 commit 023c02b

File tree

4 files changed

+20
-18
lines changed

4 files changed

+20
-18
lines changed

jmx-metrics/build.gradle.kts

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -12,16 +12,6 @@ otelJava.moduleName.set("io.opentelemetry.contrib.jmxmetrics")
1212

1313
application.mainClass.set("io.opentelemetry.contrib.jmxmetrics.JmxMetrics")
1414

15-
repositories {
16-
mavenCentral()
17-
maven {
18-
setUrl("https://repo.terracotta.org/maven2")
19-
content {
20-
includeGroupByRegex("""org\.terracotta.*""")
21-
}
22-
}
23-
}
24-
2515
val groovyVersion = "3.0.23"
2616

2717
dependencies {

jmx-scraper/README.md

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -36,14 +36,16 @@ For example the `otel.jmx.service.url` option can be set with the `OTEL_JMX_SERV
3636

3737
## Configuration reference
3838

39-
| config option | default value | description |
40-
|--------------------------------|---------------|-------------------------------------------------------------------------------------------------------------------------------------------|
41-
| `otel.jmx.service.url` | - | mandatory JMX URL to connect to the remote JVM |
42-
| `otel.jmx.target.system` | - | comma-separated list of systems to monitor, mandatory unless `otel.jmx.config` is set |
43-
| `otel.jmx.config` | empty | comma-separated list of paths to custom YAML metrics definition, mandatory when `otel.jmx.target.system` is not set |
44-
| `otel.jmx.username` | - | user name for JMX connection, mandatory when JMX authentication is set on target JVM with`com.sun.management.jmxremote.authenticate=true` |
45-
| `otel.jmx.password` | - | password for JMX connection, mandatory when JMX authentication is set on target JVM with `com.sun.management.jmxremote.authenticate=true` |
46-
| `otel.jmx.remote.registry.ssl` | `false` | connect to an SSL-protected registry when enabled on target JVM with `com.sun.management.jmxremote.registry.ssl=true` |
39+
| config option | default value | description |
40+
|--------------------------------|---------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------|
41+
| `otel.jmx.service.url` | - | mandatory JMX URL to connect to the remote JVM |
42+
| `otel.jmx.target.system` | - | comma-separated list of systems to monitor, mandatory unless `otel.jmx.config` is set |
43+
| `otel.jmx.config` | empty | comma-separated list of paths to custom YAML metrics definition, mandatory when `otel.jmx.target.system` is not set |
44+
| `otel.jmx.username` | - | user name for JMX connection, mandatory when JMX authentication is set on target JVM with`com.sun.management.jmxremote.authenticate=true` |
45+
| `otel.jmx.password` | - | password for JMX connection, mandatory when JMX authentication is set on target JVM with `com.sun.management.jmxremote.authenticate=true` |
46+
| `otel.jmx.remote.registry.ssl` | `false` | connect to an SSL-protected registry when enabled on target JVM with `com.sun.management.jmxremote.registry.ssl=true` |
47+
| `otel.jmx.remote.profile` | - | SASL remote profile, supported values are `SASL/PLAIN`, `SASL/DIGEST-MD5`, `SASL/CRAM-MD5`, `TLS SASL/PLAIN`, `TLS SASL/DIGEST-MD5` and `TLS SASL/CRAM-MD5` |
48+
| `otel.jmx.realm` | - | Realm required by profile `SASL/DIGEST-MD5` or `TLS SASL/DIGEST-MD5` |
4749

4850
When both `otel.jmx.target.system` and `otel.jmx.config` configuration options are used at the same time:
4951

jmx-scraper/build.gradle.kts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,9 @@ dependencies {
2121
runtimeOnly("io.opentelemetry:opentelemetry-exporter-otlp")
2222
runtimeOnly("io.opentelemetry:opentelemetry-exporter-logging")
2323

24+
// for jmxmp protocol support
25+
runtimeOnly("org.terracotta:jmxremote_optional-tc:1.0.8")
26+
2427
implementation("io.opentelemetry.instrumentation:opentelemetry-jmx-metrics")
2528

2629
testImplementation("org.junit-pioneer:junit-pioneer")

settings.gradle.kts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,13 @@ dependencyResolutionManagement {
1414
repositories {
1515
mavenCentral()
1616
mavenLocal()
17+
// terracotta repository for jmxmp connector
18+
maven {
19+
setUrl("https://repo.terracotta.org/maven2")
20+
content {
21+
includeGroupByRegex("""org\.terracotta.*""")
22+
}
23+
}
1724
}
1825
}
1926

0 commit comments

Comments
 (0)