atlas pods: drop non-leading nodes in plurality table
This commit is contained in:
parent
03a4ca4d84
commit
6eee7b8853
@ -1178,21 +1178,19 @@ def build_pods_dashboard():
|
|||||||
10,
|
10,
|
||||||
"Namespace Plurality by Node",
|
"Namespace Plurality by Node",
|
||||||
(
|
(
|
||||||
"("
|
"{share} * "
|
||||||
" {share}"
|
"({share} == bool on(namespace) group_left() (max by (namespace) ({share})))"
|
||||||
" * on(namespace) group_left(node)"
|
|
||||||
" ({share} == bool on(namespace) group_left() (max by (namespace) ({share})))"
|
|
||||||
") * 100"
|
|
||||||
).format(
|
).format(
|
||||||
share=(
|
share=(
|
||||||
"(sum by (namespace,node) (kube_pod_info{pod!=\"\"}) "
|
"(sum by (namespace,node) (kube_pod_info{pod!=\"\"}) "
|
||||||
"/ ignoring(node) clamp_min(sum by (namespace) (kube_pod_info{pod!=\"\"}), 1))"
|
"/ on(namespace) group_left() clamp_min(sum by (namespace) (kube_pod_info{pod!=\"\"}), 1) * 100)"
|
||||||
)
|
)
|
||||||
),
|
),
|
||||||
{"h": 8, "w": 24, "x": 0, "y": 42},
|
{"h": 8, "w": 24, "x": 0, "y": 42},
|
||||||
unit="percent",
|
unit="percent",
|
||||||
transformations=[
|
transformations=[
|
||||||
{"id": "labelsToFields", "options": {}},
|
{"id": "labelsToFields", "options": {}},
|
||||||
|
{"id": "filterByValue", "options": {"match": "Value", "operator": "gt", "value": 0}},
|
||||||
{"id": "sortBy", "options": {"fields": ["node", "Value"], "order": "asc"}},
|
{"id": "sortBy", "options": {"fields": ["node", "Value"], "order": "asc"}},
|
||||||
],
|
],
|
||||||
instant=True,
|
instant=True,
|
||||||
|
|||||||
@ -508,7 +508,7 @@
|
|||||||
},
|
},
|
||||||
"targets": [
|
"targets": [
|
||||||
{
|
{
|
||||||
"expr": "( (sum by (namespace,node) (kube_pod_info{pod!=\"\"}) / ignoring(node) clamp_min(sum by (namespace) (kube_pod_info{pod!=\"\"}), 1)) * on(namespace) group_left(node) ((sum by (namespace,node) (kube_pod_info{pod!=\"\"}) / ignoring(node) clamp_min(sum by (namespace) (kube_pod_info{pod!=\"\"}), 1)) == bool on(namespace) group_left() (max by (namespace) ((sum by (namespace,node) (kube_pod_info{pod!=\"\"}) / ignoring(node) clamp_min(sum by (namespace) (kube_pod_info{pod!=\"\"}), 1)))))) * 100",
|
"expr": "(sum by (namespace,node) (kube_pod_info{pod!=\"\"}) / on(namespace) group_left() clamp_min(sum by (namespace) (kube_pod_info{pod!=\"\"}), 1) * 100) * ((sum by (namespace,node) (kube_pod_info{pod!=\"\"}) / on(namespace) group_left() clamp_min(sum by (namespace) (kube_pod_info{pod!=\"\"}), 1) * 100) == bool on(namespace) group_left() (max by (namespace) ((sum by (namespace,node) (kube_pod_info{pod!=\"\"}) / on(namespace) group_left() clamp_min(sum by (namespace) (kube_pod_info{pod!=\"\"}), 1) * 100))))",
|
||||||
"refId": "A",
|
"refId": "A",
|
||||||
"instant": true
|
"instant": true
|
||||||
}
|
}
|
||||||
@ -527,6 +527,14 @@
|
|||||||
"id": "labelsToFields",
|
"id": "labelsToFields",
|
||||||
"options": {}
|
"options": {}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"id": "filterByValue",
|
||||||
|
"options": {
|
||||||
|
"match": "Value",
|
||||||
|
"operator": "gt",
|
||||||
|
"value": 0
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"id": "sortBy",
|
"id": "sortBy",
|
||||||
"options": {
|
"options": {
|
||||||
|
|||||||
@ -517,7 +517,7 @@ data:
|
|||||||
},
|
},
|
||||||
"targets": [
|
"targets": [
|
||||||
{
|
{
|
||||||
"expr": "( (sum by (namespace,node) (kube_pod_info{pod!=\"\"}) / ignoring(node) clamp_min(sum by (namespace) (kube_pod_info{pod!=\"\"}), 1)) * on(namespace) group_left(node) ((sum by (namespace,node) (kube_pod_info{pod!=\"\"}) / ignoring(node) clamp_min(sum by (namespace) (kube_pod_info{pod!=\"\"}), 1)) == bool on(namespace) group_left() (max by (namespace) ((sum by (namespace,node) (kube_pod_info{pod!=\"\"}) / ignoring(node) clamp_min(sum by (namespace) (kube_pod_info{pod!=\"\"}), 1)))))) * 100",
|
"expr": "(sum by (namespace,node) (kube_pod_info{pod!=\"\"}) / on(namespace) group_left() clamp_min(sum by (namespace) (kube_pod_info{pod!=\"\"}), 1) * 100) * ((sum by (namespace,node) (kube_pod_info{pod!=\"\"}) / on(namespace) group_left() clamp_min(sum by (namespace) (kube_pod_info{pod!=\"\"}), 1) * 100) == bool on(namespace) group_left() (max by (namespace) ((sum by (namespace,node) (kube_pod_info{pod!=\"\"}) / on(namespace) group_left() clamp_min(sum by (namespace) (kube_pod_info{pod!=\"\"}), 1) * 100))))",
|
||||||
"refId": "A",
|
"refId": "A",
|
||||||
"instant": true
|
"instant": true
|
||||||
}
|
}
|
||||||
@ -536,6 +536,14 @@ data:
|
|||||||
"id": "labelsToFields",
|
"id": "labelsToFields",
|
||||||
"options": {}
|
"options": {}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"id": "filterByValue",
|
||||||
|
"options": {
|
||||||
|
"match": "Value",
|
||||||
|
"operator": "gt",
|
||||||
|
"value": 0
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"id": "sortBy",
|
"id": "sortBy",
|
||||||
"options": {
|
"options": {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user