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

opentelekomcloud_ces_alarmrule : cannot use multiple dimensions #2392

Open
reiSh6phoo9o opened this issue Dec 20, 2023 · 2 comments
Open

opentelekomcloud_ces_alarmrule : cannot use multiple dimensions #2392

reiSh6phoo9o opened this issue Dec 20, 2023 · 2 comments
Assignees
Labels
otc-issue Blocked by OTC issues

Comments

@reiSh6phoo9o
Copy link

reiSh6phoo9o commented Dec 20, 2023

Hi,

I'm trying to create an alarmrule with multiple dimensions. As I understand from the docs ( https://registry.terraform.io/providers/opentelekomcloud/opentelekomcloud/latest/docs/resources/ces_alarmrule#dimensions ), this should be possible, though the docs here are not clear to me ("list of metric dimensions" is vague and rather unclear. I guess: multiple blocks).

I can create multiple dimensions using the webgui, but not using terraform.

Specifically, I want to create one alarmrule, which monitors both nodes of a HA RDS setup.

Terraform provider version

Terraform v1.5.7
on darwin_amd64

  • provider registry.terraform.io/hashicorp/random v3.6.0
  • provider registry.terraform.io/opentelekomcloud/opentelekomcloud v1.35.14

Affected Resource(s)

  • opentelekomcloud_ces_alarmrule

Terraform Configuration Files

resource "opentelekomcloud_ces_alarmrule" "high_cpu_usage" {
  alarm_name    = "test"
  alarm_level   = 2
  metric {
    namespace   = "SYS.RDS"
    metric_name = "rds001_cpu_util"
    dimensions {
      name  = "rds_instance_id"
      value = opentelekomcloud_rds_instance_v3.main.nodes[0].id
    }
    dimensions {
      name  = "rds_instance_id"
      value = opentelekomcloud_rds_instance_v3.main.nodes[1].id
    }
  }
  condition { ... }
    period              = 300
    filter                 = "max"
    comparison_operator = ">"
    value                = 80
    unit                  = "%"
    count               = 5
  }
  alarm_actions {
    type              = "notification"
    notification_list = [opentelekomcloud_smn_topic_v2.alerts.id]
  }
  ok_actions {
    type              = "notification"
    notification_list = [opentelekomcloud_smn_topic_v2.alerts.id]
  }
}

Steps to Reproduce

  1. terraform apply

Expected Behavior

The alarmrule should be created, and it should monitor two objects (node0 and node2).

Actual Behavior

An alarmrule is created, but it does not trigger an alert. If I compare it to the alertrule I click in the GUI, the diff is:

  • the terraformed lertrule contains only one, not two monitored objects
  • id of the monitored object is a comma-separated string with two ids, e.g. "710c112406b444639443763984b6cb04no01,710c112406b444639443763984b6cb04no01"

References

from this ticket, I expected that the syntax is use should work:

@reiSh6phoo9o reiSh6phoo9o changed the title opentelekomcloud_ces_alarmrule : cannot create opentelekomcloud_ces_alarmrule : cannot use multiple dimensions Dec 20, 2023
@anton-sidelnikov anton-sidelnikov self-assigned this Dec 26, 2023
@anton-sidelnikov
Copy link
Member

Hi @reiSh6phoo9o same behaviour if you create alarm rule by api through curl, i will create internal ticket, not terraform issue

@anton-sidelnikov anton-sidelnikov added the otc-issue Blocked by OTC issues label Dec 26, 2023
@anton-sidelnikov
Copy link
Member

Created internal issue: https://jira.tsi-dev.otc-service.com/browse/BM-3840

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
otc-issue Blocked by OTC issues
Projects
None yet
Development

No branches or pull requests

2 participants