Skip to content

Commit aa48ffb

Browse files
author
mykolahryhoriev
committed
Add support to configure telemetry file and enable JMX port for metric scraping.
1 parent a63cb11 commit aa48ffb

File tree

5 files changed

+70
-1
lines changed

5 files changed

+70
-1
lines changed

charts/dremio_v2/templates/dremio-configmap.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@ metadata:
44
name: dremio-config
55
data:
66
{{- tpl ($.Files.Glob "config/*").AsConfig . | nindent 2 }}
7+
{{- if $.Values.telemetry.enabled }}
8+
dremio-telemetry.yaml: |-
9+
{{- $.Values.telemetry.yaml | nindent 4 }}
10+
{{- end }}
711
---
812
apiVersion: v1
913
kind: ConfigMap

charts/dremio_v2/templates/dremio-coordinator.yaml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,12 @@ spec:
5252
{{- end }}
5353
{{- include "dremio.coordinator.extraVolumeMounts" $ | nindent 8 }}
5454
env:
55+
{{- if and $.Values.telemetry.enabled (eq $.Values.telemetry.type "jmx") }}
56+
- name: POD_IP
57+
valueFrom:
58+
fieldRef:
59+
fieldPath: status.podIP
60+
{{- end }}
5561
- name: DREMIO_MAX_HEAP_MEMORY_SIZE_MB
5662
value: "{{ template "dremio.coordinator.heapMemory" $ }}"
5763
- name: DREMIO_MAX_DIRECT_MEMORY_SIZE_MB
@@ -65,6 +71,15 @@ spec:
6571
-Dservices.coordinator.master.embedded-zookeeper.enabled=false
6672
-Dservices.executor.enabled=false
6773
-Dservices.conduit.port=45679
74+
{{- if and $.Values.telemetry.enabled (eq $.Values.telemetry.type "jmx") }}
75+
-Dcom.sun.management.jmxremote
76+
-Dcom.sun.management.jmxremote.authenticate=false
77+
-Dcom.sun.management.jmxremote.ssl=false
78+
-Dcom.sun.management.jmxremote.local.only=false
79+
-Dcom.sun.management.jmxremote.port={{ $.Values.telemetry.jmxPort }}
80+
-Dcom.sun.management.jmxremote.rmi.port={{ $.Values.telemetry.jmxPort }}
81+
-Djava.rmi.server.hostname=$(POD_IP)
82+
{{- end }}
6883
- name: AWS_CREDENTIAL_PROFILES_FILE
6984
value: "/opt/dremio/aws/credentials"
7085
- name: AWS_SHARED_CREDENTIALS_FILE

charts/dremio_v2/templates/dremio-executor.yaml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,12 @@ spec:
5454
{{- include "dremio.executor.cloudCache.volumeMounts" (list $ $engineName) | nindent 8 }}
5555
{{- include "dremio.executor.extraVolumeMounts" (list $ $engineName) | nindent 8 }}
5656
env:
57+
{{- if and $.Values.telemetry.enabled (eq $.Values.telemetry.type "jmx") }}
58+
- name: POD_IP
59+
valueFrom:
60+
fieldRef:
61+
fieldPath: status.podIP
62+
{{- end }}
5763
- name: DREMIO_MAX_HEAP_MEMORY_SIZE_MB
5864
value: "{{ template "dremio.executor.heapMemory" (list $ $engineName) }}"
5965
- name: DREMIO_MAX_DIRECT_MEMORY_SIZE_MB
@@ -68,6 +74,15 @@ spec:
6874
-Dservices.executor.enabled=true
6975
-Dservices.conduit.port=45679
7076
-Dservices.node-tag={{ $engineName }}
77+
{{- if and $.Values.telemetry.enabled (eq $.Values.telemetry.type "jmx") }}
78+
-Dcom.sun.management.jmxremote
79+
-Dcom.sun.management.jmxremote.authenticate=false
80+
-Dcom.sun.management.jmxremote.ssl=false
81+
-Dcom.sun.management.jmxremote.local.only=false
82+
-Dcom.sun.management.jmxremote.port={{ $.Values.telemetry.jmxPort }}
83+
-Dcom.sun.management.jmxremote.rmi.port={{ $.Values.telemetry.jmxPort }}
84+
-Djava.rmi.server.hostname=$(POD_IP)
85+
{{- end }}
7186
- name: AWS_CREDENTIAL_PROFILES_FILE
7287
value: "/opt/dremio/aws/credentials"
7388
- name: AWS_SHARED_CREDENTIALS_FILE

charts/dremio_v2/templates/dremio-master.yaml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,12 @@ spec:
6363
{{- end }}
6464
{{- include "dremio.coordinator.extraVolumeMounts" $ | nindent 8 }}
6565
env:
66+
{{- if and $.Values.telemetry.enabled (eq $.Values.telemetry.type "jmx") }}
67+
- name: POD_IP
68+
valueFrom:
69+
fieldRef:
70+
fieldPath: status.podIP
71+
{{- end }}
6672
- name: DREMIO_MAX_HEAP_MEMORY_SIZE_MB
6773
value: "{{ template "dremio.coordinator.heapMemory" $ }}"
6874
- name: DREMIO_MAX_DIRECT_MEMORY_SIZE_MB
@@ -76,6 +82,15 @@ spec:
7682
-Dservices.coordinator.master.embedded-zookeeper.enabled=false
7783
-Dservices.executor.enabled=false
7884
-Dservices.conduit.port=45679
85+
{{- if and $.Values.telemetry.enabled (eq $.Values.telemetry.type "jmx") }}
86+
-Dcom.sun.management.jmxremote
87+
-Dcom.sun.management.jmxremote.authenticate=false
88+
-Dcom.sun.management.jmxremote.ssl=false
89+
-Dcom.sun.management.jmxremote.local.only=false
90+
-Dcom.sun.management.jmxremote.port={{ $.Values.telemetry.jmxPort }}
91+
-Dcom.sun.management.jmxremote.rmi.port={{ $.Values.telemetry.jmxPort }}
92+
-Djava.rmi.server.hostname=$(POD_IP)
93+
{{- end }}
7994
- name: AWS_CREDENTIAL_PROFILES_FILE
8095
value: "/opt/dremio/aws/credentials"
8196
- name: AWS_SHARED_CREDENTIALS_FILE

charts/dremio_v2/values.yaml

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -474,4 +474,24 @@ service:
474474
# here. For more information, see
475475
# https://kubernetes.io/docs/concepts/containers/images/#specifying-imagepullsecrets-on-a-pod
476476
# imagePullSecrets:
477-
# - secretname
477+
# - secretname
478+
479+
telemetry:
480+
# enable telemetry configurators
481+
enabled: false
482+
# Supported value cloudwatch | prometheus | slf4j | jmx
483+
# for non JMX telemetry configurator, jar file must be pre-allocated in `/jars/3rdparty`
484+
# fork docker image or use extra volumes to add it.
485+
# type: "jmx"
486+
# jmxPort: 9072
487+
# multiline value for dremio-telemtry.yaml
488+
# yaml: |-
489+
# auto-reload:
490+
# enabled: True
491+
# period: 500
492+
# unit: MILLISECONDS
493+
#
494+
# metrics:
495+
# - name: jobs
496+
# reporter:
497+
# type: jmx

0 commit comments

Comments
 (0)