<commit_before>rule_files:
  - ./*.rules

global:
  scrape_timeout: 55s

scrape_configs:
# Scrape config for service endpoints.
#
# The relabeling allows the actual service scrape endpoint to be configured
# via the following annotations:
#
# * `prometheus.io/scrape`: Only scrape services that have a value of `true`
# * `prometheus.io/scheme`: If the metrics endpoint is secured then you will need
# to set this to `https` & most likely set the `tls_config` of the scrape config.
# * `prometheus.io/path`: If the metrics path is not `/metrics` override this.
# * `prometheus.io/port`: If the metrics are exposed on a different port to the
# service then set this appropriately.
- job_name: 'endpoints'
  kubernetes_sd_configs:
  - role: endpoints
  relabel_configs:
  - action: keep
    source_labels: [__meta_kubernetes_service_annotation_prometheus_io_scrape]
    regex: true
  - action: keep
    source_labels: [__meta_kubernetes_pod_container_port_number, __meta_kubernetes_pod_container_port_name, __meta_kubernetes_service_annotation_prometheus_io_port]
    regex: (9102;.*;.*)|(.*;metrics;.*)|(.*;.*;\d+)
  - source_labels: [__meta_kubernetes_service_annotation_prometheus_io_scheme]
    target_label: __scheme__
    regex: (https?)
  - source_labels: [__meta_kubernetes_service_annotation_prometheus_io_path]
    target_label: __metrics_path__
    regex: (.+)
  - source_labels: [__address__, __meta_kubernetes_service_annotation_prometheus_io_port]
    target_label: __address__
    regex: ([^:]+)(?::\d+);(\d+)
    replacement: $1:$2
  - action: labelmap
    regex: __meta_kubernetes_service_label_(.+)
  - source_labels: [__meta_kubernetes_namespace]
    target_label: kubernetes_namespace
  - source_labels: [__meta_kubernetes_service_name]
    target_label: kubernetes_name
  # support injection of custom parameters. used by snmp exporter.
  - action: labelmap
    replacement: __param_$1
    regex: __meta_kubernetes_service_annotation_prometheus_io_scrape_param_(.+)
  metric_relabel_configs:
  - source_labels: [component]
    regex: 'snmp-exporter-(\w*-\w*-\w*)-(\S*)'
    replacement: '$1'
    target_label: availability_zone
  - source_labels: [component]
    regex: 'snmp-exporter-(\w*-\w*-\w*)-(\S*)'
    replacement: '$2'
    target_label: device
  - source_labels: [component, cluster]
    separator: ;
    regex: elasticsearch-exporter-(.+);(.+)
    target_label: elastic_cluster
    replacement: $2
    action: replace
  - regex: 'cluster'
    action: labeldrop
<commit_msg>New relabeling rule for F5 component label<commit_after>rule_files:
  - ./*.rules

global:
  scrape_timeout: 55s

scrape_configs:
# Scrape config for service endpoints.
#
# The relabeling allows the actual service scrape endpoint to be configured
# via the following annotations:
#
# * `prometheus.io/scrape`: Only scrape services that have a value of `true`
# * `prometheus.io/scheme`: If the metrics endpoint is secured then you will need
# to set this to `https` & most likely set the `tls_config` of the scrape config.
# * `prometheus.io/path`: If the metrics path is not `/metrics` override this.
# * `prometheus.io/port`: If the metrics are exposed on a different port to the
# service then set this appropriately.
- job_name: 'endpoints'
  kubernetes_sd_configs:
  - role: endpoints
  relabel_configs:
  - action: keep
    source_labels: [__meta_kubernetes_service_annotation_prometheus_io_scrape]
    regex: true
  - action: keep
    source_labels: [__meta_kubernetes_pod_container_port_number, __meta_kubernetes_pod_container_port_name, __meta_kubernetes_service_annotation_prometheus_io_port]
    regex: (9102;.*;.*)|(.*;metrics;.*)|(.*;.*;\d+)
  - source_labels: [__meta_kubernetes_service_annotation_prometheus_io_scheme]
    target_label: __scheme__
    regex: (https?)
  - source_labels: [__meta_kubernetes_service_annotation_prometheus_io_path]
    target_label: __metrics_path__
    regex: (.+)
  - source_labels: [__address__, __meta_kubernetes_service_annotation_prometheus_io_port]
    target_label: __address__
    regex: ([^:]+)(?::\d+);(\d+)
    replacement: $1:$2
  - action: labelmap
    regex: __meta_kubernetes_service_label_(.+)
  - source_labels: [__meta_kubernetes_namespace]
    target_label: kubernetes_namespace
  - source_labels: [__meta_kubernetes_service_name]
    target_label: kubernetes_name
  # support injection of custom parameters. used by snmp exporter.
  - action: labelmap
    replacement: __param_$1
    regex: __meta_kubernetes_service_annotation_prometheus_io_scrape_param_(.+)
  metric_relabel_configs:
  - source_labels: [component]
    regex: 'snmp-exporter-(\w*-\w*-\w*)-(\S*)'
    replacement: '$1'
    target_label: availability_zone
  - source_labels: [component]
    regex: 'snmp-exporter-(.+)'
    replacement: '$1'
    target_label: device
  - source_labels: [component, cluster]
    separator: ;
    regex: elasticsearch-exporter-(.+);(.+)
    target_label: elastic_cluster
    replacement: $2
    action: replace
  - regex: 'cluster'
    action: labeldrop

{'fraction_non_alphanumeric': 0.1082104424073336, 'fraction_numerical': 0.004982064567556795, 'mean_word_length': 4.632996632996633, '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': '3113344', 'n_tokens_mistral': 1699, 'n_tokens_neox': 1598, 'n_words': 382}