-
Notifications
You must be signed in to change notification settings - Fork 26
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
HTTP-Server tests detaching alerts #133
Comments
Same thing seems to be happening for dns tests as well:
|
Hi @berkeli , Thanks for raising this issue and I apologize for the inconvenience that this is causing. I have created an internal ticket to look into this. We will have a look and will get back to you as soon as possible. Thanks, |
Hello @pedro-te, Is there any update on this? We just learned that modifying |
Hey @berkeli, We're not able to reproduce the issue you are describing. I tested using the following resources: data "thousandeyes_agent" "lisbon" {
agent_name = "Lisbon, Portugal"
}
resource "thousandeyes_alert_rule" "st-223" {
rule_name = "ST-223: example rule"
alert_type = "HTTP Server"
expression = "((errorType != \"None\"))"
minimum_sources = 1
rounds_violating_out_of = 1
rounds_violating_required = 1
notifications {
email {
recipient = [
"[email protected]"
]
}
}
}
resource "thousandeyes_http_server" "st-223" {
test_name = "ST-223 Pedro: Example HTTP test"
interval = 120
enabled = true
alerts_enabled = false
url = "https://www.tesla.com"
agents {
agent_id = data.thousandeyes_agent.lisbon.agent_id
}
alert_rules {
rule_id = thousandeyes_alert_rule.st-223.rule_id
}
} As you can see This is the terraform plan:
If I check the ThousandEyes App I see the following: If I run terraform plan again, I get: Not sure if you did something different or if I didn't exactly mimic what you did. Can you help us reproduce the issue? Can you also try the above snippet to check if it works for you? Also, what values are you passing here? network_measurements = var.network_measurements
bgp_measurements = var.bgp_measurements
mtu_measurements = var.mtu_measurements Thank you, |
Hi @pedro-te Apologies for the delayed response. I have now run a few more tests and couldn't reproduce my original report, but I think I was able to pinpoint the issue. The alert only detaches if the TF file
Terraform apply and plan works as expected as per your output, but Since I added
After this terraform apply, Now, if we modify the alert_rule only (any field) it will detach from the test. As an example, I will modify notifications:
This modifies the alert_rule and terraform plan doesn't show that test is being modified:
If we check the dashboard now, the alert_rule is detached: And subsequent terraform apply to enable alerts will fail. I think the issue is in the |
Hi @berkeli , Thank you for the detailed report and step by step instructions. Cheers, |
Hi @berkeli , Just to give you a quick update, we were able to reproduce the issue now. Thanks, |
Hello,
We have encountered the following issue with thousandeyes_http_server resource:
When a test is created with
alerts_enabled = false
and an alert is attached to it, it doesn't attach the alert. Example code below:Code:
When you run terraform plan, it shows that alert is being created and is being attached. But when it is created the alert is not attached. If you attach the alert from the dashboard and run terraform apply again, it will again detach the alert.
When you make a change to enable the alert, it errors out because there are no alerts attached (400 bad request error)
Let me know if you have any questions
Thanks
The text was updated successfully, but these errors were encountered: