Skip to content

Commit

Permalink
Configure JMX for remote access (#282)
Browse files Browse the repository at this point in the history
  • Loading branch information
philipp94831 authored Feb 26, 2025
1 parent 90dbc05 commit 9be985b
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 4 deletions.
8 changes: 5 additions & 3 deletions charts/streams-app/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,11 @@ Alternatively, a YAML file that specifies the values for the parameters can be p

### JMX Configuration

| Parameter | Description | Default |
|------------|---------------------------------------------------|---------|
| `jmx.port` | The jmx port which JMX style metrics are exposed. | `5555` |
| Parameter | Description | Default |
|---------------|-------------------------------------------------------------------------|-------------|
| `jmx.enabled` | Whether or not to open JMX port for remote access (e.g., for debugging) | `false` |
| `jmx.port` | The JMX port which JMX style metrics are exposed. | `5555` |
| `jmx.host` | The host to use for JMX remote access. | `localhost` |

### Prometheus JMX Exporter Configuration

Expand Down
6 changes: 5 additions & 1 deletion charts/streams-app/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,10 @@ spec:
value: '-Dcom.sun.management.jmxremote.port={{ .Values.jmx.port }}
-Dcom.sun.management.jmxremote.authenticate=false
-Dcom.sun.management.jmxremote.ssl=false
{{- if .Values.jmx.enabled }}
-Djava.rmi.server.hostname={{ .Values.jmx.host }}
-Dcom.sun.management.jmxremote.rmi.port={{ .Values.jmx.port }}
{{- end }}
-XX:MaxRAMPercentage={{ printf "%.1f" .Values.javaOptions.maxRAMPercentage }}
{{ .Values.javaOptions.others | join " " }}'
{{- if or (.Values.files) (and .Values.persistence.enabled .Values.statefulSet) (.Values.secretFilesRefs) }}
Expand Down Expand Up @@ -207,7 +211,7 @@ spec:
protocol: {{ .protocol | quote }}
{{- end }}
{{- end }}
{{- if .Values.prometheus.jmx.enabled }}
{{- if .Values.jmx.enabled }}
- containerPort: {{ .Values.jmx.port }}
name: jmx
{{- end }}
Expand Down
2 changes: 2 additions & 0 deletions charts/streams-app/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,9 @@ readinessProbe: {}
## Kafka Connect JMX Settings
## ref: https://kafka.apache.org/documentation/#connect_monitoring
jmx:
enabled: false
port: 5555
host: localhost

autoscaling:
enabled: false
Expand Down

0 comments on commit 9be985b

Please sign in to comment.