jmx-scraper replicate and document jmxmp/sasl config (#1749)

This commit is contained in:
SylvainJuge 2025-02-21 20:55:28 +01:00 committed by GitHub
parent 453c0c12a1
commit 023c02b4ab
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 20 additions and 18 deletions

View File

@ -12,16 +12,6 @@ otelJava.moduleName.set("io.opentelemetry.contrib.jmxmetrics")
application.mainClass.set("io.opentelemetry.contrib.jmxmetrics.JmxMetrics")
repositories {
mavenCentral()
maven {
setUrl("https://repo.terracotta.org/maven2")
content {
includeGroupByRegex("""org\.terracotta.*""")
}
}
}
val groovyVersion = "3.0.23"
dependencies {

View File

@ -36,14 +36,16 @@ For example the `otel.jmx.service.url` option can be set with the `OTEL_JMX_SERV
## Configuration reference
| config option | default value | description |
|--------------------------------|---------------|-------------------------------------------------------------------------------------------------------------------------------------------|
| `otel.jmx.service.url` | - | mandatory JMX URL to connect to the remote JVM |
| `otel.jmx.target.system` | - | comma-separated list of systems to monitor, mandatory unless `otel.jmx.config` is set |
| `otel.jmx.config` | empty | comma-separated list of paths to custom YAML metrics definition, mandatory when `otel.jmx.target.system` is not set |
| `otel.jmx.username` | - | user name for JMX connection, mandatory when JMX authentication is set on target JVM with`com.sun.management.jmxremote.authenticate=true` |
| `otel.jmx.password` | - | password for JMX connection, mandatory when JMX authentication is set on target JVM with `com.sun.management.jmxremote.authenticate=true` |
| `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` |
| config option | default value | description |
|--------------------------------|---------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `otel.jmx.service.url` | - | mandatory JMX URL to connect to the remote JVM |
| `otel.jmx.target.system` | - | comma-separated list of systems to monitor, mandatory unless `otel.jmx.config` is set |
| `otel.jmx.config` | empty | comma-separated list of paths to custom YAML metrics definition, mandatory when `otel.jmx.target.system` is not set |
| `otel.jmx.username` | - | user name for JMX connection, mandatory when JMX authentication is set on target JVM with`com.sun.management.jmxremote.authenticate=true` |
| `otel.jmx.password` | - | password for JMX connection, mandatory when JMX authentication is set on target JVM with `com.sun.management.jmxremote.authenticate=true` |
| `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` |
| `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` |
| `otel.jmx.realm` | - | Realm required by profile `SASL/DIGEST-MD5` or `TLS SASL/DIGEST-MD5` |
When both `otel.jmx.target.system` and `otel.jmx.config` configuration options are used at the same time:

View File

@ -21,6 +21,9 @@ dependencies {
runtimeOnly("io.opentelemetry:opentelemetry-exporter-otlp")
runtimeOnly("io.opentelemetry:opentelemetry-exporter-logging")
// for jmxmp protocol support
runtimeOnly("org.terracotta:jmxremote_optional-tc:1.0.8")
implementation("io.opentelemetry.instrumentation:opentelemetry-jmx-metrics")
testImplementation("org.junit-pioneer:junit-pioneer")

View File

@ -14,6 +14,13 @@ dependencyResolutionManagement {
repositories {
mavenCentral()
mavenLocal()
// terracotta repository for jmxmp connector
maven {
setUrl("https://repo.terracotta.org/maven2")
content {
includeGroupByRegex("""org\.terracotta.*""")
}
}
}
}