Skip to content

Commit

Permalink
remove kube_pod_container_resource_requests:sum
Browse files Browse the repository at this point in the history
Signed-off-by: Thibault Mange <[email protected]>
  • Loading branch information
thibaultmg committed Dec 19, 2024
1 parent cf9b436 commit deb20f0
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -597,7 +597,7 @@ data:
"targets": [
{
"exemplar": true,
"expr": "sum(node_namespace_pod_container:container_cpu_usage_seconds_total:sum{cluster=\"$cluster\"}) by (namespace) / sum(kube_pod_container_resource_requests:sum{cluster=\"$cluster\", resource=\"cpu\"}) by (namespace)",
"expr": "sum(node_namespace_pod_container:container_cpu_usage_seconds_total:sum{cluster=\"$cluster\"}) by (namespace) / sum(kube_pod_container_resource_requests{cluster=\"$cluster\", resource=\"cpu\"}) by (namespace)",
"format": "table",
"instant": true,
"interval": "",
Expand All @@ -617,7 +617,7 @@ data:
},
{
"exemplar": true,
"expr": "sum(kube_pod_container_resource_requests:sum{cluster=\"$cluster\", resource=\"cpu\"}) by (namespace)",
"expr": "sum(kube_pod_container_resource_requests{cluster=\"$cluster\", resource=\"cpu\"}) by (namespace)",
"format": "table",
"instant": true,
"interval": "",
Expand Down Expand Up @@ -1240,7 +1240,7 @@ data:
"targets": [
{
"exemplar": true,
"expr": "sum(container_memory_rss{cluster=\"$cluster\",container!=\"\",container!=\"POD\"}) by (namespace) / sum(kube_pod_container_resource_requests:sum{cluster=\"$cluster\", resource=\"memory\"}) by (namespace)",
"expr": "sum(container_memory_rss{cluster=\"$cluster\",container!=\"\",container!=\"POD\"}) by (namespace) / sum(kube_pod_container_resource_requests{cluster=\"$cluster\", resource=\"memory\"}) by (namespace)",
"format": "table",
"instant": true,
"interval": "",
Expand All @@ -1262,7 +1262,7 @@ data:
},
{
"exemplar": true,
"expr": "sum(kube_pod_container_resource_requests:sum{cluster=\"$cluster\", resource=\"memory\"}) by (namespace)",
"expr": "sum(kube_pod_container_resource_requests{cluster=\"$cluster\", resource=\"memory\"}) by (namespace)",
"format": "table",
"instant": true,
"interval": "",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ data:
"targets": [
{
"exemplar": true,
"expr": "sum(kube_pod_container_resource_requests:sum{cluster=\"$cluster\", resource=\"cpu\"}) / sum(kube_node_status_allocatable{cluster=\"$cluster\", resource=\"cpu\"})",
"expr": "sum(kube_pod_container_resource_requests{cluster=\"$cluster\", resource=\"cpu\"}) / sum(kube_node_status_allocatable{cluster=\"$cluster\", resource=\"cpu\"})",
"format": "time_series",
"instant": true,
"interval": "",
Expand Down Expand Up @@ -456,7 +456,7 @@ data:
"targets": [
{
"exemplar": true,
"expr": "sum(kube_pod_container_resource_requests:sum{cluster=\"$cluster\", resource=\"memory\"}) / sum(kube_node_status_allocatable{cluster=\"$cluster\", resource=\"memory\"})",
"expr": "sum(kube_pod_container_resource_requests{cluster=\"$cluster\", resource=\"memory\"}) / sum(kube_node_status_allocatable{cluster=\"$cluster\", resource=\"memory\"})",
"format": "time_series",
"instant": true,
"interval": "",
Expand Down Expand Up @@ -987,7 +987,7 @@ data:
},
{
"exemplar": true,
"expr": "sum(kube_pod_container_resource_requests:sum{cluster=\"$cluster\", resource=\"cpu\"}) by (namespace)",
"expr": "sum(kube_pod_container_resource_requests{cluster=\"$cluster\", resource=\"cpu\"}) by (namespace)",
"format": "table",
"instant": true,
"interval": "",
Expand All @@ -998,7 +998,7 @@ data:
},
{
"exemplar": true,
"expr": "sum(node_namespace_pod_container:container_cpu_usage_seconds_total:sum{cluster=\"$cluster\"}) by (namespace) / sum(kube_pod_container_resource_requests:sum{cluster=\"$cluster\", resource=\"cpu\"}) by (namespace)",
"expr": "sum(node_namespace_pod_container:container_cpu_usage_seconds_total:sum{cluster=\"$cluster\"}) by (namespace) / sum(kube_pod_container_resource_requests{cluster=\"$cluster\", resource=\"cpu\"}) by (namespace)",
"format": "table",
"instant": true,
"interval": "",
Expand Down Expand Up @@ -1499,7 +1499,7 @@ data:
},
{
"exemplar": true,
"expr": "sum(kube_pod_container_resource_requests:sum{cluster=\"$cluster\", resource=\"memory\"}) by (namespace)",
"expr": "sum(kube_pod_container_resource_requests{cluster=\"$cluster\", resource=\"memory\"}) by (namespace)",
"format": "table",
"instant": true,
"interval": "",
Expand All @@ -1510,7 +1510,7 @@ data:
},
{
"exemplar": true,
"expr": "sum(container_memory_rss{cluster=\"$cluster\",container!=\"\",container!=\"POD\"}) by (namespace) / sum(kube_pod_container_resource_requests:sum{cluster=\"$cluster\", resource=\"memory\"}) by (namespace)",
"expr": "sum(container_memory_rss{cluster=\"$cluster\",container!=\"\",container!=\"POD\"}) by (namespace) / sum(kube_pod_container_resource_requests{cluster=\"$cluster\", resource=\"memory\"}) by (namespace)",
"format": "table",
"instant": true,
"interval": "",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -185,8 +185,6 @@ spec:
record: sum:apiserver_request_total:5m
- record: kube_pod_container_resource_limits:sum
expr: sum(kube_pod_container_resource_limits) by (resource, namespace)
- record: kube_pod_container_resource_requests:sum
expr: sum(kube_pod_container_resource_requests{container!=""}) by (resource, namespace)
- expr: |-
sum by (cluster, namespace, pod, container) (
rate(container_cpu_usage_seconds_total{job="kubelet", metrics_path="/metrics/cadvisor", image!=""}[5m])
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@ spec:
- '{__name__="kube_pod_container_resource_limits"}'
- '{__name__="kube_pod_container_resource_limits:sum"}'
- '{__name__="kube_pod_container_resource_requests"}'
- '{__name__="kube_pod_container_resource_requests:sum"}'
- '{__name__="kube_pod_info"}'
- '{__name__="kube_resourcequota"}'
- '{__name__="namespace_workload_pod:kube_pod_owner:relabel"}'
Expand Down

0 comments on commit deb20f0

Please sign in to comment.