Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update kubelet_scrape_config example #1464

Merged
merged 4 commits into from
Dec 17, 2024
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
relabel_configs:
- action: replace
regex: "(.*)"
replacement: "$1"
replacement: "$$1"
separator: ";"
source_labels:
- job
Expand All @@ -25,7 +25,7 @@
target_label: job
- action: replace
regex: "(.*)"
replacement: "${1}"
replacement: "$$1"
separator: ";"
source_labels:
- __meta_kubernetes_node_name
Expand All @@ -37,22 +37,22 @@
target_label: endpoint
- action: replace
regex: "(.*)"
replacement: "$1"
replacement: "$$1"
separator: ";"
source_labels:
- __metrics_path__
target_label: metrics_path
- action: hashmod
modulus: 1
regex: "(.*)"
replacement: "$1"
replacement: "$$1"
separator: ";"
source_labels:
- __address__
target_label: __tmp_hash
- action: keep
regex: "$(SHARD)"
replacement: "$1"
replacement: "$$1"
separator: ";"
source_labels:
- __tmp_hash
Expand Down Expand Up @@ -81,37 +81,37 @@
metric_relabel_configs:
- action: drop
regex: container_cpu_(cfs_throttled_seconds_total|load_average_10s|system_seconds_total|user_seconds_total)
replacement: "$1"
replacement: "$$1"
separator: ";"
source_labels:
- __name__
- action: drop
regex: container_fs_(io_current|io_time_seconds_total|io_time_weighted_seconds_total|reads_merged_total|sector_reads_total|sector_writes_total|writes_merged_total)
replacement: "$1"
replacement: "$$1"
separator: ";"
source_labels:
- __name__
- action: drop
regex: container_memory_(mapped_file|swap)
replacement: "$1"
replacement: "$$1"
separator: ";"
source_labels:
- __name__
- action: drop
regex: container_(file_descriptors|tasks_state|threads_max)
replacement: "$1"
replacement: "$$1"
separator: ";"
source_labels:
- __name__
- action: drop
regex: container_spec.*
replacement: "$1"
replacement: "$$1"
separator: ";"
source_labels:
- __name__
- action: drop
regex: ".+;"
replacement: "$1"
replacement: "$$1"
separator: ";"
source_labels:
- id
Expand All @@ -120,7 +120,7 @@
relabel_configs:
- action: replace
regex: "(.*)"
replacement: "$1"
replacement: "$$1"
separator: ";"
source_labels:
- job
Expand All @@ -130,7 +130,7 @@
target_label: job
- action: replace
regex: "(.*)"
replacement: "${1}"
replacement: "$$1"
separator: ";"
source_labels:
- __meta_kubernetes_node_name
Expand All @@ -142,22 +142,22 @@
target_label: endpoint
- action: replace
regex: "(.*)"
replacement: "$1"
replacement: "$$1"
separator: ";"
source_labels:
- __metrics_path__
target_label: metrics_path
- action: hashmod
modulus: 1
regex: "(.*)"
replacement: "$1"
replacement: "$$1"
separator: ";"
source_labels:
- __address__
target_label: __tmp_hash
- action: keep
regex: "$(SHARD)"
replacement: "$1"
replacement: "$$1"
separator: ";"
source_labels:
- __tmp_hash
Expand Down Expand Up @@ -189,7 +189,7 @@
relabel_configs:
- action: replace
regex: "(.*)"
replacement: "$1"
replacement: "$$1"
separator: ";"
source_labels:
- job
Expand All @@ -199,7 +199,7 @@
target_label: job
- action: replace
regex: "(.*)"
replacement: "${1}"
replacement: "$$1"
separator: ";"
source_labels:
- __meta_kubernetes_node_name
Expand All @@ -211,22 +211,22 @@
target_label: endpoint
- action: replace
regex: "(.*)"
replacement: "$1"
replacement: "$$1"
separator: ";"
source_labels:
- __metrics_path__
target_label: metrics_path
- action: hashmod
modulus: 1
regex: "(.*)"
replacement: "$1"
replacement: "$$1"
separator: ";"
source_labels:
- __address__
target_label: __tmp_hash
- action: keep
regex: "$(SHARD)"
replacement: "$1"
replacement: "$$1"
separator: ";"
source_labels:
- __tmp_hash
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ spec:
relabel_configs:
- action: replace
regex: (.*)
replacement: $1
replacement: $$1
separator: ;
source_labels:
- job
Expand All @@ -66,7 +66,7 @@ spec:
target_label: job
- action: replace
regex: (.*)
replacement: ${1}
replacement: $$1
separator: ;
source_labels:
- __meta_kubernetes_node_name
Expand All @@ -78,22 +78,22 @@ spec:
target_label: endpoint
- action: replace
regex: (.*)
replacement: $1
replacement: $$1
separator: ;
source_labels:
- __metrics_path__
target_label: metrics_path
- action: hashmod
modulus: 1
regex: (.*)
replacement: $1
replacement: $$1
separator: ;
source_labels:
- __address__
target_label: __tmp_hash
- action: keep
regex: $(SHARD)
replacement: $1
replacement: $$1
separator: ;
source_labels:
- __tmp_hash
Expand All @@ -117,37 +117,37 @@ spec:
metric_relabel_configs:
- action: drop
regex: container_cpu_(cfs_throttled_seconds_total|load_average_10s|system_seconds_total|user_seconds_total)
replacement: $1
replacement: $$1
separator: ;
source_labels:
- __name__
- action: drop
regex: container_fs_(io_current|io_time_seconds_total|io_time_weighted_seconds_total|reads_merged_total|sector_reads_total|sector_writes_total|writes_merged_total)
replacement: $1
replacement: $$1
separator: ;
source_labels:
- __name__
- action: drop
regex: container_memory_(mapped_file|swap)
replacement: $1
replacement: $$1
separator: ;
source_labels:
- __name__
- action: drop
regex: container_(file_descriptors|tasks_state|threads_max)
replacement: $1
replacement: $$1
separator: ;
source_labels:
- __name__
- action: drop
regex: container_spec.*
replacement: $1
replacement: $$1
separator: ;
source_labels:
- __name__
- action: drop
regex: .+;
replacement: $1
replacement: $$1
separator: ;
source_labels:
- id
Expand All @@ -156,7 +156,7 @@ spec:
relabel_configs:
- action: replace
regex: (.*)
replacement: $1
replacement: $$1
separator: ;
source_labels:
- job
Expand All @@ -166,7 +166,7 @@ spec:
target_label: job
- action: replace
regex: (.*)
replacement: ${1}
replacement: $$1
separator: ;
source_labels:
- __meta_kubernetes_node_name
Expand All @@ -178,22 +178,22 @@ spec:
target_label: endpoint
- action: replace
regex: (.*)
replacement: $1
replacement: $$1
separator: ;
source_labels:
- __metrics_path__
target_label: metrics_path
- action: hashmod
modulus: 1
regex: (.*)
replacement: $1
replacement: $$1
separator: ;
source_labels:
- __address__
target_label: __tmp_hash
- action: keep
regex: $(SHARD)
replacement: $1
replacement: $$1
separator: ;
source_labels:
- __tmp_hash
Expand All @@ -218,7 +218,7 @@ spec:
relabel_configs:
- action: replace
regex: (.*)
replacement: $1
replacement: $$1
separator: ;
source_labels:
- job
Expand All @@ -228,7 +228,7 @@ spec:
target_label: job
- action: replace
regex: (.*)
replacement: ${1}
replacement: $$1
separator: ;
source_labels:
- __meta_kubernetes_node_name
Expand All @@ -240,22 +240,22 @@ spec:
target_label: endpoint
- action: replace
regex: (.*)
replacement: $1
replacement: $$1
separator: ;
source_labels:
- __metrics_path__
target_label: metrics_path
- action: hashmod
modulus: 1
regex: (.*)
replacement: $1
replacement: $$1
separator: ;
source_labels:
- __address__
target_label: __tmp_hash
- action: keep
regex: $(SHARD)
replacement: $1
replacement: $$1
separator: ;
source_labels:
- __tmp_hash
Expand Down
Loading