feat(prometheus): enable container CPU throttling metrics collection
- Override default cAdvisorMetricRelabelings - Remove cfs_throttled_seconds_total from drop regex - Enables CPU Throttled panels in Grafana dashboards Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -25,6 +25,28 @@ kubelet:
|
|||||||
replacement: "mayne-cluster"
|
replacement: "mayne-cluster"
|
||||||
- sourceLabels: [__metrics_path__]
|
- sourceLabels: [__metrics_path__]
|
||||||
targetLabel: metrics_path
|
targetLabel: metrics_path
|
||||||
|
# Override default drops to keep throttling metrics
|
||||||
|
cAdvisorMetricRelabelings:
|
||||||
|
# Drop unnecessary CPU metrics (but keep cfs_throttled_seconds_total)
|
||||||
|
- action: drop
|
||||||
|
regex: "container_cpu_(load_average_10s|system_seconds_total|user_seconds_total)"
|
||||||
|
sourceLabels: [__name__]
|
||||||
|
# Keep other default drops
|
||||||
|
- 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)"
|
||||||
|
sourceLabels: [__name__]
|
||||||
|
- action: drop
|
||||||
|
regex: "container_memory_(mapped_file|swap)"
|
||||||
|
sourceLabels: [__name__]
|
||||||
|
- action: drop
|
||||||
|
regex: "container_(file_descriptors|tasks_state|threads_max)"
|
||||||
|
sourceLabels: [__name__]
|
||||||
|
- action: drop
|
||||||
|
regex: "container_spec.*"
|
||||||
|
sourceLabels: [__name__]
|
||||||
|
- action: drop
|
||||||
|
regex: ".+;"
|
||||||
|
sourceLabels: [id, pod]
|
||||||
# Resource metrics
|
# Resource metrics
|
||||||
resourceRelabelings:
|
resourceRelabelings:
|
||||||
- targetLabel: cluster
|
- targetLabel: cluster
|
||||||
|
|||||||
Reference in New Issue
Block a user