Skip to content
This repository has been archived by the owner on May 31, 2022. It is now read-only.

[Q] Autodiscovery of roadrunner pods with prometheus #106

Discussion options

You must be logged in to vote

The seemingly working config snippet is below.

scrape_configs:
  - job_name: "kubernetes-pods"
    kubernetes_sd_configs:
      - role: pod
    relabel_configs:
      - source_labels: [__meta_kubernetes_pod_annotation_prometheus_io_scrape]
        action: keep
        regex: true
      - source_labels: [__address__, __meta_kubernetes_pod_annotation_prometheus_io_port]
        action: replace
        regex: ([^:]+)(?::\d+)?;(\d+)
        replacement: $1:$2
        target_label: __address__
      - action: labelmap
        regex: __meta_kubernetes_pod_label_(.+)
      - source_labels: [__meta_kubernetes_namespace]
        action: replace
        target_label: kubernetes_namespace
      - so…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by victor-sudakov
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
S-RFC Request for comments
1 participant