Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save derbeneviv/e933ef29fa6cf89c5bb63b1d392cbce1 to your computer and use it in GitHub Desktop.
Save derbeneviv/e933ef29fa6cf89c5bb63b1d392cbce1 to your computer and use it in GitHub Desktop.
- job_name: podMonitor/trino-test/trino-coordinator-monitor/0
honor_timestamps: true
scrape_interval: 30s
scrape_timeout: 10s
metrics_path: /metrics
scheme: http
follow_redirects: true
relabel_configs:
- source_labels: [job]
separator: ;
regex: (.*)
target_label: __tmp_prometheus_job_name
replacement: $1
action: replace
- source_labels: [__meta_kubernetes_pod_label_app]
separator: ;
regex: trino
replacement: $1
action: keep
- source_labels: [__meta_kubernetes_pod_container_port_name]
separator: ;
regex: metrics
replacement: $1
action: keep
- source_labels: [__meta_kubernetes_namespace]
separator: ;
regex: (.*)
target_label: namespace
replacement: $1
action: replace
- source_labels: [__meta_kubernetes_pod_container_name]
separator: ;
regex: (.*)
target_label: container
replacement: $1
action: replace
- source_labels: [__meta_kubernetes_pod_name]
separator: ;
regex: (.*)
target_label: pod
replacement: $1
action: replace
- separator: ;
regex: (.*)
target_label: job
replacement: trino-test/trino-coordinator-monitor
action: replace
- separator: ;
regex: (.*)
target_label: endpoint
replacement: metrics
action: replace
- source_labels: [__meta_kubernetes_namespace]
separator: ;
regex: (.*)
target_label: kubernetes_namespace
replacement: $1
action: replace
- source_labels: [__meta_kubernetes_pod_node_name]
separator: ;
regex: (.*)
target_label: node_name
replacement: $1
action: replace
- separator: ;
regex: namespace|endpoint|job
replacement: $1
action: labeldrop
- separator: ;
regex: __meta_kubernetes_pod_label_(.+)
replacement: $1
action: labelmap
- source_labels: [__name__]
separator: ;
regex: trino_failuredetector_HeartbeatFailureDetector_ActiveCount
target_label: test_remote_write
replacement: foo
action: replace
- source_labels: [__address__]
separator: ;
regex: (.*)
modulus: 1
target_label: __tmp_hash
replacement: $1
action: hashmod
- source_labels: [__tmp_hash]
separator: ;
regex: "0"
replacement: $1
action: keep
kubernetes_sd_configs:
- role: pod
kubeconfig_file: ""
follow_redirects: true
namespaces:
names:
- trino-test
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment