Skip to content

Commit 2dccf80

Browse files
authored
chore(): add cn pod scrape job (#15)
## What type of PR is this? * [ ] Feature * [x] BUG * [ ] Alerts * [ ] Improvement * [ ] Documentation * [ ] Test and CI ## Which issue(s) this PR related: issue # [#2806](https://github.com/matrixorigin/MO-Cloud/issues/2806) If this is a PR for adding Alert, please finish the workround below :) ## What this PR does / why we need it: 添加 Prometheus scrape job 专门采集 cn pods
1 parent 305c245 commit 2dccf80

File tree

2 files changed

+27
-1
lines changed

2 files changed

+27
-1
lines changed

charts/mo-ob-opensource/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ apiVersion: v2
22
name: mo-ob-opensource
33
description: mo-ob-opensource's Helm chart for Kubernetes
44
type: application
5-
version: 1.0.2-beta
5+
version: 1.0.3-alpha
66
appVersion: 0.9.0
77
dependencies:
88
- condition: kube-prometheus-stack.enabled

charts/mo-ob-opensource/values.yaml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -532,6 +532,32 @@ kube-prometheus-stack:
532532
- action: replace
533533
source_labels: [__meta_kubernetes_pod_name]
534534
target_label: pod
535+
- job_name: "matrixone-cn-pods"
536+
honor_labels: true
537+
kubernetes_sd_configs:
538+
- role: pod
539+
relabel_configs:
540+
- source_labels: [__meta_kubernetes_pod_labelpresent_matrixorigin_io_component]
541+
action: keep
542+
regex: true
543+
- source_labels: [__meta_kubernetes_pod_annotation_prometheus_io_scrape]
544+
action: keep
545+
regex: "true"
546+
- source_labels: [__meta_kubernetes_pod_annotation_prometheus_io_path]
547+
action: replace
548+
target_label: __metrics_path__
549+
regex: (.+)
550+
- source_labels: [__address__, __meta_kubernetes_pod_annotation_prometheus_io_port]
551+
action: replace
552+
target_label: __address__
553+
regex: (.+?)(?::\d+)?;(\d+)
554+
replacement: $1:$2
555+
- action: labelmap
556+
regex: __meta_kubernetes_pod_label_(.+)
557+
- source_labels: [__meta_kubernetes_pod_name]
558+
action: replace
559+
target_label: pod
560+
535561
alertingEndpoints:
536562
- name: "mo-ob-alertmanager"
537563
# 如果跨ns,需要修改

0 commit comments

Comments
 (0)