Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

222
Vistas
Renaming metrics in service monitor

after reading this article I'm trying to cleanup metrics going out of Spark 3.0.1. Here is my servicemonitor.yml file:

apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
  labels:
    app: spark3
    release:  prometheus
  name: spark3-servicemonitor
spec:
  endpoints:
  - interval: 5s
    port: spark-ui
    path: /metrics/prometheus
    relabelings:
    # Rename metrics
      - sourceLabels: [__name__]
        targetLabel: __name__
        regex: 'metrics_spark_driver_.+_StreamingMetrics_([a-zA-Z_]{1,})_Value'
        replacement: 'spark_driver_$1'
  namespaceSelector:
    matchNames:
    - default
  selector:
    matchLabels:
      spark-version: "3"

I expect the following transformation: metrics_spark_driver_whateverappid_StreamingMetrics_streaming_lastCompletedBatch_totalDelay_Value -> spark_driver_streaming_lastCompletedBatch_totalDelay however the relabelling does not seem to work. Could you please assist me on this subject?

over 4 years ago · Santiago Trujillo
1 Respuestas
Responde la pregunta

0

The relabelings must be named metricRelabelings according to the spec. Note that the yaml format of the ServiceMonitors does not use the same key names as the corresponding prometheus config (but it is still valid yaml).

over 4 years ago · Santiago Trujillo Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda