Re: [prometheus-users] Uptime when no up metric is available

2021-01-15 Thread Tom Gregory
Thanks Stuart. I switched to relabel_config and now all good. On Thu, 14 Jan 2021, 21:05 Stuart Clark, wrote: > On 13/01/2021 20:31, Tom Gregory wrote: > > Hi Stuart. The metrics are coming from different scrapes. Each service is > a different endpoint. > > I'm doing the relabelling using

Re: [prometheus-users] Uptime when no up metric is available

2021-01-14 Thread Stuart Clark
On 13/01/2021 20:31, Tom Gregory wrote: Hi Stuart. The metrics are coming from different scrapes. Each service is a different endpoint. I'm doing the relabelling using /metric_relabel_configs./ metric relabeling is really more for removing metrics (if you can't turn them off on the

Re: [prometheus-users] Uptime when no up metric is available

2021-01-13 Thread Tom Gregory
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 wrote: > On 2021-01-13 16:11, Tom

Re: [prometheus-users] Uptime when no up metric is available

2021-01-13 Thread Ben Kochie
That sounds like metric_relabel_configs, not relabel_configs. relabel_configs apply to `up` and other auto-generated metrics. On Wed, Jan 13, 2021 at 5:11 PM Tom Gregory wrote: > The relabelling process doesn't happen on the *up *metric, so the metric > doesn't have the correct labels I need

Re: [prometheus-users] Uptime when no up metric is available

2021-01-13 Thread Tom Gregory
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

[prometheus-users] Uptime when no up metric is available

2021-01-13 Thread Tom Gregory
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 : *Metric relabelling