mozilla-services / pagerstatus

A service to automatically update Statuspage.io based on Pagerduty incidents
Apache License 2.0
7 stars 5 forks source link

Support multiple templates #3

Open sciurus opened 6 years ago

sciurus commented 6 years ago

Currently the default template is hardcoded.

We should support additional templates that users could optionally choose via a tag on their alert, perhaps just named template?

The pagerduty code will need to be modified to extract this tag and return a map of components to templates, which sync would use to lookup a value to pass into open_incident.

This raises the question of what to do if there are multiple pagerduty alerts for the same statuspage component that have different templates chosen. My inclination is to log an error and use the first template.

https://github.com/mozilla-services/pagerstatus/blob/master/chalicelib/statuspage.py#L85