diff --git a/CHANGELOG.md b/CHANGELOG.md index d57d30e64..b79169768 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +### Added + +- Add team `honeybadger` slack router and receiver. + ### Removed - Remove the `azure` provider. diff --git a/files/templates/alertmanager/alertmanager.yaml b/files/templates/alertmanager/alertmanager.yaml index c818579b6..bd1669fcd 100644 --- a/files/templates/alertmanager/alertmanager.yaml +++ b/files/templates/alertmanager/alertmanager.yaml @@ -150,6 +150,13 @@ route: - team="turtles" continue: false + # Team Honeybadger Slack + - receiver: team_honeybadger_slack + matchers: + - severity=~"page|notify" + - team="honeybadger" + continue: false + receivers: - name: root @@ -361,6 +368,29 @@ receivers: url: '{{ template "__alert_silence_link" .}}' style: '{{ if eq .Status "firing" }}danger{{ else }}default{{ end }}' +- name: team_honeybadger_slack + slack_configs: + - channel: '#alert-honeybadger' + send_resolved: true + actions: + - type: button + text: ':green_book: OpsRecipe' + url: '{{ template "__runbookurl" . }}' + style: '{{ if eq .Status "firing" }}primary{{ else }}default{{ end }}' + - type: button + text: ':coffin: Linked PMs' + url: '{{ template "__alert_linked_postmortems" . }}' + - type: button + text: ':mag: Query' + url: '{{ template "__prometheusurl" . }}' + - type: button + text: ':grafana: Dashboard' + url: '{{ template "__dashboardurl" . }}' + - type: button + text: ':no_bell: Silence' + url: '{{ template "__alert_silence_link" .}}' + style: '{{ if eq .Status "firing" }}danger{{ else }}default{{ end }}' + - name: opsgenie_router opsgenie_configs: - api_key: [[ .OpsgenieKey ]] diff --git a/service/controller/resource/alerting/alertmanagerconfig/test/alertmanager-config/capi/case-1-capa-mc.golden b/service/controller/resource/alerting/alertmanagerconfig/test/alertmanager-config/capi/case-1-capa-mc.golden index 8ca7e00bb..19cee9c09 100644 --- a/service/controller/resource/alerting/alertmanagerconfig/test/alertmanager-config/capi/case-1-capa-mc.golden +++ b/service/controller/resource/alerting/alertmanagerconfig/test/alertmanager-config/capi/case-1-capa-mc.golden @@ -108,6 +108,13 @@ route: - team="turtles" continue: false + # Team Honeybadger Slack + - receiver: team_honeybadger_slack + matchers: + - severity=~"page|notify" + - team="honeybadger" + continue: false + receivers: - name: root @@ -295,6 +302,29 @@ receivers: url: '{{ template "__alert_silence_link" .}}' style: '{{ if eq .Status "firing" }}danger{{ else }}default{{ end }}' +- name: team_honeybadger_slack + slack_configs: + - channel: '#alert-honeybadger' + send_resolved: true + actions: + - type: button + text: ':green_book: OpsRecipe' + url: '{{ template "__runbookurl" . }}' + style: '{{ if eq .Status "firing" }}primary{{ else }}default{{ end }}' + - type: button + text: ':coffin: Linked PMs' + url: '{{ template "__alert_linked_postmortems" . }}' + - type: button + text: ':mag: Query' + url: '{{ template "__prometheusurl" . }}' + - type: button + text: ':grafana: Dashboard' + url: '{{ template "__dashboardurl" . }}' + - type: button + text: ':no_bell: Silence' + url: '{{ template "__alert_silence_link" .}}' + style: '{{ if eq .Status "firing" }}danger{{ else }}default{{ end }}' + - name: opsgenie_router opsgenie_configs: - api_key: opsgenie-key diff --git a/service/controller/resource/alerting/alertmanagerconfig/test/alertmanager-config/capi/case-2-capa.golden b/service/controller/resource/alerting/alertmanagerconfig/test/alertmanager-config/capi/case-2-capa.golden index 8ca7e00bb..19cee9c09 100644 --- a/service/controller/resource/alerting/alertmanagerconfig/test/alertmanager-config/capi/case-2-capa.golden +++ b/service/controller/resource/alerting/alertmanagerconfig/test/alertmanager-config/capi/case-2-capa.golden @@ -108,6 +108,13 @@ route: - team="turtles" continue: false + # Team Honeybadger Slack + - receiver: team_honeybadger_slack + matchers: + - severity=~"page|notify" + - team="honeybadger" + continue: false + receivers: - name: root @@ -295,6 +302,29 @@ receivers: url: '{{ template "__alert_silence_link" .}}' style: '{{ if eq .Status "firing" }}danger{{ else }}default{{ end }}' +- name: team_honeybadger_slack + slack_configs: + - channel: '#alert-honeybadger' + send_resolved: true + actions: + - type: button + text: ':green_book: OpsRecipe' + url: '{{ template "__runbookurl" . }}' + style: '{{ if eq .Status "firing" }}primary{{ else }}default{{ end }}' + - type: button + text: ':coffin: Linked PMs' + url: '{{ template "__alert_linked_postmortems" . }}' + - type: button + text: ':mag: Query' + url: '{{ template "__prometheusurl" . }}' + - type: button + text: ':grafana: Dashboard' + url: '{{ template "__dashboardurl" . }}' + - type: button + text: ':no_bell: Silence' + url: '{{ template "__alert_silence_link" .}}' + style: '{{ if eq .Status "firing" }}danger{{ else }}default{{ end }}' + - name: opsgenie_router opsgenie_configs: - api_key: opsgenie-key diff --git a/service/controller/resource/alerting/alertmanagerconfig/test/alertmanager-config/capi/case-3-capz.golden b/service/controller/resource/alerting/alertmanagerconfig/test/alertmanager-config/capi/case-3-capz.golden index 8ca7e00bb..19cee9c09 100644 --- a/service/controller/resource/alerting/alertmanagerconfig/test/alertmanager-config/capi/case-3-capz.golden +++ b/service/controller/resource/alerting/alertmanagerconfig/test/alertmanager-config/capi/case-3-capz.golden @@ -108,6 +108,13 @@ route: - team="turtles" continue: false + # Team Honeybadger Slack + - receiver: team_honeybadger_slack + matchers: + - severity=~"page|notify" + - team="honeybadger" + continue: false + receivers: - name: root @@ -295,6 +302,29 @@ receivers: url: '{{ template "__alert_silence_link" .}}' style: '{{ if eq .Status "firing" }}danger{{ else }}default{{ end }}' +- name: team_honeybadger_slack + slack_configs: + - channel: '#alert-honeybadger' + send_resolved: true + actions: + - type: button + text: ':green_book: OpsRecipe' + url: '{{ template "__runbookurl" . }}' + style: '{{ if eq .Status "firing" }}primary{{ else }}default{{ end }}' + - type: button + text: ':coffin: Linked PMs' + url: '{{ template "__alert_linked_postmortems" . }}' + - type: button + text: ':mag: Query' + url: '{{ template "__prometheusurl" . }}' + - type: button + text: ':grafana: Dashboard' + url: '{{ template "__dashboardurl" . }}' + - type: button + text: ':no_bell: Silence' + url: '{{ template "__alert_silence_link" .}}' + style: '{{ if eq .Status "firing" }}danger{{ else }}default{{ end }}' + - name: opsgenie_router opsgenie_configs: - api_key: opsgenie-key diff --git a/service/controller/resource/alerting/alertmanagerconfig/test/alertmanager-config/capi/case-4-eks.golden b/service/controller/resource/alerting/alertmanagerconfig/test/alertmanager-config/capi/case-4-eks.golden index 8ca7e00bb..19cee9c09 100644 --- a/service/controller/resource/alerting/alertmanagerconfig/test/alertmanager-config/capi/case-4-eks.golden +++ b/service/controller/resource/alerting/alertmanagerconfig/test/alertmanager-config/capi/case-4-eks.golden @@ -108,6 +108,13 @@ route: - team="turtles" continue: false + # Team Honeybadger Slack + - receiver: team_honeybadger_slack + matchers: + - severity=~"page|notify" + - team="honeybadger" + continue: false + receivers: - name: root @@ -295,6 +302,29 @@ receivers: url: '{{ template "__alert_silence_link" .}}' style: '{{ if eq .Status "firing" }}danger{{ else }}default{{ end }}' +- name: team_honeybadger_slack + slack_configs: + - channel: '#alert-honeybadger' + send_resolved: true + actions: + - type: button + text: ':green_book: OpsRecipe' + url: '{{ template "__runbookurl" . }}' + style: '{{ if eq .Status "firing" }}primary{{ else }}default{{ end }}' + - type: button + text: ':coffin: Linked PMs' + url: '{{ template "__alert_linked_postmortems" . }}' + - type: button + text: ':mag: Query' + url: '{{ template "__prometheusurl" . }}' + - type: button + text: ':grafana: Dashboard' + url: '{{ template "__dashboardurl" . }}' + - type: button + text: ':no_bell: Silence' + url: '{{ template "__alert_silence_link" .}}' + style: '{{ if eq .Status "firing" }}danger{{ else }}default{{ end }}' + - name: opsgenie_router opsgenie_configs: - api_key: opsgenie-key diff --git a/service/controller/resource/alerting/alertmanagerconfig/test/alertmanager-config/capi/case-5-gcp.golden b/service/controller/resource/alerting/alertmanagerconfig/test/alertmanager-config/capi/case-5-gcp.golden index 8ca7e00bb..19cee9c09 100644 --- a/service/controller/resource/alerting/alertmanagerconfig/test/alertmanager-config/capi/case-5-gcp.golden +++ b/service/controller/resource/alerting/alertmanagerconfig/test/alertmanager-config/capi/case-5-gcp.golden @@ -108,6 +108,13 @@ route: - team="turtles" continue: false + # Team Honeybadger Slack + - receiver: team_honeybadger_slack + matchers: + - severity=~"page|notify" + - team="honeybadger" + continue: false + receivers: - name: root @@ -295,6 +302,29 @@ receivers: url: '{{ template "__alert_silence_link" .}}' style: '{{ if eq .Status "firing" }}danger{{ else }}default{{ end }}' +- name: team_honeybadger_slack + slack_configs: + - channel: '#alert-honeybadger' + send_resolved: true + actions: + - type: button + text: ':green_book: OpsRecipe' + url: '{{ template "__runbookurl" . }}' + style: '{{ if eq .Status "firing" }}primary{{ else }}default{{ end }}' + - type: button + text: ':coffin: Linked PMs' + url: '{{ template "__alert_linked_postmortems" . }}' + - type: button + text: ':mag: Query' + url: '{{ template "__prometheusurl" . }}' + - type: button + text: ':grafana: Dashboard' + url: '{{ template "__dashboardurl" . }}' + - type: button + text: ':no_bell: Silence' + url: '{{ template "__alert_silence_link" .}}' + style: '{{ if eq .Status "firing" }}danger{{ else }}default{{ end }}' + - name: opsgenie_router opsgenie_configs: - api_key: opsgenie-key diff --git a/service/controller/resource/alerting/alertmanagerconfig/test/alertmanager-config/vintage/case-1-vintage-mc.golden b/service/controller/resource/alerting/alertmanagerconfig/test/alertmanager-config/vintage/case-1-vintage-mc.golden index 8ca7e00bb..19cee9c09 100644 --- a/service/controller/resource/alerting/alertmanagerconfig/test/alertmanager-config/vintage/case-1-vintage-mc.golden +++ b/service/controller/resource/alerting/alertmanagerconfig/test/alertmanager-config/vintage/case-1-vintage-mc.golden @@ -108,6 +108,13 @@ route: - team="turtles" continue: false + # Team Honeybadger Slack + - receiver: team_honeybadger_slack + matchers: + - severity=~"page|notify" + - team="honeybadger" + continue: false + receivers: - name: root @@ -295,6 +302,29 @@ receivers: url: '{{ template "__alert_silence_link" .}}' style: '{{ if eq .Status "firing" }}danger{{ else }}default{{ end }}' +- name: team_honeybadger_slack + slack_configs: + - channel: '#alert-honeybadger' + send_resolved: true + actions: + - type: button + text: ':green_book: OpsRecipe' + url: '{{ template "__runbookurl" . }}' + style: '{{ if eq .Status "firing" }}primary{{ else }}default{{ end }}' + - type: button + text: ':coffin: Linked PMs' + url: '{{ template "__alert_linked_postmortems" . }}' + - type: button + text: ':mag: Query' + url: '{{ template "__prometheusurl" . }}' + - type: button + text: ':grafana: Dashboard' + url: '{{ template "__dashboardurl" . }}' + - type: button + text: ':no_bell: Silence' + url: '{{ template "__alert_silence_link" .}}' + style: '{{ if eq .Status "firing" }}danger{{ else }}default{{ end }}' + - name: opsgenie_router opsgenie_configs: - api_key: opsgenie-key diff --git a/service/controller/resource/alerting/alertmanagerconfig/test/alertmanager-config/vintage/case-2-aws-v16.golden b/service/controller/resource/alerting/alertmanagerconfig/test/alertmanager-config/vintage/case-2-aws-v16.golden index 8ca7e00bb..19cee9c09 100644 --- a/service/controller/resource/alerting/alertmanagerconfig/test/alertmanager-config/vintage/case-2-aws-v16.golden +++ b/service/controller/resource/alerting/alertmanagerconfig/test/alertmanager-config/vintage/case-2-aws-v16.golden @@ -108,6 +108,13 @@ route: - team="turtles" continue: false + # Team Honeybadger Slack + - receiver: team_honeybadger_slack + matchers: + - severity=~"page|notify" + - team="honeybadger" + continue: false + receivers: - name: root @@ -295,6 +302,29 @@ receivers: url: '{{ template "__alert_silence_link" .}}' style: '{{ if eq .Status "firing" }}danger{{ else }}default{{ end }}' +- name: team_honeybadger_slack + slack_configs: + - channel: '#alert-honeybadger' + send_resolved: true + actions: + - type: button + text: ':green_book: OpsRecipe' + url: '{{ template "__runbookurl" . }}' + style: '{{ if eq .Status "firing" }}primary{{ else }}default{{ end }}' + - type: button + text: ':coffin: Linked PMs' + url: '{{ template "__alert_linked_postmortems" . }}' + - type: button + text: ':mag: Query' + url: '{{ template "__prometheusurl" . }}' + - type: button + text: ':grafana: Dashboard' + url: '{{ template "__dashboardurl" . }}' + - type: button + text: ':no_bell: Silence' + url: '{{ template "__alert_silence_link" .}}' + style: '{{ if eq .Status "firing" }}danger{{ else }}default{{ end }}' + - name: opsgenie_router opsgenie_configs: - api_key: opsgenie-key diff --git a/service/controller/resource/alerting/alertmanagerconfig/test/alertmanager-config/vintage/case-3-aws-v18.golden b/service/controller/resource/alerting/alertmanagerconfig/test/alertmanager-config/vintage/case-3-aws-v18.golden index 8ca7e00bb..19cee9c09 100644 --- a/service/controller/resource/alerting/alertmanagerconfig/test/alertmanager-config/vintage/case-3-aws-v18.golden +++ b/service/controller/resource/alerting/alertmanagerconfig/test/alertmanager-config/vintage/case-3-aws-v18.golden @@ -108,6 +108,13 @@ route: - team="turtles" continue: false + # Team Honeybadger Slack + - receiver: team_honeybadger_slack + matchers: + - severity=~"page|notify" + - team="honeybadger" + continue: false + receivers: - name: root @@ -295,6 +302,29 @@ receivers: url: '{{ template "__alert_silence_link" .}}' style: '{{ if eq .Status "firing" }}danger{{ else }}default{{ end }}' +- name: team_honeybadger_slack + slack_configs: + - channel: '#alert-honeybadger' + send_resolved: true + actions: + - type: button + text: ':green_book: OpsRecipe' + url: '{{ template "__runbookurl" . }}' + style: '{{ if eq .Status "firing" }}primary{{ else }}default{{ end }}' + - type: button + text: ':coffin: Linked PMs' + url: '{{ template "__alert_linked_postmortems" . }}' + - type: button + text: ':mag: Query' + url: '{{ template "__prometheusurl" . }}' + - type: button + text: ':grafana: Dashboard' + url: '{{ template "__dashboardurl" . }}' + - type: button + text: ':no_bell: Silence' + url: '{{ template "__alert_silence_link" .}}' + style: '{{ if eq .Status "firing" }}danger{{ else }}default{{ end }}' + - name: opsgenie_router opsgenie_configs: - api_key: opsgenie-key