Skip to content

Commit

Permalink
fix: fix cluster status panels
Browse files Browse the repository at this point in the history
  • Loading branch information
lunkan93 authored and Eliastisys committed Sep 18, 2024
1 parent 21f5a68 commit 2b9135d
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1016,7 +1016,7 @@
"targets": [
{
"exemplar": true,
"expr": "count(kube_pod_info{cluster=~\"$cluster\", namespace=~\"$namespace\", namespace!~\"^${systemNamespaces}\", node=~\"$node\"} and on (pod, namespace, cluster) kube_pod_status_phase{phase=\"Running\", cluster=~\"$cluster\", namespace=~\"$namespace\"} == 1) - (count(kube_pod_container_resource_requests{cluster=~\"$cluster\", namespace=~\"$namespace\", namespace!~\"^${systemNamespaces}\", resource=\"cpu\", node=~\"$node\"} and on (pod, namespace, cluster) kube_pod_status_phase{phase=\"Running\", cluster=~\"$cluster\", namespace=~\"$namespace\"} == 1) or vector(0))",
"expr": "count(kube_pod_container_info{cluster=~\"$cluster\", namespace=~\"$namespace\", namespace!~\"^${systemNamespaces}\"} and on (pod, namespace, cluster) kube_pod_info{cluster=~\"$cluster\", namespace=~\"$namespace\", namespace!~\"^${systemNamespaces}\", node=~\"$node\"} and on (pod, namespace, cluster) kube_pod_status_phase{phase=\"Running\", cluster=~\"$cluster\", namespace=~\"$namespace\"} == 1) - (count(kube_pod_container_resource_requests{cluster=~\"$cluster\", namespace=~\"$namespace\", namespace!~\"^${systemNamespaces}\", resource=\"cpu\", node=~\"$node\"} and on (pod, namespace, cluster) kube_pod_status_phase{phase=\"Running\", cluster=~\"$cluster\", namespace=~\"$namespace\"} == 1) or vector(0))",
"interval": "",
"legendFormat": "",
"refId": "A"
Expand Down Expand Up @@ -1079,7 +1079,7 @@
"targets": [
{
"exemplar": true,
"expr": "count(kube_pod_info{cluster=~\"$cluster\", namespace=~\"$namespace\", namespace!~\"^${systemNamespaces}\", node=~\"$node\"} and on (pod, namespace, cluster) kube_pod_status_phase{phase=\"Running\", cluster=~\"$cluster\", namespace=~\"$namespace\"} == 1) - (count(kube_pod_container_resource_requests{cluster=~\"$cluster\", namespace=~\"$namespace\", namespace!~\"^${systemNamespaces}\", resource=\"memory\", node=~\"$node\"} and on (pod, namespace, cluster) kube_pod_status_phase{phase=\"Running\", cluster=~\"$cluster\", namespace=~\"$namespace\"} == 1) or vector(0))",
"expr": "count(kube_pod_container_info{cluster=~\"$cluster\", namespace=~\"$namespace\", namespace!~\"^${systemNamespaces}\"} and on (pod, namespace, cluster) kube_pod_info{cluster=~\"$cluster\", namespace=~\"$namespace\", namespace!~\"^${systemNamespaces}\", node=~\"$node\"} and on (pod, namespace, cluster) kube_pod_status_phase{phase=\"Running\", cluster=~\"$cluster\", namespace=~\"$namespace\"} == 1) - (count(kube_pod_container_resource_requests{cluster=~\"$cluster\", namespace=~\"$namespace\", namespace!~\"^${systemNamespaces}\", resource=\"memory\", node=~\"$node\"} and on (pod, namespace, cluster) kube_pod_status_phase{phase=\"Running\", cluster=~\"$cluster\", namespace=~\"$namespace\"} == 1) or vector(0))",
"interval": "",
"legendFormat": "",
"refId": "A"
Expand Down Expand Up @@ -1175,7 +1175,7 @@
"targets": [
{
"exemplar": true,
"expr": "count by (pod, namespace, cluster) (kube_pod_info{cluster=~\"$cluster\", namespace=~\"$namespace\", namespace!~\"^${systemNamespaces}\", node=~\"$node\"} and on (pod, namespace, cluster) kube_pod_status_phase{phase=\"Running\", cluster=~\"$cluster\", namespace=~\"$namespace\"} == 1) unless on (pod, namespace, cluster) kube_pod_container_resource_requests{cluster=~\"$cluster\", namespace=~\"$namespace\", namespace!~\"^${systemNamespaces}\", resource=\"cpu\", node=~\"$node\"}",
"expr": "count by (pod, namespace, cluster) (kube_pod_container_info{cluster=~\"$cluster\", namespace=~\"$namespace\", namespace!~\"^${systemNamespaces}\"} and on (pod, namespace, cluster) kube_pod_info{cluster=~\"$cluster\", namespace=~\"$namespace\", namespace!~\"^${systemNamespaces}\", node=~\"$node\"} and on (pod, namespace, cluster) kube_pod_status_phase{phase=\"Running\", cluster=~\"$cluster\", namespace=~\"$namespace\"} == 1) unless on (pod, namespace, cluster) kube_pod_container_resource_requests{cluster=~\"$cluster\", namespace=~\"$namespace\", namespace!~\"^${systemNamespaces}\", resource=\"cpu\", node=~\"$node\"}",
"format": "table",
"instant": true,
"interval": "",
Expand Down Expand Up @@ -1288,7 +1288,7 @@
"targets": [
{
"exemplar": true,
"expr": "count by (pod, namespace, cluster) (kube_pod_info{cluster=~\"$cluster\", namespace=~\"$namespace\", namespace!~\"^${systemNamespaces}\", node=~\"$node\"} and on (pod, namespace, cluster) kube_pod_status_phase{phase=\"Running\", cluster=~\"$cluster\", namespace=~\"$namespace\"} == 1) unless on (pod, namespace, cluster) kube_pod_container_resource_requests{cluster=~\"$cluster\", namespace=~\"$namespace\", namespace!~\"^${systemNamespaces}\", resource=\"memory\", node=~\"$node\"}",
"expr": "count by (pod, namespace, cluster) (kube_pod_container_info{cluster=~\"$cluster\", namespace=~\"$namespace\", namespace!~\"^${systemNamespaces}\"} and on (pod, namespace, cluster) kube_pod_info{cluster=~\"$cluster\", namespace=~\"$namespace\", namespace!~\"^${systemNamespaces}\", node=~\"$node\"} and on (pod, namespace, cluster) kube_pod_status_phase{phase=\"Running\", cluster=~\"$cluster\", namespace=~\"$namespace\"} == 1) unless on (pod, namespace, cluster) kube_pod_container_resource_requests{cluster=~\"$cluster\", namespace=~\"$namespace\", namespace!~\"^${systemNamespaces}\", resource=\"memory\", node=~\"$node\"}",
"format": "table",
"instant": true,
"interval": "",
Expand Down Expand Up @@ -1390,7 +1390,7 @@
"targets": [
{
"exemplar": false,
"expr": "sum by (node, cluster) (kube_pod_container_resource_requests{cluster=~\"$cluster\", node=~\"$node\", namespace=~\"$namespace\", resource=\"cpu\"} and on (pod, namespace, cluster) kube_pod_status_phase{phase=\"Running\", cluster=~\"$cluster\", namespace=~\"$namespace\"} == 1 ) / sum by (node, cluster) (kube_node_status_allocatable{cluster=~\"$cluster\", node=~\"$node\", resource=\"cpu\"})",
"expr": "sum by (node, cluster) (kube_pod_container_resource_requests{cluster=~\"$cluster\", namespace=~\"$namespace\", resource=\"cpu\"} and on (pod, namespace, cluster) kube_pod_info{cluster=~\"$cluster\", namespace=~\"$namespace\", namespace!~\"^${systemNamespaces}\", node=~\"$node\"} and on (pod, namespace, cluster) kube_pod_status_phase{phase=\"Running\", cluster=~\"$cluster\", namespace=~\"$namespace\"} == 1 ) / sum by (node, cluster) (kube_node_status_allocatable{cluster=~\"$cluster\", node=~\"$node\", resource=\"cpu\"})",
"interval": "",
"legendFormat": " {{node}} - {{cluster}}",
"refId": "A"
Expand Down

0 comments on commit 2b9135d

Please sign in to comment.