Allow any msg color for Slack
Description
Allows any color for Slack messages. Currently only 3 values are supported in the library, but I would like it to be any hex color value as per their docs: https://api.slack.com/reference/messaging/attachments#fieldsts
Changes the color of the border on the left side of this attachment from the default gray. Can either be one of good (green), warning (yellow), danger (red), or any hex color code (eg. #439FE0)
Checklist
- [x] I have reviewed the contributing guidelines.
- [ ] I have included unit tests for my changes or additions.
- [x] I have successfully run
make test-dockerwith my changes. - [ ] I have manually tested all relevant modes of the change in this PR.
- [ ] I have updated the documentation.
- [ ] I have updated the changelog.
Questions or Comments
If you think this change makes sense, I'll continue with the checklist
I think it sounds like a good improvement. It would be good to document what the behavior is if an invalid color name or hex code is given, so that users can be aware of what to look for in case they make a mistake. Such as forgetting to prepend the hex char, etc.
I think the documentation should be updated as well. https://github.com/jertel/elastalert2/blob/master/docs/source/alerts.rst
I think similar settings for mattermost and rocketcat need modification as well.
Updated the docs according to Slack documentation for the color.
@thecatontheflat Once you complete the remaining checklist items I will merge this. It looks like you already completed the doc updates so that can probably be checked off, and I'm not sure whether a unit test is feasible for a schema change, but the other two checklist items need completed.
This PR is stale because it has been open for 30 days with no activity. The longer a PR remains stale the more out of date with the main branch it becomes.
@thecatontheflat
Have you verified that the settings are working?
@thecatontheflat
Please update CHANGELOG.md.
@thecatontheflat
Is it possible to create test code?
This PR is stale because it has been open for 30 days with no activity. The longer a PR remains stale the more out of date with the main branch it becomes.
This PR was closed because it has been inactive for 30 days since being marked as stale. It will be automatically locked after an additional 30 days. If there is still a commitment to finishing this PR please re-open it, or request that a project maintainer re-open it before it becomes locked.