Skip to content

Commit

Permalink
fix bug in memory pct calculation
Browse files Browse the repository at this point in the history
  • Loading branch information
Sohamdg081992 committed May 29, 2024
1 parent b959a08 commit 82bede1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion internal/alerts/example-alert-template.json
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@
},
{
"alert": "Memory usage % greater than 75 for prometheus-collector containers on cluster ci-dev-aks-mac-eus",
"expression": "(sum(container_memory_working_set_bytes{namespace=\"kube-system\", container=\"prometheus-collector\", image!=\"\"}) by (container, pod) / sum(kube_pod_container_resource_limits{namespace=\"kube-system\", container=\"prometheus-collector\", resource=\"memory\"}) by (container, pod)) > 75",
"expression": "(sum(container_memory_working_set_bytes{namespace=\"kube-system\", container=\"prometheus-collector\", image!=\"\"}) by (container, pod) / sum(kube_pod_container_resource_limits{namespace=\"kube-system\", container=\"prometheus-collector\", resource=\"memory\"}) by (container, pod)) * 100> 75",
"for": "PT3M",
"annotations": {
"description": "Memory usage greater than 75% for prometheus-collector containers on cluster ci-dev-aks-mac-eus"
Expand Down
4 changes: 2 additions & 2 deletions otelcollector/test/ci-cd/ci-cd-cluster.json
Original file line number Diff line number Diff line change
Expand Up @@ -937,7 +937,7 @@
},
{
"alert": "[Concat('Memory usage greater than 75% for prometheus-collector containers on cluster', parameters('clusterName'))]",
"expression": "(sum(container_memory_working_set_bytes{namespace=\"kube-system\", container=\"prometheus-collector\", image!=\"\"}) by (container, pod) / sum(kube_pod_container_resource_limits{namespace=\"kube-system\", container=\"prometheus-collector\", resource=\"memory\"}) by (container, pod)) > 75",
"expression": "(sum(container_memory_working_set_bytes{namespace=\"kube-system\", container=\"prometheus-collector\", image!=\"\"}) by (container, pod) / sum(kube_pod_container_resource_limits{namespace=\"kube-system\", container=\"prometheus-collector\", resource=\"memory\"}) by (container, pod)) * 100> 75",
"for": "PT3M",
"annotations": {
"description": "[Concat('Memory usage greater than 75% for prometheus-collector containers on cluster', parameters('clusterName'))]"
Expand Down Expand Up @@ -976,4 +976,4 @@
}
],
"outputs": {}
}
}

0 comments on commit 82bede1

Please sign in to comment.