cloudflare / complainer

Complainer's job is to send notifications to different services when tasks fail on Mesos cluster.
MIT License
82 stars 13 forks source link

Template-Support for Reporter #19

Closed andygrunwald closed 8 years ago

andygrunwald commented 8 years ago

Complainer is growing with the number of reporters: Sentry, Hipchat, Slack, File, etc.

Messages for reporting systems that have a flexible part (like Slack or Hipchat) have a hardcoded message. See https://github.com/cloudflare/complainer/blob/master/reporter/slack.go#L73-L74 for Slack and https://github.com/cloudflare/complainer/blob/master/reporter/hipchat.go#L113-L114 for Hipchat.

It would be a nice feature to implement a functionality to hand in a golang template to modify this message. E.g. in slack you have the possibility to mention someone via @username. The use case would be to apply a label per task definition (e.g. label_author) and use this label in the golang template slack message. With this responsible persons / teams can be mentioned if a task is failing.

Another use case would be a JIRA reporter. Right now i am thinking about to add a JIRA Reporter to complainer (PS: Would you accept such a reporter?). A JIRA ticket could be benefit from this functionality as well.

At first i just want to get your feedback and thoughts about this (and an answer about the JIRA reporter / acceptance as well).

bobrik commented 8 years ago

Take a look at #21.

You can have JIRA with Sentry as well. Can't see why not have it in complainer itself, though.

andygrunwald commented 8 years ago

Thank you. This was just an idea and with a growing number of reporters, this might be applyable for hipchat or other reporters as well

You can have JIRA with Sentry as well. Can't see why not have it in complainer itself, though. True, but for now we don`t have a running Sentry instance. This is planned, but not there yet.

I will start working on a JIRA Reporter and apply this as a PR.