-
Notifications
You must be signed in to change notification settings - Fork 75
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 not allowed to create alert rules where the metric_name starts with "/" for Linux mount points. #2078
Comments
…es_alarmrule` (#2084) [CES] support slashes for metric name in `resource/opentelekomcloud_ces_alarmrule` Summary of the Pull Request PR Checklist Refers to: #2078 Tests added/passed. Documentation updated. Schema updated. Release notes added. Acceptance Steps Performed === RUN TestCESAlarmRule_basic === PAUSE TestCESAlarmRule_basic === CONT TestCESAlarmRule_basic --- PASS: TestCESAlarmRule_basic (150.95s) === RUN TestAccCheckCESV1AlarmValidation --- PASS: TestAccCheckCESV1AlarmValidation (22.09s) === RUN TestCESAlarmRule_slashes === PAUSE TestCESAlarmRule_slashes === CONT TestCESAlarmRule_slashes --- PASS: TestCESAlarmRule_slashes (103.15s) PASS Process finished with the exit code 0 Reviewed-by: Artem Lifshits Reviewed-by: Aloento
@thople hi, please check on latest |
@anton-sidelnikov hi, thank you for the quick fix. I tested but there is still a bug in it. What happens is that it creates the alarm rule just as it should be, but it won't work. |
@thople hm, seems another bug, will ask QA team |
@thople could you show some pictures what exact not working in rule? I created that in latest provider:
|
@thople Thank you, yes seems api works differently from UI, created internal issue for backend team: |
Terraform provider version
Terraform v1.3.7
Affected Resource(s)
"opentelekomcloud_ces_alarmrule"
Terraform Configuration Files
resource "opentelekomcloud_ces_alarmrule" "disk_usage" {
alarm_name = "alert-name"
alarm_action_enabled = true
metric {
namespace = "SYS.ECS"
metric_name = "/_disk_usedPercent"
dimensions {
name = "instance_id"
value = data.opentelekomcloud_compute_instance_v2.instance.id
}
}
condition {
period = 1
filter = "sum"
comparison_operator = ">="
value = 90
unit = "%"
count = 3
}
}
Debug Output/Panic Output
│ Error: invalid value for metric.0.metric_name (Must start with a letter.)
│
│ with module.cloudeye-alert.opentelekomcloud_ces_alarmrule.disk_usage,
│ on ../../../modules/main.tf line 87, in resource "opentelekomcloud_ces_alarmrule" "disk_usage":
│ 87: metric_name = "/_disk_usedPercent"
│
Steps to Reproduce
metric_name = "/_disk_usedPercent" or metric_name = "/opt_disk_usedPercent"
terraform apply
Expected Behavior
Should allow creating alartrule Terraform that starts with "/" for Linux mount points.
Like this in the interface. (added manual in interface)
Actual Behavior
It forces creating alert rules that start with a letter. It will create the alert if you add a letter, but this won't work for Linux. Furthermore, it's written in the web interface behind the "?" at Mount point option to add it with "/":
· For a Windows OS, enter a drive letter, such as C, D, or E.
· For a Linux OS, enter a mount point, such as /dev or /opt.
The text was updated successfully, but these errors were encountered: