Last active
August 29, 2015 14:27
-
-
Save slb350/db97c193dd4b98d15fa2 to your computer and use it in GitHub Desktop.
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
| require 'pagerduty' | |
| check1=`redis-cli -h REDIS_HOST llen REDIS_QUEUE1`.to_i | |
| check2=`redis-cli -h REDIS_HOST llen REDIS_QUEUE2`.to_i | |
| pagerduty = Pagerduty.new("PD_API_KEY") | |
| queue = case check1 | |
| when 0..20 then "Pass" | |
| else incident = pagerduty.trigger("Queue size is #{check1}") | |
| end | |
| processing = case check2 | |
| when 0..20 then "Pass" | |
| else incident = pagerduty.trigger("Queue size is #{check2}") | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment