diff --git a/jmx-metrics/build.gradle.kts b/jmx-metrics/build.gradle.kts index 0088a698..ce545e73 100644 --- a/jmx-metrics/build.gradle.kts +++ b/jmx-metrics/build.gradle.kts @@ -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 { diff --git a/jmx-scraper/README.md b/jmx-scraper/README.md index cbe5534d..18d73de1 100644 --- a/jmx-scraper/README.md +++ b/jmx-scraper/README.md @@ -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: diff --git a/jmx-scraper/build.gradle.kts b/jmx-scraper/build.gradle.kts index fc77bf89..0d174717 100644 --- a/jmx-scraper/build.gradle.kts +++ b/jmx-scraper/build.gradle.kts @@ -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") diff --git a/settings.gradle.kts b/settings.gradle.kts index 99809700..8de34189 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -14,6 +14,13 @@ dependencyResolutionManagement { repositories { mavenCentral() mavenLocal() + // terracotta repository for jmxmp connector + maven { + setUrl("https://repo.terracotta.org/maven2") + content { + includeGroupByRegex("""org\.terracotta.*""") + } + } } }