<commit_before>{{- if .Values.elasticsearchExporter.exporter.enabled }}
apiVersion: monitoring.coreos.com/v1
kind: PodMonitor

metadata:
  name: es-exporter-elastiflow
  labels:
    prometheus: {{ .Values.elasticsearchExporter.exporter.prometheus }}

spec:
  jobLabel: es-exporter-elastiflow

  selector:
    matchLabels:
      component: es-exporter-elastiflow

  # Find pods in any namespace.
  namespaceSelector:
    any: true

  podMetricsEndpoints:
    - interval: 60s
      scrapeTimeout: 50s
      path: /metrics
      scheme: http
      port: metrics
      relabelings:
        - action: labelmap
          regex: '__meta_kubernetes_pod_label_(.+)'
        - targetLabel: job
          replacement: es-exporter-elastiflow
      metricRelabelings:
        - sourceLabels: [__name__, cluster]
          regex: '^(es|elasticsearch)_.+;(.*)'
          replacement: $2
          targetLabel: elastic_cluster
        - regex: "controller_revision_hash|pod_template_hash|statefulset_kubernetes_io_pod_name|nodeid|cluster|endpoint"
          action: labeldrop
        - action: replace
          targetLabel: region
          replacement: {{ required ".Values.global.region missing" .Values.global.region }}
        - action: replace
          targetLabel: cluster_type
          replacement: {{ required ".Values.global.clusterType missing" .Values.global.clusterType }}
        - action: replace
          targetLabel: cluster
          replacement: {{ if .Values.global.cluster }}{{ .Values.global.cluster }}{{ else }}{{ .Values.global.region }}{{ end }}
{{- end }}
<commit_msg>[Elastiflow] Adds dropping indexx metric in PodMonitor (#2666)<commit_after>{{- if .Values.elasticsearchExporter.exporter.enabled }}
apiVersion: monitoring.coreos.com/v1
kind: PodMonitor

metadata:
  name: es-exporter-elastiflow
  labels:
    prometheus: {{ .Values.elasticsearchExporter.exporter.prometheus }}

spec:
  jobLabel: es-exporter-elastiflow

  selector:
    matchLabels:
      component: es-exporter-elastiflow

  # Find pods in any namespace.
  namespaceSelector:
    any: true

  podMetricsEndpoints:
    - interval: 60s
      scrapeTimeout: 50s
      path: /metrics
      scheme: http
      port: metrics
      relabelings:
        - action: labelmap
          regex: '__meta_kubernetes_pod_label_(.+)'
        - targetLabel: job
          replacement: es-exporter-elastiflow
      metricRelabelings:
        - sourceLabels: [__name__, cluster]
          regex: '^(es|elasticsearch)_.+;(.*)'
          replacement: $2
          targetLabel: elastic_cluster
        - regex: "controller_revision_hash|pod_template_hash|statefulset_kubernetes_io_pod_name|nodeid|cluster|endpoint"
          action: labeldrop
        - action: replace
          targetLabel: region
          replacement: {{ required ".Values.global.region missing" .Values.global.region }}
        - action: replace
          targetLabel: cluster_type
          replacement: {{ required ".Values.global.clusterType missing" .Values.global.clusterType }}
        - action: replace
          targetLabel: cluster
          replacement: {{ if .Values.global.cluster }}{{ .Values.global.cluster }}{{ else }}{{ .Values.global.region }}{{ end }}
        - source_labels: [__name__,app]
          regex: 'es_index_shards_number;(elastiflow-data)'
          action: drop
{{- end }}
{'fraction_non_alphanumeric': 0.1074107410741074, 'fraction_numerical': 0.004800480048004801, 'mean_word_length': 2.7376681614349776, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5825905', 'n_tokens_mistral': 987, 'n_tokens_neox': 965, 'n_words': 197}