cmd/bosun: support actions by incident id #1696

merged 1 commit into from Apr 5, 2016


None yet

2 participants


No description provided.

@captncraig captncraig and 1 other commented on an outdated diff Apr 5, 2016
@@ -574,34 +574,49 @@ func init() {
"The running count of actions performed by individual users (Closed alert, Acknowledged alert, etc).")
-func (s *Schedule) Action(user, message string, t models.ActionType, ak models.AlertKey) error {
- if err := collect.Add("actions", opentsdb.TagSet{"user": user, "alert": ak.Name(), "type": t.String()}, 1); err != nil {
- slog.Errorln(err)
- }
+func (s *Schedule) ActionByAlertKey(user, message string, t models.ActionType, ak models.AlertKey) (*models.IncidentState, error) {
captncraig Apr 5, 2016 Contributor

I don't see anyone using this return value. Is it just to maintain parity with ActionByIncidentID. Does that need to return the whole incident, or just the alert key?

kylebrandt Apr 5, 2016 Member

Good point, I just want the alert key. Will change

@kylebrandt kylebrandt cmd/bosun: support actions via incident id
@kylebrandt kylebrandt merged commit 50185c9 into master Apr 5, 2016

2 checks passed

bosun All checks Passed!
continuous-integration/travis-ci/pr The Travis CI build passed
@kylebrandt kylebrandt deleted the actionById branch Apr 8, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment