Skip to content

Commit

Permalink
Add support to configure telemetry file and enable JMX port for metri…
Browse files Browse the repository at this point in the history
…c scraping.
  • Loading branch information
mykolahryhoriev committed May 12, 2022
1 parent a63cb11 commit eb8d08c
Show file tree
Hide file tree
Showing 5 changed files with 70 additions and 1 deletion.
4 changes: 4 additions & 0 deletions charts/dremio_v2/templates/dremio-configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ metadata:
name: dremio-config
data:
{{- tpl ($.Files.Glob "config/*").AsConfig . | nindent 2 }}
{{- if $.Values.telemetry.enabled }}
dremio-telemetry.yaml: |
{{- $.Values.telemetry.yaml | nindent 4 }}
{{- end }}
---
apiVersion: v1
kind: ConfigMap
Expand Down
15 changes: 15 additions & 0 deletions charts/dremio_v2/templates/dremio-coordinator.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,12 @@ spec:
{{- end }}
{{- include "dremio.coordinator.extraVolumeMounts" $ | nindent 8 }}
env:
{{- if and $.Values.telemetry.enabled (eq $.Values.telemetry.type "jmx") }}
- name: POD_IP
valueFrom:
fieldRef:
fieldPath: status.podIP
{{- end }}
- name: DREMIO_MAX_HEAP_MEMORY_SIZE_MB
value: "{{ template "dremio.coordinator.heapMemory" $ }}"
- name: DREMIO_MAX_DIRECT_MEMORY_SIZE_MB
Expand All @@ -65,6 +71,15 @@ spec:
-Dservices.coordinator.master.embedded-zookeeper.enabled=false
-Dservices.executor.enabled=false
-Dservices.conduit.port=45679
{{- if and $.Values.telemetry.enabled (eq $.Values.telemetry.type "jmx") }}
-Dcom.sun.management.jmxremote
-Dcom.sun.management.jmxremote.authenticate=false
-Dcom.sun.management.jmxremote.ssl=false
-Dcom.sun.management.jmxremote.local.only=false
-Dcom.sun.management.jmxremote.port={{ $.Values.telemetry.jmxPort }}
-Dcom.sun.management.jmxremote.rmi.port={{ $.Values.telemetry.jmxPort }}
-Djava.rmi.server.hostname=$(POD_IP)
{{- end }}
- name: AWS_CREDENTIAL_PROFILES_FILE
value: "/opt/dremio/aws/credentials"
- name: AWS_SHARED_CREDENTIALS_FILE
Expand Down
15 changes: 15 additions & 0 deletions charts/dremio_v2/templates/dremio-executor.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,12 @@ spec:
{{- include "dremio.executor.cloudCache.volumeMounts" (list $ $engineName) | nindent 8 }}
{{- include "dremio.executor.extraVolumeMounts" (list $ $engineName) | nindent 8 }}
env:
{{- if and $.Values.telemetry.enabled (eq $.Values.telemetry.type "jmx") }}
- name: POD_IP
valueFrom:
fieldRef:
fieldPath: status.podIP
{{- end }}
- name: DREMIO_MAX_HEAP_MEMORY_SIZE_MB
value: "{{ template "dremio.executor.heapMemory" (list $ $engineName) }}"
- name: DREMIO_MAX_DIRECT_MEMORY_SIZE_MB
Expand All @@ -68,6 +74,15 @@ spec:
-Dservices.executor.enabled=true
-Dservices.conduit.port=45679
-Dservices.node-tag={{ $engineName }}
{{- if and $.Values.telemetry.enabled (eq $.Values.telemetry.type "jmx") }}
-Dcom.sun.management.jmxremote
-Dcom.sun.management.jmxremote.authenticate=false
-Dcom.sun.management.jmxremote.ssl=false
-Dcom.sun.management.jmxremote.local.only=false
-Dcom.sun.management.jmxremote.port={{ $.Values.telemetry.jmxPort }}
-Dcom.sun.management.jmxremote.rmi.port={{ $.Values.telemetry.jmxPort }}
-Djava.rmi.server.hostname=$(POD_IP)
{{- end }}
- name: AWS_CREDENTIAL_PROFILES_FILE
value: "/opt/dremio/aws/credentials"
- name: AWS_SHARED_CREDENTIALS_FILE
Expand Down
15 changes: 15 additions & 0 deletions charts/dremio_v2/templates/dremio-master.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,12 @@ spec:
{{- end }}
{{- include "dremio.coordinator.extraVolumeMounts" $ | nindent 8 }}
env:
{{- if and $.Values.telemetry.enabled (eq $.Values.telemetry.type "jmx") }}
- name: POD_IP
valueFrom:
fieldRef:
fieldPath: status.podIP
{{- end }}
- name: DREMIO_MAX_HEAP_MEMORY_SIZE_MB
value: "{{ template "dremio.coordinator.heapMemory" $ }}"
- name: DREMIO_MAX_DIRECT_MEMORY_SIZE_MB
Expand All @@ -76,6 +82,15 @@ spec:
-Dservices.coordinator.master.embedded-zookeeper.enabled=false
-Dservices.executor.enabled=false
-Dservices.conduit.port=45679
{{- if and $.Values.telemetry.enabled (eq $.Values.telemetry.type "jmx") }}
-Dcom.sun.management.jmxremote
-Dcom.sun.management.jmxremote.authenticate=false
-Dcom.sun.management.jmxremote.ssl=false
-Dcom.sun.management.jmxremote.local.only=false
-Dcom.sun.management.jmxremote.port={{ $.Values.telemetry.jmxPort }}
-Dcom.sun.management.jmxremote.rmi.port={{ $.Values.telemetry.jmxPort }}
-Djava.rmi.server.hostname=$(POD_IP)
{{- end }}
- name: AWS_CREDENTIAL_PROFILES_FILE
value: "/opt/dremio/aws/credentials"
- name: AWS_SHARED_CREDENTIALS_FILE
Expand Down
22 changes: 21 additions & 1 deletion charts/dremio_v2/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -474,4 +474,24 @@ service:
# here. For more information, see
# https://kubernetes.io/docs/concepts/containers/images/#specifying-imagepullsecrets-on-a-pod
# imagePullSecrets:
# - secretname
# - secretname

telemetry:
# enable telemetry configurators
enabled: false
# Supported value cloudwatch | prometheus | slf4j | jmx
# for non JMX telemetry configurator, jar file must be pre-allocated in `/jars/3rdparty`
# fork docker image or use extra volumes to add it.
# type: "jmx"
# jmxPort: 9072
# multiline value for dremio-telemtry.yaml
# yaml: |-
# auto-reload:
# enabled: True
# period: 500
# unit: MILLISECONDS
#
# metrics:
# - name: jobs
# reporter:
# type: jmx

0 comments on commit eb8d08c

Please sign in to comment.