diff --git a/plural/helm/plural/templates/prometheusrule.yaml b/plural/helm/plural/templates/prometheusrule.yaml index ad9006fbee..45997b6d56 100644 --- a/plural/helm/plural/templates/prometheusrule.yaml +++ b/plural/helm/plural/templates/prometheusrule.yaml @@ -71,7 +71,7 @@ spec: - alert: PluralHydraMEM expr: | ( - sum(container_memory_working_set_bytes{namespace="{{ .Release.Namespace }}",pod=~"plural-hydra-[0-9]+"}) + sum(container_memory_working_set_bytes{namespace="{{ .Release.Namespace }}",pod=~"plural-hydra-[0-9]+",image!="",container!=""}) / sum(kube_pod_container_resource_requests{endpoint="http",resource="memory",namespace="{{ .Release.Namespace }}", pod=~"plural-hydra-[0-9]+"}) ) > 1 for: 5m @@ -97,7 +97,7 @@ spec: - alert: PluralDbMEM expr: | ( - sum(container_memory_working_set_bytes{namespace="{{ .Release.Namespace }}",pod=~"plural-plural-[0-9]+"}) + sum(container_memory_working_set_bytes{namespace="{{ .Release.Namespace }}",pod=~"plural-plural-[0-9]+",image!="",container!=""}) / sum(kube_pod_container_resource_requests{endpoint="http",resource="memory",namespace="{{ .Release.Namespace }}", pod=~"plural-plural-[0-9]+"}) ) > 1 for: 5m diff --git a/plural/helm/plural/templates/runbooks.yaml b/plural/helm/plural/templates/runbooks.yaml index da8315dcd8..01ef4ab471 100644 --- a/plural/helm/plural/templates/runbooks.yaml +++ b/plural/helm/plural/templates/runbooks.yaml @@ -25,7 +25,7 @@ spec: prometheus: format: memory legend: $pod - query: sum(container_memory_working_set_bytes{namespace="{{ .Release.Namespace }}",pod=~"plural-plural-[0-9]+"}) by (pod) + query: sum(container_memory_working_set_bytes{namespace="{{ .Release.Namespace }}",pod=~"plural-plural-[0-9]+",image!="",container!=""}) by (pod) - name: volume type: prometheus prometheus: @@ -95,7 +95,7 @@ spec: prometheus: format: memory legend: $pod - query: sum(container_memory_working_set_bytes{namespace="{{ .Release.Namespace }}",pod=~"plural-hydra-[0-9]+"}) by (pod) + query: sum(container_memory_working_set_bytes{namespace="{{ .Release.Namespace }}",pod=~"plural-hydra-[0-9]+",image!="",container!=""}) by (pod) - name: statefulset type: kubernetes kubernetes: