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

Slack: customize notification color #251

Open
tibo43 opened this issue Oct 4, 2024 · 0 comments
Open

Slack: customize notification color #251

tibo43 opened this issue Oct 4, 2024 · 0 comments

Comments

@tibo43
Copy link

tibo43 commented Oct 4, 2024

Hello,

Is it a plan to customize the slack notification color ?
As the title or the text, we can use a template to customize the color.

Something like that:

      {{ define "slack.color" -}}
        {{- if ne .Status "firing" -}}
          #15b800
        {{- else if eq .CommonLabels.severity "critical" -}}
          #eb3434
        {{- else if eq .CommonLabels.severity "warning" -}}
          #ffb700
        {{- end -}}
      {{- end }}

If a template is not created, the system fallback on the default color.

What do you think ?

Cheers

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: No status
Development

No branches or pull requests

1 participant