Skip to content

Commit

Permalink
feat: use container_memory_working_set_bytes (#186)
Browse files Browse the repository at this point in the history
  • Loading branch information
stehessel authored Jan 3, 2024
1 parent 3922b07 commit 0c3934b
Show file tree
Hide file tree
Showing 9 changed files with 18 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -741,7 +741,7 @@ data:
"datasource": {
"uid": "${datasource}"
},
"expr": "sum(container_memory_usage_bytes{namespace=\"rhacs-$instance_id\", container=\"central\", job=~\"kubelet\"})",
"expr": "sum(container_memory_working_set_bytes{namespace=\"rhacs-$instance_id\", container=\"central\", job=~\"kubelet\"})",
"interval": "",
"legendFormat": "Used",
"refId": "B"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -741,7 +741,7 @@ spec:
"datasource": {
"uid": "${datasource}"
},
"expr": "sum(container_memory_usage_bytes{namespace=\"rhacs-$instance_id\", container=\"central\", job=~\"kubelet\"})",
"expr": "sum(container_memory_working_set_bytes{namespace=\"rhacs-$instance_id\", container=\"central\", job=~\"kubelet\"})",
"interval": "",
"legendFormat": "Used",
"refId": "B"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -957,7 +957,7 @@ data:
"uid": "PBFA97CFB590B2093"
},
"editorMode": "code",
"expr": "sum(container_memory_usage_bytes{namespace=~\"rhacs-$instance_id\", container=\"central\", job=~\"kubelet\"}) by (namespace) / sum(container_spec_memory_limit_bytes{namespace=~\"rhacs-$instance_id\", container=\"central\", job=~\"kubelet\"}) by (namespace)",
"expr": "sum(container_memory_working_set_bytes{namespace=~\"rhacs-$instance_id\", container=\"central\", job=~\"kubelet\"}) by (namespace) / sum(container_spec_memory_limit_bytes{namespace=~\"rhacs-$instance_id\", container=\"central\", job=~\"kubelet\"}) by (namespace)",
"format": "time_series",
"interval": "",
"legendFormat": "{{namespace}}",
Expand Down Expand Up @@ -1400,7 +1400,7 @@ data:
},
"editorMode": "code",
"exemplar": false,
"expr": "sum(container_memory_usage_bytes{namespace=~\"rhacs-$instance_id\", container=\"central\", job=~\"kubelet\"}) by (namespace) / sum(container_spec_memory_limit_bytes{namespace=~\"rhacs-$instance_id\", container=\"central\", job=~\"kubelet\"}) by (namespace)",
"expr": "sum(container_memory_working_set_bytes{namespace=~\"rhacs-$instance_id\", container=\"central\", job=~\"kubelet\"}) by (namespace) / sum(container_spec_memory_limit_bytes{namespace=~\"rhacs-$instance_id\", container=\"central\", job=~\"kubelet\"}) by (namespace)",
"format": "table",
"instant": true,
"legendFormat": "__auto",
Expand Down Expand Up @@ -1808,7 +1808,7 @@ data:
},
"editorMode": "code",
"exemplar": false,
"expr": "sum(container_memory_usage_bytes{namespace=~\"rhacs-$instance_id\", container=\"scanner\", job=~\"kubelet\"}) by (namespace) / sum(container_spec_memory_limit_bytes{namespace=~\"rhacs-$instance_id\", container=\"scanner\", job=~\"kubelet\"}) by (namespace)",
"expr": "sum(container_memory_working_set_bytes{namespace=~\"rhacs-$instance_id\", container=\"scanner\", job=~\"kubelet\"}) by (namespace) / sum(container_spec_memory_limit_bytes{namespace=~\"rhacs-$instance_id\", container=\"scanner\", job=~\"kubelet\"}) by (namespace)",
"format": "table",
"instant": true,
"legendFormat": "__auto",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -957,7 +957,7 @@ spec:
"uid": "PBFA97CFB590B2093"
},
"editorMode": "code",
"expr": "sum(container_memory_usage_bytes{namespace=~\"rhacs-$instance_id\", container=\"central\", job=~\"kubelet\"}) by (namespace) / sum(container_spec_memory_limit_bytes{namespace=~\"rhacs-$instance_id\", container=\"central\", job=~\"kubelet\"}) by (namespace)",
"expr": "sum(container_memory_working_set_bytes{namespace=~\"rhacs-$instance_id\", container=\"central\", job=~\"kubelet\"}) by (namespace) / sum(container_spec_memory_limit_bytes{namespace=~\"rhacs-$instance_id\", container=\"central\", job=~\"kubelet\"}) by (namespace)",
"format": "time_series",
"interval": "",
"legendFormat": "{{namespace}}",
Expand Down Expand Up @@ -1400,7 +1400,7 @@ spec:
},
"editorMode": "code",
"exemplar": false,
"expr": "sum(container_memory_usage_bytes{namespace=~\"rhacs-$instance_id\", container=\"central\", job=~\"kubelet\"}) by (namespace) / sum(container_spec_memory_limit_bytes{namespace=~\"rhacs-$instance_id\", container=\"central\", job=~\"kubelet\"}) by (namespace)",
"expr": "sum(container_memory_working_set_bytes{namespace=~\"rhacs-$instance_id\", container=\"central\", job=~\"kubelet\"}) by (namespace) / sum(container_spec_memory_limit_bytes{namespace=~\"rhacs-$instance_id\", container=\"central\", job=~\"kubelet\"}) by (namespace)",
"format": "table",
"instant": true,
"legendFormat": "__auto",
Expand Down Expand Up @@ -1808,7 +1808,7 @@ spec:
},
"editorMode": "code",
"exemplar": false,
"expr": "sum(container_memory_usage_bytes{namespace=~\"rhacs-$instance_id\", container=\"scanner\", job=~\"kubelet\"}) by (namespace) / sum(container_spec_memory_limit_bytes{namespace=~\"rhacs-$instance_id\", container=\"scanner\", job=~\"kubelet\"}) by (namespace)",
"expr": "sum(container_memory_working_set_bytes{namespace=~\"rhacs-$instance_id\", container=\"scanner\", job=~\"kubelet\"}) by (namespace) / sum(container_spec_memory_limit_bytes{namespace=~\"rhacs-$instance_id\", container=\"scanner\", job=~\"kubelet\"}) by (namespace)",
"format": "table",
"instant": true,
"legendFormat": "__auto",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3177,7 +3177,7 @@ data:
},
"editorMode": "code",
"exemplar": false,
"expr": "sum(container_memory_usage_bytes{container!=\"\",container!=\"POD\",job=\"kubelet\"} * on (node) group_left() kube_node_role{role=\"acscs-worker\"} * on (namespace, pod) group_left(workload) namespace_workload_pod:kube_pod_owner:relabel) by (workload)",
"expr": "sum(container_memory_working_set_bytes{container!=\"\",container!=\"POD\",job=\"kubelet\"} * on (node) group_left() kube_node_role{role=\"acscs-worker\"} * on (namespace, pod) group_left(workload) namespace_workload_pod:kube_pod_owner:relabel) by (workload)",
"format": "table",
"hide": false,
"instant": true,
Expand Down Expand Up @@ -3426,7 +3426,7 @@ data:
},
"editorMode": "code",
"exemplar": false,
"expr": "sum(container_memory_usage_bytes{container!=\"\",container!=\"POD\",job=\"kubelet\"} * on (node) group_left() kube_node_role{role=\"acscs-infra\"} * on (namespace, pod) group_left(workload) namespace_workload_pod:kube_pod_owner:relabel) by (workload)",
"expr": "sum(container_memory_working_set_bytes{container!=\"\",container!=\"POD\",job=\"kubelet\"} * on (node) group_left() kube_node_role{role=\"acscs-infra\"} * on (namespace, pod) group_left(workload) namespace_workload_pod:kube_pod_owner:relabel) by (workload)",
"format": "table",
"hide": false,
"instant": true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3177,7 +3177,7 @@ spec:
},
"editorMode": "code",
"exemplar": false,
"expr": "sum(container_memory_usage_bytes{container!=\"\",container!=\"POD\",job=\"kubelet\"} * on (node) group_left() kube_node_role{role=\"acscs-worker\"} * on (namespace, pod) group_left(workload) namespace_workload_pod:kube_pod_owner:relabel) by (workload)",
"expr": "sum(container_memory_working_set_bytes{container!=\"\",container!=\"POD\",job=\"kubelet\"} * on (node) group_left() kube_node_role{role=\"acscs-worker\"} * on (namespace, pod) group_left(workload) namespace_workload_pod:kube_pod_owner:relabel) by (workload)",
"format": "table",
"hide": false,
"instant": true,
Expand Down Expand Up @@ -3426,7 +3426,7 @@ spec:
},
"editorMode": "code",
"exemplar": false,
"expr": "sum(container_memory_usage_bytes{container!=\"\",container!=\"POD\",job=\"kubelet\"} * on (node) group_left() kube_node_role{role=\"acscs-infra\"} * on (namespace, pod) group_left(workload) namespace_workload_pod:kube_pod_owner:relabel) by (workload)",
"expr": "sum(container_memory_working_set_bytes{container!=\"\",container!=\"POD\",job=\"kubelet\"} * on (node) group_left() kube_node_role{role=\"acscs-infra\"} * on (namespace, pod) group_left(workload) namespace_workload_pod:kube_pod_owner:relabel) by (workload)",
"format": "table",
"hide": false,
"instant": true,
Expand Down
2 changes: 1 addition & 1 deletion resources/grafana/sources/rhacs-central.json
Original file line number Diff line number Diff line change
Expand Up @@ -730,7 +730,7 @@
"datasource": {
"uid": "${datasource}"
},
"expr": "sum(container_memory_usage_bytes{namespace=\"rhacs-$instance_id\", container=\"central\", job=~\"kubelet\"})",
"expr": "sum(container_memory_working_set_bytes{namespace=\"rhacs-$instance_id\", container=\"central\", job=~\"kubelet\"})",
"interval": "",
"legendFormat": "Used",
"refId": "B"
Expand Down
6 changes: 3 additions & 3 deletions resources/grafana/sources/rhacs-cluster-overview.json
Original file line number Diff line number Diff line change
Expand Up @@ -946,7 +946,7 @@
"uid": "PBFA97CFB590B2093"
},
"editorMode": "code",
"expr": "sum(container_memory_usage_bytes{namespace=~\"rhacs-$instance_id\", container=\"central\", job=~\"kubelet\"}) by (namespace) / sum(container_spec_memory_limit_bytes{namespace=~\"rhacs-$instance_id\", container=\"central\", job=~\"kubelet\"}) by (namespace)",
"expr": "sum(container_memory_working_set_bytes{namespace=~\"rhacs-$instance_id\", container=\"central\", job=~\"kubelet\"}) by (namespace) / sum(container_spec_memory_limit_bytes{namespace=~\"rhacs-$instance_id\", container=\"central\", job=~\"kubelet\"}) by (namespace)",
"format": "time_series",
"interval": "",
"legendFormat": "{{namespace}}",
Expand Down Expand Up @@ -1389,7 +1389,7 @@
},
"editorMode": "code",
"exemplar": false,
"expr": "sum(container_memory_usage_bytes{namespace=~\"rhacs-$instance_id\", container=\"central\", job=~\"kubelet\"}) by (namespace) / sum(container_spec_memory_limit_bytes{namespace=~\"rhacs-$instance_id\", container=\"central\", job=~\"kubelet\"}) by (namespace)",
"expr": "sum(container_memory_working_set_bytes{namespace=~\"rhacs-$instance_id\", container=\"central\", job=~\"kubelet\"}) by (namespace) / sum(container_spec_memory_limit_bytes{namespace=~\"rhacs-$instance_id\", container=\"central\", job=~\"kubelet\"}) by (namespace)",
"format": "table",
"instant": true,
"legendFormat": "__auto",
Expand Down Expand Up @@ -1797,7 +1797,7 @@
},
"editorMode": "code",
"exemplar": false,
"expr": "sum(container_memory_usage_bytes{namespace=~\"rhacs-$instance_id\", container=\"scanner\", job=~\"kubelet\"}) by (namespace) / sum(container_spec_memory_limit_bytes{namespace=~\"rhacs-$instance_id\", container=\"scanner\", job=~\"kubelet\"}) by (namespace)",
"expr": "sum(container_memory_working_set_bytes{namespace=~\"rhacs-$instance_id\", container=\"scanner\", job=~\"kubelet\"}) by (namespace) / sum(container_spec_memory_limit_bytes{namespace=~\"rhacs-$instance_id\", container=\"scanner\", job=~\"kubelet\"}) by (namespace)",
"format": "table",
"instant": true,
"legendFormat": "__auto",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3166,7 +3166,7 @@
},
"editorMode": "code",
"exemplar": false,
"expr": "sum(container_memory_usage_bytes{container!=\"\",container!=\"POD\",job=\"kubelet\"} * on (node) group_left() kube_node_role{role=\"acscs-worker\"} * on (namespace, pod) group_left(workload) namespace_workload_pod:kube_pod_owner:relabel) by (workload)",
"expr": "sum(container_memory_working_set_bytes{container!=\"\",container!=\"POD\",job=\"kubelet\"} * on (node) group_left() kube_node_role{role=\"acscs-worker\"} * on (namespace, pod) group_left(workload) namespace_workload_pod:kube_pod_owner:relabel) by (workload)",
"format": "table",
"hide": false,
"instant": true,
Expand Down Expand Up @@ -3415,7 +3415,7 @@
},
"editorMode": "code",
"exemplar": false,
"expr": "sum(container_memory_usage_bytes{container!=\"\",container!=\"POD\",job=\"kubelet\"} * on (node) group_left() kube_node_role{role=\"acscs-infra\"} * on (namespace, pod) group_left(workload) namespace_workload_pod:kube_pod_owner:relabel) by (workload)",
"expr": "sum(container_memory_working_set_bytes{container!=\"\",container!=\"POD\",job=\"kubelet\"} * on (node) group_left() kube_node_role{role=\"acscs-infra\"} * on (namespace, pod) group_left(workload) namespace_workload_pod:kube_pod_owner:relabel) by (workload)",
"format": "table",
"hide": false,
"instant": true,
Expand Down

0 comments on commit 0c3934b

Please sign in to comment.