Thanks Stuart and Ben,

Can you provide an example on how to drop the specific label from the 
metric?
It's not so clear from the docs on how it should be done.

So, if I understand it correctly, the metric label is *kube_pod_info, *inside 
of it, the field *UID* is another label that I can drop using labeldrop?

On Monday, June 8, 2020 at 6:53:25 PM UTC+3, Tomer Leibovich wrote:
>
> Hi,
>
> I'm monitoring my K8s environment using prometheus-operator chart.
> I'm trying to understand how can I drop certain metrics, for example, if I 
> do 
> kube_pod_info{namespace="monitoring"}
> I will have the following output:
>
>
> kube_pod_info{created_by_kind="DaemonSet",created_by_name="prom-operator-prometheus-node-exporter",endpoint="http",host_ip="192.168.83.60",instance="
> 10.133.86.207:8080
> ",job="kube-state-metrics",namespace="monitoring",node="node2",pod="prom-operator-prometheus-node-exporter-nrck9",pod_ip="192.168.83.60",service="prom-operator-kube-state-metrics",uid="ecd029bf-e998-4b7b-a0dc-7eeefec25668"}
>
> So I'm trying to understand how I can drop from here the UID part.
>
> I've tried creating the following relabel_config:
>     relabelings:
>     - sourceLabels: [uid]
>       action: drop
>
> It did nothing.
> Also, I've tried:
> - action: drop
> regex: 'uid.+'
> sourceLabels: [uid]
>
> And this did nothing as well...
>
> Any help to understand it will be very much appreciated.
>
>
>

-- 
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 prometheus-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/prometheus-users/0a80121b-4724-4202-9383-e940be9f15e8o%40googlegroups.com.

Reply via email to