diff --git a/prometheus/scrape_configs.libsonnet b/prometheus/scrape_configs.libsonnet index 4d6f6b446..5ddebae3f 100644 --- a/prometheus/scrape_configs.libsonnet +++ b/prometheus/scrape_configs.libsonnet @@ -255,6 +255,14 @@ ], metric_relabel_configs: [ + // Let system processes like kubelet survive the next rule by giving them a fake image. + { + source_labels: ['__name__', 'id'], + regex: 'container_([a-z_]+);/system.slice/(.+)', + target_label: 'image', + replacement: '$2', + }, + // Drop container_* metrics with no image. { source_labels: ['__name__', 'image'],