Hi all, I want to collect the kube-apiserver metrics by promethues but drop any label with 'le="+Inf"' , the other labels like 'le="1"' and 'le="10"' need to be kept , the metric is something like below:
'workqueue_work_duration_seconds_bucket{name="non_structural_schema_condition_controller",le="1"} 669
workqueue_work_duration_seconds_bucket{name="non_structural_schema_condition_controller",le="10"} 669
workqueue_work_duration_seconds_bucket{name="non_structural_schema_condition_controller",le="+Inf"} 669'
I have try to use "relabel_config" and "metric_relabel_confg" to achieve that, turn out "metric_relabel_confg" works , but "relabel_config" did not work with same configuration as below:
- source_labels: [le]
regex: '\+Inf'
action: 'drop'
In my special use case, i need to filter the "+Inf" label before ingesting to storage, so "relabel_config" is what i need to use. cloud you please help to advise how can i filter the "+Inf" label with "relabel_config". And beside the stage they take affect, what else different between "relabel_config" and "metric_relabel_confg" , why same config can not work on "relabel_config", thanks!
Regards,
He