Skip to content
This repository has been archived by the owner on May 15, 2024. It is now read-only.

Pagerduty gateway - when polling for acks, get all acks at once #452

Closed
jessereynolds opened this issue Mar 16, 2014 · 7 comments
Closed
Labels

Comments

@jessereynolds
Copy link
Member

Pagerduty's incidents api allows for retrieving all unresolved incidents in one go:

http://developer.pagerduty.com/documentation/rest/incidents/list

Eg:

https://acme.pagerduty.com/api/v1/incidents?fields=incident_number,status

In addition to adding a webhooks receiver for state changes from pagerduty (see #391), we should improve the polling interface to make just one request per contact/subdomain. We will likely need to support both polling and webhooks as some sites will prefer one over the other, or will want to employ both (for best of both worlds).

@auxesis
Copy link
Member

auxesis commented Mar 17, 2014

👍

@chrisgagne
Copy link

This sounds like a wonderful improvement. On behalf of PagerDuty, I've just posted a $100 bounty on BountySource for the resolution of this issue: https://www.bountysource.com/issues/5333797-pagerduty-gateway-when-polling-for-acks-get-all-acks-at-once

@jessereynolds
Copy link
Member Author

Thanks for your support @chrisgagne :-)

@chrisgagne
Copy link

Sure thing, @jessereynolds. Just doubled the bounty to $200. :)

@vegetableman
Copy link
Contributor

Would like to give this a shot. Have a few questions.

options = ec_credentials.first.merge('check' => "#{entity_name}:#{check}")

The current code only handles the first contact of a failing entity, Shouldn't this need to be fixed as well?.

Also, when an entity receives an acknowledgement on pagerduty, it creates few entries on redis:

foo-app-01:HTTP:acknowledgement_notifications
foo-app-01:HTTP:actions

but the entity still remains unacknowledged on flapjack.
As Flapjack::Data::EntityCheck.unacknowledged_failing(:redis => @redis) returns all failing checks based on failed_checks , is this the desired behaviour?. So, pagerduty acks and flapjack acks are distinct?

kbailey4444 added a commit to kbailey4444/flapjack that referenced this issue Mar 8, 2015
…? which returns

whether a single check is acknowledged by pagerduty, now there is
pagerduty_acknowledgements which returns all the acknowledgements. Next step
is seeing if each flapjack check is in pagerduty acks, and if so making a
flapjack ack.
@ghost ghost closed this as completed in 4fce432 Mar 15, 2015
@ghost
Copy link

ghost commented Mar 16, 2015

I'm not sure what the bounty rules are regarding the release of the code -- this has been fixed in master, but v2 (which is what master is aiming towards) is still a little while away from a release.

@chrisgagne
Copy link

@ali-graham A flapjack maintainer has accepted the fix into master. That's good enough for me. :) I'll approve the claim from @kbailey4444. Thanks to you both!

This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

4 participants