promql Questions

2

Solved

I am getting confused about how the subquery notation in prometheus (like [5m:1m]) is aggregating data. I know when I mention range selector as this [5m], it aggregates every data point in each 5 m...
Huggins asked 20/9, 2023 at 6:39

5

I'm using flexlm_exporter to export my license usage to Prometheus and from Prometheus to custom service (Not Grafana). As you know Prometheus hides missing values. However, I need those missing va...
Clipclop asked 15/10, 2020 at 6:46

1

Solved

I have a Prometheus metric as shown below query_duration{query = "SELECT * FROM TABLE_NAME"} I'm trying to extract only TABLE_NAME from the label query. I'm trying to use regex to extrac...
Hembree asked 19/6, 2024 at 9:53

2

Solved

I have some metrics from a Prometheus data-source like this (the real data contains many more label combinations): status{pod = "A", platform = "X",} 1 status{pod = "C&quot...
Pelkey asked 2/2, 2021 at 13:5

3

Solved

I have an unscheduled batch job that may or may not be triggered multiple times a day. For every invocation, I'm generating a count metric incremented by 1. I expected to apply increase() function ...
Fondue asked 25/8, 2020 at 16:20

6

In Prometheus I'm trying to merge multiple http request lines into groups using label_replace. http_requests_total{account_id="124",handler="AAAAAController"...} http_requests_total{account_id="12...
Explication asked 7/6, 2019 at 18:16

3

Solved

I have a promql which is giving me the metric result as a whole from the server, but I am interested in filtering and getting results of a specific value, but I am not sure what can be the label na...
Expedite asked 29/6, 2020 at 2:35

3

Suppose I write a basic PromQL query like this Query: kube_deployment_spec_replicas{} Result: kube_deployment_spec_replicas{deployment="mydeployment",endpoint="myendpoint",insta...

11

Solved

I need to show, in Grafana, a panel with the number of requests in the period of time selected in the upper right corner. For this I need to solve 2 issues here, I will ask the prometheus question...
Hospitalet asked 6/11, 2017 at 13:48

3

Solved

I have a metadata metric in Prometheus that looks like this # HELP metadata Process metadata # TYPE metadata counter metadata{hostname="server-a",key="version",value="v1.1....
Olympian asked 14/4, 2022 at 10:37

3

Solved

Over time functions are not supporting by/without syntax. Which is the mathematical difference between using avg_over_time(metric[1h]) and avg(metric[1h])? Can a over time function be replaced with...
Angelaangele asked 22/10, 2020 at 2:31

1

On my Prometheus instance, I have set storage.tsdb.retention.size to 128GiB and storage.tsdb.retention.time to 0s, so Prometheus keeps the old data until the 128 GB limit is reached. Now, I have so...
Settle asked 13/12, 2020 at 21:52

1

Assuming I have a promQL returning a range or an instant vector: range vector -> metric[1h] or instance vector -> increase(metric[1h]) Is there a way to convert range into instant vector and/or vi...
Ballarat asked 26/4, 2019 at 15:1

4

I need to get CPU and Memory usage in kubernetes pods with prometheus queries. Can someone plz help?
Ribose asked 13/3, 2019 at 13:57

1

tl;dr I have a label in prometheus called "ignore" with value "yes": metric_test{label1="label1",ignore="yes"} 1 I want to disable alerts for any metrics wi...
Afro asked 7/2, 2022 at 2:41

2

I want to create a Grafana 'singlestat' Panel that shows the Uptime or SLA 'percentage', based on the presence or absence of test failure metrics. I already have the appropriate metric, e2e_tests_...
Viand asked 10/5, 2018 at 13:23

4

I want to check if a certain metric is not available in prometheus for 5 minute. I am using absent(K_KA_GCPP) and giving a 5 minute threshold. But it seems I cannot group the absent function on cer...
Detest asked 7/11, 2018 at 14:44

2

Ideally I have to find out the CPU usage of pods on each node in percentage. But I have tried to find out the CPU usage of each node. I have written the query but it gives me more than 100 % (it ca...
Symbology asked 12/2, 2021 at 10:5

2

I have an application that increments a Prometheus counter when it receives a particular HTTP request. The application runs in Kubernetes, has multiple instances and redeploys multiple times a day....
Xylotomous asked 19/7, 2019 at 12:54

2

Solved

I currently have the following Promql query which allow me to query the memory used by each of my K8S pods: sum(container_memory_working_set_bytes{image!="",name=~"^k8s_.*"}) by (pod_name) The po...
Conventional asked 31/7, 2018 at 13:2

2

Solved

Quote from Prometheus Count and sum of observations doc: To calculate the average request duration during the last 5 minutes from a histogram or summary called http_request_duration_seconds, use t...
Sarmatia asked 17/7, 2022 at 4:0

2

Solved

Imagine I have metrics like this: sample_metric{type="some-type1-1234"} 2 sample_metric{type="some-type1-5678"} 1 sample_metric{type="some-type2-9876"} 4 sample_metric...
Karmakarmadharaya asked 17/3, 2021 at 8:49

3

Solved

I went through the PromQL docs and found rate little bit confusing. Then I tried one query from Prometheus query dashboard and found below given results Time Count increase rate(count[1m]) 15s 4381...
Thoughtout asked 17/3, 2021 at 14:13

3

Solved

I have a question about calculating response times with Prometheus summary metrics. I created a summary metric that does not only contain the service name but also the complete path and the http-m...
Stalwart asked 27/6, 2018 at 14:1

1

I'm trying to write a query that will return the following information: for metric m1 (of type counter) - return the sum of values, grouped by (p1,p2) in a sliding window of 1h. I think the base sh...
Churchyard asked 14/12, 2021 at 14:18

© 2022 - 2025 — McMap. All rights reserved.