lib/flapjack/gateways/pagerduty.rb in flapjack-0.8.11 vs lib/flapjack/gateways/pagerduty.rb in flapjack-0.8.12

- old
+ new

@@ -233,9 +233,16 @@ subdomain = opts['subdomain'] username = opts['username'] password = opts['password'] check = opts['check'] + unless subdomain && username && password && check + @logger.warn("pagerduty_acknowledged?: Unable to look for acknowledgements on pagerduty" + + " as all of the following options are required:" + + " subdomain (#{subdomain}), username (#{username}), password (#{password}), check (#{check})") + return nil + end + t = Time.now.utc url = 'https://' + subdomain + '.pagerduty.com/api/v1/incidents' query = { 'fields' => 'incident_number,status,last_status_change_by', 'since' => (t - (60*60*24*7)).iso8601, # the last week