-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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
CloudWatch Alarm ignores Threshold when comparison op is LessThan* #2281
Comments
Hi @bhgames, I just came across your issue looking for related information. This may not be an issue with the provider, but rather a side-effect of the way step scaling works (it's not intuitive). When you use a scale-in policy, and you have a step with null, it should be a null lower bound (-inf), which means you need to switch your metric_interval_lower_bound to metric_interval_upper_bound. This discrepancy may account for the strange presentation in the console. The Simple and Step Scaling Policies documentation has an example, and the StepAdjustment API reference has some additional details. |
This issue can probably be closed. I've confirmed that this is an issue related to the bounds, as mentioned above, and how they interact with the AWS console UI. The UI will show a step with +infinity or one with -infinity, but not both, depending on the associated alarm settings. The AWS console will show steps including one with +infinity when the associated alarm is set to a of If you switch the operator to be LessThanOrEqualToThreshold, the steps will include one with -infinity, assuming you have a step with an upper bound only and an implicit lower bound of infinity. It appears that the UI was designed around having two policies--one for scale out and one for scale in--and an associated pair of alarms. Although it's possible to use two policies with one alarm (as is shown in the Simple and Step Scaling Policies linked to above), doing so will result in the strange UI observed by @bhgames . |
@toddlucas / @bhgames do you think any documentation improvements could be made here? |
Hi @bflad, unless @bhgames has some ideas I think doing so would require too much explanation and would muddy the docs. This is really an AWS under-documentation issue WRT guidance on how to combine alarms and policies. They allow a few different approaches but it seems to work more seamlessly with two separate alarms and two separate policies. |
Closing this old issue. 👍 |
Hey yeah sorry I never got the github notifications here. I haven't worked
with the repository that exhibited this behavior in over a year now and no
longer have access to it as it is owned privately. I would say your
suggestion is fine.
…On Tue, Oct 30, 2018 at 2:48 PM Brian Flad ***@***.***> wrote:
Closed #2281
<#2281>
.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#2281 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AATQawqeKpR4xdzaswapgVU76XJwxw7lks5uqKz9gaJpZM4QdW5g>
.
--
*Jordan Prince* | Software Engineering
Caradvise.com | *O:* *301.751.7354* | *C:* *301.751.7354*
This e-mail is only intended for the person(s) to whom it is addressed and
may contain confidential information. Any unauthorized review, use,
disclosure, or distribution is prohibited. If you received this e-mail in
error, please notify the sender by reply e-mail and then delete this
message and any attachments from your system. Thank you for your
cooperation.
|
For those googling, swapping around |
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thanks! |
If you try to create a cloudwatch alarm that steps down on say, CPU Reservation for an ECS cluster, it creates something like this in AWS:
https://screencast.com/t/iNySsTAjcG
As compared to the GreaterThan version:
https://screencast.com/t/BZrmNmV4yQkB
Terraform Version
10.8.0
Affected Resource(s)
Please list the resources as a list, for example:
If this issue appears to affect multiple resources, it may be an issue with Terraform's core, so please mention this.
Terraform Configuration Files
Debug Output
https://gist.github.com/bhgames/ca2fd82dac7ef64d08c37a1451689d53
Panic Output
Nope
Expected Behavior
Should have set "60" as the proper top threshold so I had 60 >= CPU Reservation >= -Infinity instead of the weird >= CPU Res >= -Infinity which doesnt work. Have to go in to edit by hand.
Actual Behavior
Puts in >= CPU Res >= -Infinity which doesnt work. Have to go in to edit by hand to add the threshold.
Steps to Reproduce
Please list the steps required to reproduce the issue, for example:
terraform apply
Important Factoids
Are there anything atypical about your accounts that we should know? For example: Running in EC2 Classic? Custom version of OpenStack? Tight ACLs?
References
Are there any other GitHub issues (open or closed) or Pull Requests that should be linked here? For example:
The text was updated successfully, but these errors were encountered: