Created
March 1, 2013 04:05
-
-
Save philk/5062402 to your computer and use it in GitHub Desktop.
I don't know if Ruby will let me do this and I'm pretty sure it shouldn't but I'm really enjoying this crazy idea.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| cloud_monitoring_alarm "memory_usage alarm" do | |
| check_label "memory" | |
| criteria do | |
| warn_if( | |
| percentage("used", "total"), | |
| ">", | |
| 100, | |
| "Used percentage too high" | |
| ) | |
| warn_if metric("thing"), "<", 1 | |
| ok "This thing is fine" | |
| end | |
| notification_plan_id npid | |
| action :create | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| memory_usage_check = cloud_monitoring_criteria do | |
| warn_if( | |
| percentage("used", "total"), | |
| ">", | |
| 100, | |
| "Used percentage too high" | |
| ) | |
| warn_if metric("thing"), "<", 1 | |
| ok "This thing is fine" | |
| end | |
| cloud_monitoring_alarm "memory_usage alarm" do | |
| check_label "memory" | |
| criteria memory_usage_check | |
| notification_plan_id npid | |
| action :create | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment