Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

two alerts for one tests state is not persisting #111

Closed
Sraza11 opened this issue Oct 3, 2022 · 5 comments · Fixed by #151
Closed

two alerts for one tests state is not persisting #111

Sraza11 opened this issue Oct 3, 2022 · 5 comments · Fixed by #151
Labels
bug Something isn't working

Comments

@Sraza11
Copy link

Sraza11 commented Oct 3, 2022

I have two alerts attached to a test. Even after the "terraform apply" if I run terraform plan it shows pending change.
@tduzan-te @sfreitas-te @pedro-te

# thousandeyes_agent_to_server.XXXXXX will be updated in-place
  ~ resource "thousandeyes_agent_to_server" "XXXXX" {
        id                     = "XXXXX"
      ~ path_trace_mode        = "classic" -> "inSession"
        # (24 unchanged attributes hidden)

      + alert_rules {
          + rule_id = 448261
        }

        # (6 unchanged blocks hidden)
    }

Plan: 0 to add, 14 to change, 0 to destroy.
@pedro-te
Copy link
Collaborator

pedro-te commented Oct 6, 2022

Hi @Sraza11 ,

Thanks for reporting this.
May I ask you to share a snippet of your terraform code that leads to this?
Additionally is the plan showing changes to path_trace_mode and alert_rules on every run? Are those the pending changes that you're referring to? Please try to add as many details as possible so that we may attempt to reproduce the issue and resolve it.

Thanks,
Pedro

@Sraza11
Copy link
Author

Sraza11 commented Oct 6, 2022

the following snippet of terraform code that is triggering this behavior. if I remove the second alert rule (rule_id=448261) the issue goes away.

alert_rules {
    rule_id = 448261
  }

this plan is not showing changes to path_trace_mode but just the Alert rule. here is what it offers the difference it will apply with terraform apply.

~ resource "thousandeyes_agent_to_server" "subnet-136-1" {
        id                     = "3168076"
        # (25 unchanged attributes hidden)

      + alert_rules {
          + rule_id = 448261
        }

        # (6 unchanged blocks hidden)
    }

@pedro-te
Copy link
Collaborator

@Sraza11 can you share the full resource with us, please? I want to try to reproduce the issue.

@Sraza11
Copy link
Author

Sraza11 commented Oct 10, 2022

Here is the complete resource

resource "thousandeyes_agent_to_server" "Akamai-subnet-161-215-209" {
  test_name              = "PUBLIC Prefix 161.215.209.0/24_TF"
  description            = "Description"
  interval               = 600
  alerts_enabled         = true
  enabled                = true
  server                 = "161.215.209.19"
  protocol               = "TCP"
  port                   = "443"
  path_trace_mode        = "inSession"
  bgp_measurements       = true
  use_public_bgp         = true
  bandwidth_measurements = false



  groups {
    group_id = var.Prolexic_TAG
  }
  groups {
    group_id = var.tfTAG
  }
  agents {
    agent_id = 92379 #Alibaba Agent
  }
  agents {
    agent_id = 55869 #Chicago agent
  }
  agents {
    agent_id = 7056 # Houston agent
  }
  alert_rules {
    rule_id = var.ProlexicRule
  }
  alert_rules {
    rule_id = var.BgpAlertRule
  }

}

variable "ProlexicRule" {
  description = "Prolexic Alert rule"
  type        = number
  default     = "1240429"
}

variable "BgpAlertRule" {
  description = "Bgp alert rule"
  type        = number
  default     = "448261"
}

variable "tfTAG" {
  description = "tf tag"
  type        = number
  default     = "421071"

}

variable "Prolexic_TAG" {
  description = "Prolexic Tag"
  type        = number
  default     = 88494
}

@joaomper-TE joaomper-TE added the bug Something isn't working label Dec 4, 2023
@joaomper-TE
Copy link
Contributor

@Sraza11 while debugging this I found out that this only happens if one of the Alert Rules is a "default" one. Still not sure why, but just letting you know in case you need unblocking for this.

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants