<commit_before>apiVersion: monitoring.coreos.com/v1
kind: PodMonitor

metadata:
  name: logs-fluent-exporter
  labels:
    prometheus: {{ .Values.exporter.prometheus }}

spec:
  jobLabel: logs-fluent-exporter

  selector:
    matchLabels:
      component: fluent

  # Find pods in any namespace.
  namespaceSelector:
    matchNames: [logs]

  podMetricsEndpoints:
    - interval: 60s
      scrapeTimeout: 50s
      path: /metrics
      scheme: http
      port: metrics
      relabelings:
        - action: labelmap
          regex: '__meta_kubernetes_pod_label_(.+)'
        - targetLabel: job
          replacement: logs-fluent-exporter
      metricRelabelings:
        - sourceLabels: [__name__,tag]
          regex: fluentd_input_status_num_records_total;kubernetes.var.log.containers.([a-zA-Z0-9 \d\.-]+)_([a-zA-Z0-9 \d\.-]+)_([a-zA-Z0-9 \d\.-]+)-[a-zA-Z0-9]+.log
          replacement: $1
          targetLabel: input_pod
          action: replace
        - sourceLabels: [__name__,tag]
          regex: fluentd_input_status_num_records_total;kubernetes.var.log.containers.([a-zA-Z0-9 \d\.-]+)_([a-zA-Z0-9 \d\.-]+)_([a-zA-Z0-9 \d\.-]+)-[a-zA-Z0-9]+.log
          replacement: $2
          targetLabel: input_namespace
          action: replace
        - sourceLabels: [__name__,tag]
          regex: fluentd_input_status_num_records_total;kubernetes.var.log.containers.([a-zA-Z0-9 \d\.-]+)_([a-zA-Z0-9 \d\.-]+)_([a-zA-Z0-9 \d\.-]+)-[a-z0-9]{64}.log
          replacement: $3
          targetLabel: input_container
          action: replace
        - sourceLabels: [__name__,tag]
          regex: fluentd_output_status_num_records_total;kubernetes.var.log.containers.([a-zA-Z0-9 \d\.-]+)_([a-zA-Z0-9 \d\.-]+)_([a-zA-Z0-9 \d\.-]+)-[a-zA-Z0-9]+.log
          replacement: $1
          targetLabel: input_pod
          action: replace
        - sourceLabels: [__name__,tag]
          regex: fluentd_ouput_status_num_records_total;kubernetes.var.log.containers.([a-zA-Z0-9 \d\.-]+)_([a-zA-Z0-9 \d\.-]+)_([a-zA-Z0-9 \d\.-]+)-[a-zA-Z0-9]+.log
          replacement: $2
          targetLabel: input_namespace
          action: replace
        - sourceLabels: [__name__,tag]
          regex: fluentd_ouput_status_num_records_total;kubernetes.var.log.containers.([a-zA-Z0-9 \d\.-]+)_([a-zA-Z0-9 \d\.-]+)_([a-zA-Z0-9 \d\.-]+)-[a-z0-9]{64}.log
          replacement: $3
          targetLabel: input_container
          action: replace
        - regex: 'tag'
          action: labeldrop<commit_msg>[logs] fix typo<commit_after>apiVersion: monitoring.coreos.com/v1
kind: PodMonitor

metadata:
  name: logs-fluent-exporter
  labels:
    prometheus: {{ .Values.exporter.prometheus }}

spec:
  jobLabel: logs-fluent-exporter

  selector:
    matchLabels:
      component: fluent

  # Find pods in any namespace.
  namespaceSelector:
    matchNames: [logs]

  podMetricsEndpoints:
    - interval: 60s
      scrapeTimeout: 50s
      path: /metrics
      scheme: http
      port: metrics
      relabelings:
        - action: labelmap
          regex: '__meta_kubernetes_pod_label_(.+)'
        - targetLabel: job
          replacement: logs-fluent-exporter
      metricRelabelings:
        - sourceLabels: [__name__,tag]
          regex: fluentd_input_status_num_records_total;kubernetes.var.log.containers.([a-zA-Z0-9 \d\.-]+)_([a-zA-Z0-9 \d\.-]+)_([a-zA-Z0-9 \d\.-]+)-[a-zA-Z0-9]+.log
          replacement: $1
          targetLabel: input_pod
          action: replace
        - sourceLabels: [__name__,tag]
          regex: fluentd_input_status_num_records_total;kubernetes.var.log.containers.([a-zA-Z0-9 \d\.-]+)_([a-zA-Z0-9 \d\.-]+)_([a-zA-Z0-9 \d\.-]+)-[a-zA-Z0-9]+.log
          replacement: $2
          targetLabel: input_namespace
          action: replace
        - sourceLabels: [__name__,tag]
          regex: fluentd_input_status_num_records_total;kubernetes.var.log.containers.([a-zA-Z0-9 \d\.-]+)_([a-zA-Z0-9 \d\.-]+)_([a-zA-Z0-9 \d\.-]+)-[a-z0-9]{64}.log
          replacement: $3
          targetLabel: input_container
          action: replace
        - sourceLabels: [__name__,tag]
          regex: fluentd_output_status_num_records_total;kubernetes.var.log.containers.([a-zA-Z0-9 \d\.-]+)_([a-zA-Z0-9 \d\.-]+)_([a-zA-Z0-9 \d\.-]+)-[a-zA-Z0-9]+.log
          replacement: $1
          targetLabel: input_pod
          action: replace
        - sourceLabels: [__name__,tag]
          regex: fluentd_output_status_num_records_total;kubernetes.var.log.containers.([a-zA-Z0-9 \d\.-]+)_([a-zA-Z0-9 \d\.-]+)_([a-zA-Z0-9 \d\.-]+)-[a-zA-Z0-9]+.log
          replacement: $2
          targetLabel: input_namespace
          action: replace
        - sourceLabels: [__name__,tag]
          regex: fluentd_output_status_num_records_total;kubernetes.var.log.containers.([a-zA-Z0-9 \d\.-]+)_([a-zA-Z0-9 \d\.-]+)_([a-zA-Z0-9 \d\.-]+)-[a-z0-9]{64}.log
          replacement: $3
          targetLabel: input_container
          action: replace
        - regex: 'tag'
          action: labeldrop
{'fraction_non_alphanumeric': 0.16773675762439808, 'fraction_numerical': 0.025280898876404494, 'mean_word_length': 2.264571054354944, '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': '7148680', 'n_tokens_mistral': 1904, 'n_tokens_neox': 1834, 'n_words': 257}