Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature] Add ability to restrict activity to certain services #31

Closed
stephenyeargin opened this issue Feb 20, 2015 · 2 comments · Fixed by #32
Closed

[Feature] Add ability to restrict activity to certain services #31

stephenyeargin opened this issue Feb 20, 2015 · 2 comments · Fixed by #32

Comments

@stephenyeargin
Copy link
Member

We have 17 PagerDuty services set up, and some of them can trigger hundreds of errors a day (most auto-resolve quickly). Editor's note: I could get into the folly of using PagerDuty as a log stashing replacement, but I digress. The API can only match on incidents that appear on the first page of a list of incidents, and it can only retrieve a maximum of 100 incidents at a time. We have two or three of those services that actually trigger critical errors, and those are the ones we want to monitor and interact with.

I propose adding a new optional constant, HUBOT_PAGERDUTY_SERVICES, that is a comma-delimited string of service IDs to include. If not set, the default behavior of searching all services persists. If it is set, the service ID string is passed on as part of the relevant request parameters for the API endpoint.

@jnewland
Copy link

Sounds great to me!

@technicalpickles
Copy link
Contributor

This seems reasonable.

Another idea I might suggest is #9 , which would exclude things not assigned to you. If those other services you mentioned aren't triggering alerts assigned to you, then you wouldn't see them.

stephenyeargin added a commit to raventools/hubot-pager-me that referenced this issue Mar 2, 2015
Fixes hubot-archive#31

Our PagerDuty instance has numerous services that receive alerts, but we only want our Hubot to query against a subset of those. This adds a `HUBOT_PAGERDUTY_SERVICES` environment variable that accepts a comma separated list of service identifiers. This list is then added as a `service` key on all of the `pagerDutyGet` method calls to apply that filter.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging a pull request may close this issue.

3 participants