Skip to content

Commit 1a1ba37

Browse files
committed
scrape Spark drivers
1 parent 3ea7f4e commit 1a1ba37

1 file changed

Lines changed: 31 additions & 1 deletion

File tree

stacks/monitoring/prometheus-service-monitors.yaml

Lines changed: 31 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
# [x] NiFi 1 - native
1414
# [x] NiFi 2 - native
1515
# [ ] OpenSearch - not officially part of the platform yet
16-
# [ ] Spark - native - was too lazy
16+
# [ ] Spark - native - partially done, see comment on it below
1717
# [x] Superset - exporter
1818
# [x] Trino - native
1919
# [x] ZooKeeper - native
@@ -226,6 +226,36 @@ spec:
226226
- app.kubernetes.io/role-group
227227
- app.kubernetes.io/version
228228
---
229+
# spark-k8s-operator does not deploy any Services at all (at least for SparkApplications).
230+
# We currently only scrape the driver, going forward we might want to scrape the executors as well.
231+
# In the future we might also want to scrape SparkConnect and HistoryServers.
232+
apiVersion: monitoring.coreos.com/v1
233+
kind: PodMonitor
234+
metadata:
235+
name: stackable-spark-application-driver
236+
labels:
237+
stackable.tech/vendor: Stackable
238+
release: prometheus
239+
spec:
240+
namespaceSelector:
241+
any: true
242+
selector:
243+
matchLabels:
244+
stackable.tech/vendor: Stackable
245+
prometheus.io/scrape: "true"
246+
app.kubernetes.io/name: spark-k8s
247+
spark-role: driver
248+
podMetricsEndpoints:
249+
- scheme: http
250+
port: spark-ui
251+
path: /metrics/prometheus
252+
podTargetLabels:
253+
- app.kubernetes.io/name
254+
- app.kubernetes.io/instance
255+
- app.kubernetes.io/component
256+
- app.kubernetes.io/role-group
257+
- app.kubernetes.io/version
258+
---
229259
apiVersion: monitoring.coreos.com/v1
230260
kind: ServiceMonitor
231261
metadata:

0 commit comments

Comments
 (0)