Skip to content

Commit

Permalink
Eanble JMX monitoring for all spark pods
Browse files Browse the repository at this point in the history
  • Loading branch information
fjammes committed Feb 7, 2025
1 parent 1f3ddad commit d4e948d
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 2 deletions.
5 changes: 3 additions & 2 deletions chart/templates/podmonitor.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,9 @@ metadata:
monitored: "true"
spec:
selector:
matchLabels:
sparkoperator.k8s.io/app-name: fink-broker-stream2raw
matchExpressions:
- key: "spark-role"
operator: "Exists"
podMetricsEndpoints:
- port: jmx-exporter
{{- end }}
9 changes: 9 additions & 0 deletions chart/templates/spark-fink-distribution.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,3 +41,12 @@ spec:
volumeMounts:
- name: kafka-secret
mountPath: /etc/fink-broker
{{- if eq .Values.monitoring.enabled true }}
monitoring:
exposeDriverMetrics: true
exposeExecutorMetrics: true
prometheus:
# Added in Dockerfile
jmxExporterJar: "/opt/spark/jars/jmx_prometheus_javaagent-1.1.0.jar"
port: 8090
{{- end }}
9 changes: 9 additions & 0 deletions chart/templates/spark-fink-raw2science.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,12 @@ spec:
instances: {{ tpl .Values.raw2science.instances . }}
labels:
version: 3.4.1
{{- if eq .Values.monitoring.enabled true }}
monitoring:
exposeDriverMetrics: true
exposeExecutorMetrics: true
prometheus:
# Added in Dockerfile
jmxExporterJar: "/opt/spark/jars/jmx_prometheus_javaagent-1.1.0.jar"
port: 8090
{{- end }}

0 comments on commit d4e948d

Please sign in to comment.