From efd5594a8dc0a6839621c467bbf4799cf3f68c4f Mon Sep 17 00:00:00 2001 From: Michiel Piscaer Date: Tue, 4 Jun 2024 17:43:22 +0200 Subject: [PATCH] fix: nova capacity alert the NovaCapacity it does not take ram_allocation_ratio into account I have hardcoded this at 90%. But U think we can do better --- roles/kube_prometheus_stack/files/jsonnet/openstack.libsonnet | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/kube_prometheus_stack/files/jsonnet/openstack.libsonnet b/roles/kube_prometheus_stack/files/jsonnet/openstack.libsonnet index e77077e9f..1659e525a 100644 --- a/roles/kube_prometheus_stack/files/jsonnet/openstack.libsonnet +++ b/roles/kube_prometheus_stack/files/jsonnet/openstack.libsonnet @@ -245,7 +245,7 @@ description: 'The cloud capacity is currently at `{{ $value }}` which means there is a risk of running out of capacity due to the timeline required to add new nodes. Please ensure that adequate amount of infrastructure is assigned to this deployment to prevent this.', summary: '[nova] Capacity risk', }, - expr: 'sum ( openstack_nova_memory_used_bytes + on(hostname) group_left(adminState) (0 * openstack_nova_agent_state{exported_service="nova-compute",adminState="enabled"}) ) / sum ( openstack_nova_memory_available_bytes + on(hostname) group_left(adminState) (0 * openstack_nova_agent_state{exported_service="nova-compute",adminState="enabled"}) ) * 100 > 75', + expr: 'sum ( openstack_nova_memory_used_bytes + on(hostname) group_left(adminState) (0 * openstack_nova_agent_state{exported_service="nova-compute",adminState="enabled"}) ) / sum ( openstack_nova_memory_available_bytes*0.90 + on(hostname) group_left(adminState) (0 * openstack_nova_agent_state{exported_service="nova-compute",adminState="enabled"}) ) * 100 > 75', 'for': '6h', labels: { severity: 'warning',