The relabelling process doesn't happen on the *up *metric, so the metric 
doesn't have the correct labels I need for my query.

To illustrate this, imagine I have two services generating metrics

   - service A generates metrics with a label svc="service-a"
   - service B generates metrics with a label svc="service-b"

For whatever reason I want to relabel *svc* to *service*. This works for 
all the metrics other than *up*. 

I want to run Prometheus queries against different metrics using a 
consistent set of labels (e.g. *service *rather than *svc*). This is 
especially important using visualisation tools like Grafana (imagine a *service 
*drop down box).

On Wednesday, 13 January 2021 at 14:13:27 UTC Stuart Clark wrote:

> On 2021-01-13 13:55, Tom Gregory wrote:
> > I'm using Prometheus federation i.e. I'm ingesting metrics from one
> > Prometheus to another.
> > 
> > To do some relabelling I'm using _METRIC_RELABEL_CONFIGS_. According
> > to the docs [1]:
> > 
> > METRIC RELABELLING DOES NOT APPLY TO AUTOMATICALLY GENERATED
> > TIMESERIES SUCH AS UP.
> > 
> > That makes me sad because I want to measure uptime using these
> > metrics. Is there any suggested approach to getting around this
> > problem please? Any way to measure uptime without the automatically
> > generated _up_ metric?
> > 
>
> What is the problem you are having with the up metric?
>
> up (and a few others) are created by Prometheus to give some details 
> about scrapes. So they should "just work".
>
> -- 
> Stuart Clark
>

-- 
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/2b55e54f-d0cb-493d-ae69-0ef02bcf4edcn%40googlegroups.com.

Reply via email to