From 12c834644a7f05a7a495ef2c4996cc2c77720a9a Mon Sep 17 00:00:00 2001 From: Gauthier AMPE Date: Mon, 5 Jun 2023 16:49:43 +0200 Subject: [PATCH 1/3] Add heartbeat_aggregation_function on azure_resource_id --- modules/integration_azure-firewall/conf/00-heartbeat.yaml | 2 +- modules/integration_azure-firewall/variables-gen.tf | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/integration_azure-firewall/conf/00-heartbeat.yaml b/modules/integration_azure-firewall/conf/00-heartbeat.yaml index 63808075d..50a9918b1 100644 --- a/modules/integration_azure-firewall/conf/00-heartbeat.yaml +++ b/modules/integration_azure-firewall/conf/00-heartbeat.yaml @@ -3,7 +3,7 @@ module: Azure firewall name: heartbeat transformation: true -aggregation: true +aggregation: ".mean(by=['azure_resource_id'])" filtering: "filter('resource_type', 'Microsoft.Network/azureFirewalls') and filter('primary_aggregation_type', 'true')" diff --git a/modules/integration_azure-firewall/variables-gen.tf b/modules/integration_azure-firewall/variables-gen.tf index 974d3f0e8..df1f07aef 100644 --- a/modules/integration_azure-firewall/variables-gen.tf +++ b/modules/integration_azure-firewall/variables-gen.tf @@ -9,7 +9,7 @@ variable "heartbeat_notifications" { variable "heartbeat_aggregation_function" { description = "Aggregation function and group by for heartbeat detector (i.e. \".mean(by=['host'])\")" type = string - default = "" + default = ".mean(by=['azure_resource_id'])" } variable "heartbeat_transformation_function" { From f9fb6ab73ce9f7efdda5a2b96fdf8f979babb314 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Marmol?= Date: Tue, 7 Nov 2023 16:25:22 +0100 Subject: [PATCH 2/3] Update modules/integration_azure-firewall/variables-gen.tf Co-authored-by: Spi --- modules/integration_azure-firewall/variables-gen.tf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/integration_azure-firewall/variables-gen.tf b/modules/integration_azure-firewall/variables-gen.tf index df1f07aef..96b9e4a05 100644 --- a/modules/integration_azure-firewall/variables-gen.tf +++ b/modules/integration_azure-firewall/variables-gen.tf @@ -9,7 +9,7 @@ variable "heartbeat_notifications" { variable "heartbeat_aggregation_function" { description = "Aggregation function and group by for heartbeat detector (i.e. \".mean(by=['host'])\")" type = string - default = ".mean(by=['azure_resource_id'])" + default = ".mean(by=['azure_resource_name', 'azure_resource_group_name', 'azure_region'])" } variable "heartbeat_transformation_function" { From 5fa7b71a9bc609ce43c58c66fc06bfed28b88683 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20MARMOL?= Date: Tue, 7 Nov 2023 16:47:59 +0100 Subject: [PATCH 3/3] Apply suggestion --- modules/integration_azure-firewall/conf/00-heartbeat.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/integration_azure-firewall/conf/00-heartbeat.yaml b/modules/integration_azure-firewall/conf/00-heartbeat.yaml index 50a9918b1..f45dffb40 100644 --- a/modules/integration_azure-firewall/conf/00-heartbeat.yaml +++ b/modules/integration_azure-firewall/conf/00-heartbeat.yaml @@ -3,7 +3,7 @@ module: Azure firewall name: heartbeat transformation: true -aggregation: ".mean(by=['azure_resource_id'])" +aggregation: ".mean(by=['azure_resource_name', 'azure_resource_group_name', 'azure_region'])" filtering: "filter('resource_type', 'Microsoft.Network/azureFirewalls') and filter('primary_aggregation_type', 'true')"