apiVersion: v1
data:
  scrape.yml: |
    global:
      external_labels:
        cluster: k8s-and-chill
      scrape_interval: 30s
      scrape_timeout: 10s
    scrape_configs:
    - job_name: victoriametrics
      static_configs:
      - targets:
        - localhost:8428
    - job_name: node-exporter
      kubernetes_sd_configs:
      - role: endpoints
      relabel_configs:
      - action: keep
        regex: monitoring;prometheus-node-exporter;metrics
        source_labels:
        - __meta_kubernetes_namespace
        - __meta_kubernetes_service_name
        - __meta_kubernetes_endpoint_port_name
    - job_name: kube-state-metrics
      kubernetes_sd_configs:
      - role: endpoints
      relabel_configs:
      - action: keep
        regex: monitoring;kube-state-metrics;http
        source_labels:
        - __meta_kubernetes_namespace
        - __meta_kubernetes_service_name
        - __meta_kubernetes_endpoint_port_name
    - bearer_token_file: /var/run/secrets/kubernetes.io/serviceaccount/token
      job_name: kubelet
      kubernetes_sd_configs:
      - role: node
      relabel_configs:
      - action: labelmap
        regex: __meta_kubernetes_node_label_(.+)
      scheme: https
      tls_config:
        ca_file: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt
        insecure_skip_verify: true
    - bearer_token_file: /var/run/secrets/kubernetes.io/serviceaccount/token
      job_name: kubelet-cadvisor
      kubernetes_sd_configs:
      - role: node
      metrics_path: /metrics/cadvisor
      relabel_configs:
      - action: labelmap
        regex: __meta_kubernetes_node_label_(.+)
      scheme: https
      tls_config:
        ca_file: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt
        insecure_skip_verify: true
    - job_name: traefik
      kubernetes_sd_configs:
      - role: endpoints
      relabel_configs:
      - action: keep
        regex: traefik;traefik;metrics
        source_labels:
        - __meta_kubernetes_namespace
        - __meta_kubernetes_service_name
        - __meta_kubernetes_endpoint_port_name
    - job_name: argocd
      kubernetes_sd_configs:
      - role: endpoints
      relabel_configs:
      - action: keep
        regex: argocd;http-metrics
        source_labels:
        - __meta_kubernetes_namespace
        - __meta_kubernetes_endpoint_port_name
    - job_name: cert-manager
      kubernetes_sd_configs:
      - role: endpoints
      relabel_configs:
      - action: keep
        regex: cert-manager;cert-manager;tcp-prometheus-servicemonitor
        source_labels:
        - __meta_kubernetes_namespace
        - __meta_kubernetes_service_name
        - __meta_kubernetes_endpoint_port_name
    - job_name: ocis
      kubernetes_sd_configs:
      - namespaces:
          names:
          - ocis
        role: endpoints
      relabel_configs:
      - action: keep
        regex: enabled;metrics-debug
        source_labels:
        - __meta_kubernetes_service_label_ocis_metrics
        - __meta_kubernetes_endpoint_port_name
      - source_labels:
        - __meta_kubernetes_service_name
        target_label: ocis_service
      - source_labels:
        - __meta_kubernetes_pod_name
        target_label: pod
    - job_name: synapse
      kubernetes_sd_configs:
      - namespaces:
          names:
          - matrix
        role: endpoints
      metrics_path: /_synapse/metrics
      relabel_configs:
      - action: keep
        regex: enabled;metrics
        source_labels:
        - __meta_kubernetes_service_label_matrix_metrics
        - __meta_kubernetes_endpoint_port_name
      - source_labels:
        - __meta_kubernetes_pod_name
        target_label: pod
      - replacement: "0"
        target_label: index
kind: ConfigMap
metadata:
  annotations:
    a8r.io/repository: ssh://git@git.tr1ceracop.de:222/gitea_admin/k8s-and-chill.git
  labels:
    app: server
    app.kubernetes.io/instance: victoria-metrics-single
    app.kubernetes.io/managed-by: Helm
    app.kubernetes.io/name: victoria-metrics-single
    app.kubernetes.io/version: v1.138.0
    helm.sh/chart: victoria-metrics-single-0.33.0
  name: victoria-metrics-single-server-scrapeconfig
  namespace: monitoring
