On 12 Feb 11:57, Dhiman Barman wrote:
> Hi,
>
> It will be useful to have a way to combine metric labels and create a new
> label as follows.
>
> metric_name{label1=a, label2=b} => metric_name{label1=a, label2=b,
> combined_label=a_b}
> metric_name{label1=b, label2=a} => metric_name{label1=b, label2=a,
> combined_label=a_b}
You can use label_join
https://prometheus.io/docs/prometheus/latest/querying/functions/#label_join
Or do that with metrics relabelling.
> The combined label will be inserted into the original metric. In the
> AlertManager, we can use *group_by{}* on the
> combined label so two separate tickets do not get created in JIRA.
> Furthermore, we also do not want
> AlertManager to propagate the combined_label downstream. The combined label
> is for grouping in the
> AlertManager only.
You don't need to combine to group them together.
>
> Will there be any issue if this feature is added in Prometheus ?
>
> Thanks,
> Dhiman
>
> --
> You received this message because you are subscribed to the Google Groups "Prometheus Developers" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to
prometheus-devel...@googlegroups.com.
> To view this discussion on the web visit
https://groups.google.com/d/msgid/prometheus-developers/CA%2BLhoFzNHddec%3D4TOcXEAgHkJBrkzX-FXe2EjekRtp8QVMeC%3Dw%40mail.gmail.com.
--
(o- Julien Pivotto
//\ Open-Source Consultant
V_/_ Inuits -
https://www.inuits.eu