Skip to content

Commit

Permalink
Merge pull request #20 from fiftech/fix-monitor-k8s-workload-wrong-vars
Browse files Browse the repository at this point in the history
fix(monitor-k8s-workload): wrong vars for queries of replica monitors
  • Loading branch information
Aohzan authored Feb 13, 2023
2 parents 13f272e + d764062 commit 66f86fd
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions caas/kubernetes/workload/monitors-k8s-workload.tf
Original file line number Diff line number Diff line change
Expand Up @@ -89,10 +89,10 @@ resource "datadog_monitor" "replica_ready" {
type = "query alert"

query = <<EOQ
${var.replica_available_time_aggregator}(${var.replica_available_timeframe}):
${var.replica_ready_time_aggregator}(${var.replica_ready_timeframe}):
max:kubernetes_state.replicaset.replicas_desired${module.filter-tags.query_alert} by {${local.replica_group_by}} -
max:kubernetes_state.replicaset.replicas_ready${module.filter-tags.query_alert} by {${local.replica_group_by}}
+ 1 < ${var.replica_available_threshold_critical}
+ 1 < ${var.replica_ready_threshold_critical}
EOQ

monitor_thresholds {
Expand All @@ -119,10 +119,10 @@ resource "datadog_monitor" "replica_current" {
type = "query alert"

query = <<EOQ
${var.replica_available_time_aggregator}(${var.replica_available_timeframe}):
${var.replica_current_time_aggregator}(${var.replica_current_timeframe}):
max:kubernetes_state.replicaset.replicas_desired${module.filter-tags.query_alert} by {${local.replica_group_by}} -
max:kubernetes_state.replicaset.replicas${module.filter-tags.query_alert} by {${local.replica_group_by}}
+ 1 < ${var.replica_available_threshold_critical}
+ 1 < ${var.replica_current_threshold_critical}
EOQ

monitor_thresholds {
Expand Down

0 comments on commit 66f86fd

Please sign in to comment.