Hi Stuart. The metrics are coming from different scrapes. Each service is a
different endpoint.

I'm doing the relabelling using *metric_relabel_configs.*

Is this the right approach?

Regards,

*Tom Gregory*




On Wed, 13 Jan 2021 at 17:28, Stuart Clark <[email protected]> wrote:

> On 2021-01-13 16:11, Tom Gregory wrote:
> > 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).
> >
>
> Are the metrics from those two services coming from the same scrape or
> separate scrapes?
>
> The up metric gives details per-scrape, so the labels attached to it are
> based on the service discovery relabling process. Is that how you are
> adding the "svc" label?
>
> --
> 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/CADSXXdqy9yqCqhbY0e3Xga3YbXubuO8reVAf9b8RaZB5UTXwvw%40mail.gmail.com.

Reply via email to