Last active
          August 29, 2015 14:27 
        
      - 
      
- 
        Save slb350/db97c193dd4b98d15fa2 to your computer and use it in GitHub Desktop. 
Revisions
- 
        slb350 revised this gist Aug 17, 2015 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewingThis 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 charactersOriginal file line number Diff line number Diff line change @@ -1,7 +1,7 @@ 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") 
- 
        slb350 revised this gist Aug 17, 2015 . 1 changed file with 8 additions and 8 deletions.There are no files selected for viewingThis 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 charactersOriginal file line number Diff line number Diff line change @@ -1,16 +1,16 @@ require 'pagerduty' check1=`redis-cli -h REDIS_HOST llen REDIS_QUEUE`.to_i check2=`redis-cli -h REDIS_HOST llen REDIS_QUEUE`.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 
- 
        slb350 revised this gist Aug 17, 2015 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewingThis 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 charactersOriginal file line number Diff line number Diff line change @@ -10,7 +10,7 @@ else incident = pagerduty.trigger("Queue size is #{sparkcheck}") end queue2 = case sparkcheck2 when 0..20 then "Pass" else incident = pagerduty.trigger("Queue size is #{sparkcheck2}") end 
- 
        slb350 revised this gist Aug 17, 2015 . 1 changed file with 6 additions and 0 deletions.There are no files selected for viewingThis 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 charactersOriginal file line number Diff line number Diff line change @@ -1,10 +1,16 @@ require 'pagerduty' sparkcheck=`redis-cli -h REDIS_HOST llen REDIS_QUEUE`.to_i sparkcheck2=`redis-cli -h REDIS_HOST llen REDIS_QUEUE2`.to_i pagerduty = Pagerduty.new("API_KEY") queue = case sparkcheck when 0..20 then "Pass" else incident = pagerduty.trigger("Queue size is #{sparkcheck}") end queue = case sparkcheck2 when 0..20 then "Pass" else incident = pagerduty.trigger("Queue size is #{sparkcheck2}") end 
- 
        slb350 revised this gist Aug 17, 2015 . 1 changed file with 4 additions and 4 deletions.There are no files selected for viewingThis 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 charactersOriginal file line number Diff line number Diff line change @@ -1,10 +1,10 @@ require 'pagerduty' sparkcheck=`redis-cli -h REDIS_HOST llen REDIS_QUEUE`.to_i pagerduty = Pagerduty.new("API_KEY") queue = case sparkcheck when 0..20 then "Pass" else incident = pagerduty.trigger("Queue size is #{sparkcheck}") end 
- 
        slb350 revised this gist Aug 17, 2015 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewingThis 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 charactersOriginal file line number Diff line number Diff line change @@ -6,5 +6,5 @@ queue = case fbproc when 0..10 then "Pass" else incident = pagerduty.trigger("Queue size is #{fbproc}") end 
- 
        slb350 revised this gist Aug 17, 2015 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewingThis 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 charactersOriginal file line number Diff line number Diff line change @@ -6,5 +6,5 @@ queue = case fbproc when 0..10 then "Pass" else incident = pagerduty.trigger("Queue size is #{i}") end 
- 
        slb350 revised this gist Aug 17, 2015 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewingThis 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 charactersOriginal file line number Diff line number Diff line change @@ -1,6 +1,6 @@ require 'pagerduty' fbproc=`redis-cli -h REDIS_HOST llen REDIS_QUEUE`.to_i pagerduty = Pagerduty.new("API_KEY") 
- 
        slb350 revised this gist Aug 17, 2015 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewingThis 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 charactersOriginal file line number Diff line number Diff line change @@ -1,6 +1,6 @@ require 'pagerduty' fbproc=`redis-cli -h llen REDIS_HOST REDIS_QUEUE`.to_i pagerduty = Pagerduty.new("API_KEY") 
- 
        slb350 revised this gist Aug 17, 2015 . 1 changed file with 1 addition and 2 deletions.There are no files selected for viewingThis 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 charactersOriginal file line number Diff line number Diff line change @@ -6,6 +6,5 @@ queue = case fbproc when 0..10 then "Pass" else incident = pagerduty.trigger("shits on fire yo") end 
- 
        slb350 revised this gist Aug 17, 2015 . 1 changed file with 4 additions and 9 deletions.There are no files selected for viewingThis 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 charactersOriginal file line number Diff line number Diff line change @@ -1,16 +1,11 @@ require 'pagerduty' fbproc=`redis-cli -h REDIS_HOST REDIS_QUEUE`.to_i pagerduty = Pagerduty.new("API_KEY") queue = case fbproc when 0..10 then "Pass" when 11..10000000000000000000000000 then incident = pagerduty.trigger("shits on fire yo") else "Burn it Down" end 
- 
        slb350 created this gist Aug 17, 2015 .There are no files selected for viewingThis 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,16 @@ require 'pagerduty' fbproc=`redis-cli -h {{ redis_host }} {{ monitored_queue }} `.to_i puts fbproc queue = case fbproc when 0..10 then Pagerduty.new("{{ pager_duty_key }}") when 11..100 then "Pass" else "Burn it Down" end puts queue ~