From 9c319584a593f2fcda34d35a28c355addbd38a5b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ruben=20H=C3=B6nle?= Date: Tue, 26 Aug 2025 13:58:41 +0200 Subject: [PATCH] chore(observability): adjust example and default values (#937) --- docs/data-sources/observability_instance.md | 6 +++--- docs/guides/using_loadbalancer_with_observability.md | 6 +++--- docs/resources/observability_instance.md | 12 ++++++------ .../stackit_observability_instance/resource.tf | 6 +++--- .../services/observability/instance/datasource.go | 6 +++--- .../services/observability/instance/resource.go | 6 +++--- .../services/observability/observability_acc_test.go | 6 +++--- .../using_loadbalancer_with_observability.md.tmpl | 6 +++--- 8 files changed, 27 insertions(+), 27 deletions(-) diff --git a/docs/data-sources/observability_instance.md b/docs/data-sources/observability_instance.md index c31a946c..1e69cc72 100644 --- a/docs/data-sources/observability_instance.md +++ b/docs/data-sources/observability_instance.md @@ -44,9 +44,9 @@ data "stackit_observability_instance" "example" { - `logs_push_url` (String) Specifies URL for pushing logs. - `logs_url` (String) Specifies Logs URL. - `metrics_push_url` (String) Specifies URL for pushing metrics. -- `metrics_retention_days` (Number) Specifies for how many days the raw metrics are kept. -- `metrics_retention_days_1h_downsampling` (Number) Specifies for how many days the 1h downsampled metrics are kept. must be less than the value of the 5m downsampling retention. Default is set to `0` (disabled). -- `metrics_retention_days_5m_downsampling` (Number) Specifies for how many days the 5m downsampled metrics are kept. must be less than the value of the general retention. Default is set to `0` (disabled). +- `metrics_retention_days` (Number) Specifies for how many days the raw metrics are kept. Default is set to `90`. +- `metrics_retention_days_1h_downsampling` (Number) Specifies for how many days the 1h downsampled metrics are kept. must be less than the value of the 5m downsampling retention. Default is set to `90`. +- `metrics_retention_days_5m_downsampling` (Number) Specifies for how many days the 5m downsampled metrics are kept. must be less than the value of the general retention. Default is set to `90`. - `metrics_url` (String) Specifies metrics URL. - `name` (String) The name of the Observability instance. - `otlp_traces_url` (String) diff --git a/docs/guides/using_loadbalancer_with_observability.md b/docs/guides/using_loadbalancer_with_observability.md index 6e1d982e..d22edf5d 100644 --- a/docs/guides/using_loadbalancer_with_observability.md +++ b/docs/guides/using_loadbalancer_with_observability.md @@ -27,9 +27,9 @@ This guide explains how to configure the STACKIT Loadbalancer product to send me name = "example-instance" plan_name = "Observability-Monitoring-Medium-EU01" acl = ["0.0.0.0/0"] - metrics_retention_days = 30 - metrics_retention_days_5m_downsampling = 10 - metrics_retention_days_1h_downsampling = 5 + metrics_retention_days = 90 + metrics_retention_days_5m_downsampling = 90 + metrics_retention_days_1h_downsampling = 90 } resource "stackit_observability_credential" "observability01-credential" { diff --git a/docs/resources/observability_instance.md b/docs/resources/observability_instance.md index 5762b1d0..2592b6c6 100644 --- a/docs/resources/observability_instance.md +++ b/docs/resources/observability_instance.md @@ -18,9 +18,9 @@ resource "stackit_observability_instance" "example" { name = "example-instance" plan_name = "Observability-Monitoring-Medium-EU01" acl = ["1.1.1.1/32", "2.2.2.2/32"] - metrics_retention_days = 30 - metrics_retention_days_5m_downsampling = 10 - metrics_retention_days_1h_downsampling = 5 + metrics_retention_days = 90 + metrics_retention_days_5m_downsampling = 90 + metrics_retention_days_1h_downsampling = 90 } # Only use the import statement, if you want to import an existing observability instance @@ -43,9 +43,9 @@ import { - `acl` (Set of String) The access control list for this instance. Each entry is an IP address range that is permitted to access, in CIDR notation. - `alert_config` (Attributes) Alert configuration for the instance. (see [below for nested schema](#nestedatt--alert_config)) -- `metrics_retention_days` (Number) Specifies for how many days the raw metrics are kept. -- `metrics_retention_days_1h_downsampling` (Number) Specifies for how many days the 1h downsampled metrics are kept. must be less than the value of the 5m downsampling retention. Default is set to `0` (disabled). -- `metrics_retention_days_5m_downsampling` (Number) Specifies for how many days the 5m downsampled metrics are kept. must be less than the value of the general retention. Default is set to `0` (disabled). +- `metrics_retention_days` (Number) Specifies for how many days the raw metrics are kept. Default is set to `90`. +- `metrics_retention_days_1h_downsampling` (Number) Specifies for how many days the 1h downsampled metrics are kept. must be less than the value of the 5m downsampling retention. Default is set to `90`. +- `metrics_retention_days_5m_downsampling` (Number) Specifies for how many days the 5m downsampled metrics are kept. must be less than the value of the general retention. Default is set to `90`. - `parameters` (Map of String) Additional parameters. ### Read-Only diff --git a/examples/resources/stackit_observability_instance/resource.tf b/examples/resources/stackit_observability_instance/resource.tf index 21dd0b1b..f78f92e8 100644 --- a/examples/resources/stackit_observability_instance/resource.tf +++ b/examples/resources/stackit_observability_instance/resource.tf @@ -3,9 +3,9 @@ resource "stackit_observability_instance" "example" { name = "example-instance" plan_name = "Observability-Monitoring-Medium-EU01" acl = ["1.1.1.1/32", "2.2.2.2/32"] - metrics_retention_days = 30 - metrics_retention_days_5m_downsampling = 10 - metrics_retention_days_1h_downsampling = 5 + metrics_retention_days = 90 + metrics_retention_days_5m_downsampling = 90 + metrics_retention_days_1h_downsampling = 90 } # Only use the import statement, if you want to import an existing observability instance diff --git a/stackit/internal/services/observability/instance/datasource.go b/stackit/internal/services/observability/instance/datasource.go index 3e7891d9..a5b98021 100644 --- a/stackit/internal/services/observability/instance/datasource.go +++ b/stackit/internal/services/observability/instance/datasource.go @@ -133,15 +133,15 @@ func (d *instanceDataSource) Schema(_ context.Context, _ datasource.SchemaReques Sensitive: true, }, "metrics_retention_days": schema.Int64Attribute{ - Description: "Specifies for how many days the raw metrics are kept.", + Description: "Specifies for how many days the raw metrics are kept. Default is set to `90`.", Computed: true, }, "metrics_retention_days_5m_downsampling": schema.Int64Attribute{ - Description: "Specifies for how many days the 5m downsampled metrics are kept. must be less than the value of the general retention. Default is set to `0` (disabled).", + Description: "Specifies for how many days the 5m downsampled metrics are kept. must be less than the value of the general retention. Default is set to `90`.", Computed: true, }, "metrics_retention_days_1h_downsampling": schema.Int64Attribute{ - Description: "Specifies for how many days the 1h downsampled metrics are kept. must be less than the value of the 5m downsampling retention. Default is set to `0` (disabled).", + Description: "Specifies for how many days the 1h downsampled metrics are kept. must be less than the value of the 5m downsampling retention. Default is set to `90`.", Computed: true, }, "metrics_url": schema.StringAttribute{ diff --git a/stackit/internal/services/observability/instance/resource.go b/stackit/internal/services/observability/instance/resource.go index 4e6fe244..edb24d9a 100644 --- a/stackit/internal/services/observability/instance/resource.go +++ b/stackit/internal/services/observability/instance/resource.go @@ -473,17 +473,17 @@ func (r *instanceResource) Schema(_ context.Context, _ resource.SchemaRequest, r }, }, "metrics_retention_days": schema.Int64Attribute{ - Description: "Specifies for how many days the raw metrics are kept.", + Description: "Specifies for how many days the raw metrics are kept. Default is set to `90`.", Optional: true, Computed: true, }, "metrics_retention_days_5m_downsampling": schema.Int64Attribute{ - Description: "Specifies for how many days the 5m downsampled metrics are kept. must be less than the value of the general retention. Default is set to `0` (disabled).", + Description: "Specifies for how many days the 5m downsampled metrics are kept. must be less than the value of the general retention. Default is set to `90`.", Optional: true, Computed: true, }, "metrics_retention_days_1h_downsampling": schema.Int64Attribute{ - Description: "Specifies for how many days the 1h downsampled metrics are kept. must be less than the value of the 5m downsampling retention. Default is set to `0` (disabled).", + Description: "Specifies for how many days the 1h downsampled metrics are kept. must be less than the value of the 5m downsampling retention. Default is set to `90`.", Optional: true, Computed: true, }, diff --git a/stackit/internal/services/observability/observability_acc_test.go b/stackit/internal/services/observability/observability_acc_test.go index 20ff003c..ef27a80b 100644 --- a/stackit/internal/services/observability/observability_acc_test.go +++ b/stackit/internal/services/observability/observability_acc_test.go @@ -69,9 +69,9 @@ var testConfigVarsMax = config.Variables{ "alert_annotation": config.StringVariable("annotation1"), "alert_interval": config.StringVariable("5h"), // max instance - "metrics_retention_days": config.StringVariable("30"), - "metrics_retention_days_5m_downsampling": config.StringVariable("10"), - "metrics_retention_days_1h_downsampling": config.StringVariable("5"), + "metrics_retention_days": config.StringVariable("90"), + "metrics_retention_days_5m_downsampling": config.StringVariable("90"), + "metrics_retention_days_1h_downsampling": config.StringVariable("90"), "instance_acl_1": config.StringVariable("1.2.3.4/32"), "instance_acl_2": config.StringVariable("111.222.111.222/32"), "receiver_name": config.StringVariable("OpsGenieReceiverInfo"), diff --git a/templates/guides/using_loadbalancer_with_observability.md.tmpl b/templates/guides/using_loadbalancer_with_observability.md.tmpl index 6e1d982e..d22edf5d 100644 --- a/templates/guides/using_loadbalancer_with_observability.md.tmpl +++ b/templates/guides/using_loadbalancer_with_observability.md.tmpl @@ -27,9 +27,9 @@ This guide explains how to configure the STACKIT Loadbalancer product to send me name = "example-instance" plan_name = "Observability-Monitoring-Medium-EU01" acl = ["0.0.0.0/0"] - metrics_retention_days = 30 - metrics_retention_days_5m_downsampling = 10 - metrics_retention_days_1h_downsampling = 5 + metrics_retention_days = 90 + metrics_retention_days_5m_downsampling = 90 + metrics_retention_days_1h_downsampling = 90 } resource "stackit_observability_credential" "observability01-credential" {