[prometheus-users] Re: Relabel Problems - Not Working

2020-02-21 Thread Jake Utley
Your query looks fine. You should be able to just paste that into the `expr` field of the recording rule. Beyond that, I'd have to see your rule group and recording rule to understand why it isn't working. Preferably with a full error as well. On Friday, February 21, 2020 at 1:10:03 PM UTC-8,

[prometheus-users] Re: Relabel Problems - Not Working

2020-02-21 Thread Kevin Kruppa
Thanks again Jake. I got that working as long as I paste it into Prometheus UI GRAPH tab or pasted into Grafana - (label_replace(label_replace(saas_health:memory_avail_pct, "prd_pod", "$1", "POD_NAME", "(.*)"), "POD_NAME", "", "POD_NAME", "(.*)")) What I haven't figured out is how to get this

[prometheus-users] Re: Relabel Problems - Not Working

2020-02-21 Thread Jake Utley
The /metrics endpoint on Prometheus provides metrics about the Prometheus instance itself. It will not include the metrics that Prometheus has scraped. If you want to see those metrics on a Prometheus endpoint, you can look into using the /federate endpoint. https://prometheus.io/docs/prometheus

[prometheus-users] Re: Relabel Problems - Not Working

2020-02-21 Thread Kevin Kruppa
Thank you Jake! I got the two cases I mentioned working. Now I am having trouble changing labels for recording rules. I noticed you do not see the rule/metric name in the results on a /metrics with all the other metrics.You do see 3 stats for the execution of the rule. The rule/metric

[prometheus-users] Re: Relabel Problems - Not Working

2020-02-21 Thread Kevin Kruppa
On Wednesday, February 19, 2020 at 2:24:32 PM UTC-6, Kevin Kruppa wrote: > > I have been trying to get metric_relabel_configs to work but have not been > successful so far. > > I have tried to break it down by going very basic to what I need. I > cannot even get the basic relabel to work. > >

[prometheus-users] Re: Relabel Problems - Not Working

2020-02-19 Thread Jake Utley
The "replace" action has a bit of a confusing name, though it does do what the docs describe. The source label will not be removed as a result of the replace action. If this is what you want, you will need another "replace" config that replaces the "POD_NAME" label with an empty string. metric_