Skip to content

Instantly share code, notes, and snippets.

@srikanthccv
Created June 6, 2024 15:17
Show Gist options
  • Save srikanthccv/601f812f0c8a9ceeb1659b5b49e31748 to your computer and use it in GitHub Desktop.
Save srikanthccv/601f812f0c8a9ceeb1659b5b49e31748 to your computer and use it in GitHub Desktop.
override-values.yaml
otelDeployment:
config:
receivers:
prometheus:
config:
scrape_configs:
- job_name: pod_metrics
kubernetes_sd_configs:
- role: pod
relabel_configs:
- action: keep
regex: true
source_labels:
- __meta_kubernetes_pod_annotation_prometheus_io_scrape
- action: replace
regex: (.+)
source_labels:
- __meta_kubernetes_pod_annotation_prometheus_io_path
target_label: __metrics_path__
- action: replace
separator: ':'
source_labels:
- __meta_kubernetes_pod_ip
- __meta_kubernetes_pod_annotation_prometheus_io_port
target_label: __address__
- replacement: pod_metrics
target_label: job_name
- action: replace
source_labels:
- __meta_kubernetes_namespace
target_label: k8s_namespace_name
- action: replace
source_labels:
- __meta_kubernetes_pod_name
target_label: k8s_pod_name
- action: replace
source_labels:
- __meta_kubernetes_pod_uid
target_label: k8s_pod_uid
- action: replace
source_labels:
- __meta_kubernetes_pod_node_name
target_label: k8s_node_name
- action: replace
source_labels:
- __meta_kubernetes_pod_ready
target_label: k8s_pod_ready
- action: replace
source_labels:
- __meta_kubernetes_pod_phase
target_label: k8s_pod_phase
scrape_interval: 60s
service:
pipelines:
metrics/internal:
receivers: [prometheus]
processors: [batch]
exporters: []
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment