You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
have the variables in the missing_values block be set up as: variable "min_non_null_values_pct" { description = "The minimum percentage of the time window for which data points must exist" default = 0 type = number validation { condition = var.min_non_null_values_pct >= 0 && var.min_non_null_values_pct <= 100 error_message = "min_non_null_values_pct represents a percentage and must be between 0 and 100" } } variable "missing_values_become_zero" { default = false description = "If false (default), missing values are nulls. If true, set missing values to 0. True also OVERRIDES the min_non_null_values_pct var and renders it meaningless." type = bool }
if you have a module that doesn't pass in these variables (ie uses the defaults), we are now seeing this bug. NOTE that we did not change anything on our end, and this has been working up until today.
Here's a module example:
`module "storage_node_added" {
source = "../base_alerts/metric_alert_morethan"
description = <<-EOT
A storage node was detected. These should no longer exist as we have deprecated VLZ.
Known issues: Every upgrade resets the storage node group. Need to apply ASG Runbook to scale these down.
EOT
Affected Resource(s)
Terraform Configuration Files
Use a base module (base metric alert ex:
`resource "coralogix_alert" "metric_alert" {
name = "${var.name} - TF"
description = var.description
priority = var.priority
enabled = var.enabled
phantom_mode = var.phantom_mode
labels = length(var.tags) == 0 ? null : var.tags
incidents_settings = {
notify_on = var.auto_resolve_alert_when_signal_disappears ? "Triggered and Resolved" : "Triggered Only"
retriggering_period = {
minutes = var.retriggering_period
}
}
type_definition = {
metric_threshold = {
metric_filter = {
promql = var.query
}
rules = [{
condition = {
threshold = var.threshold
for_over_pct = var.pct_time_window_that_signal_must_exceed_threshold
of_the_last = var.time_window
condition_type = var.condition_type
}
override = {
priority = var.priority
}
}]
}
notification_group = {
group_by_keys = length(var.group_by) == 0 ? null : var.group_by
webhooks_settings = [
for endpoint in var.endpoints : {
integration_id = endpoint
notify_on = var.auto_resolve_alert_when_signal_disappears ? "Triggered and Resolved" : "Triggered Only"
retriggering_period = {
minutes = var.retriggering_period
}
}
]
}
}
`
have the variables in the missing_values block be set up as:
variable "min_non_null_values_pct" { description = "The minimum percentage of the time window for which data points must exist" default = 0 type = number validation { condition = var.min_non_null_values_pct >= 0 && var.min_non_null_values_pct <= 100 error_message = "min_non_null_values_pct represents a percentage and must be between 0 and 100" } } variable "missing_values_become_zero" { default = false description = "If false (default), missing values are nulls. If true, set missing values to 0. True also OVERRIDES the min_non_null_values_pct var and renders it meaningless." type = bool }
if you have a module that doesn't pass in these variables (ie uses the defaults), we are now seeing this bug. NOTE that we did not change anything on our end, and this has been working up until today.
Here's a module example:
`module "storage_node_added" {
source = "../base_alerts/metric_alert_morethan"
description = <<-EOT
A storage node was detected. These should no longer exist as we have deprecated VLZ.
name = "Storage node detected"
auto_resolve_alert_when_signal_disappears = true
priority = "P1"
query = "sum(k8s_node_condition_ready{type="storage",stage!="preview"}) by (k8s_node_name, stage)"
threshold = 0
endpoints = [var.integration_pagerduty_id, var.integration_teams_id]
group_by = ["stage"]
phantom_mode = false
}`
Again, I want to emphasize that this code has been like this for a while, and we changed nothing, but got errors today.
References
Community Note
The text was updated successfully, but these errors were encountered: