BTW, the metric_relabel_config works with below config to avoid 'le="+Inf"' 
lable, but same configuration with relabel_config does not work.

metric_relabel_configs:

- source_labels: [le] 

   regex: '\+Inf'

   action: 'drop'

在2021年2月16日星期二 UTC+8 下午2:35:17<He Wu> 写道:

> Hi everyone,  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 . I have tried to write relabel_config to 
> achieve , that but did not success. Cloud you please advice how is the  
> relabel_config should be written, thanks! 
>
> Here is the sample matric output from kube-apiserver:
> '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'
>
> Regards,
> He
>

-- 
You received this message because you are subscribed to the Google Groups 
"Prometheus Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/prometheus-users/7600d164-feb3-4716-b062-7348b7a1e470n%40googlegroups.com.

Reply via email to