* add reason code to slack notifier
this uses the new error with reason to determine based on status code what the reason is for the slack integration
partial #3231
Signed-off-by: gotjosh <josue.abreu@gmail.com>
* Add some tests
Signed-off-by: gotjosh <josue.abreu@gmail.com>
* Handle the error
Signed-off-by: gotjosh <josue.abreu@gmail.com>
---------
Signed-off-by: gotjosh <josue.abreu@gmail.com>
* Update Go to 1.19
* Update Go.
* Update some Go modules.
* Update Swagger to the latest for Go 1.19 compatibility.
* api/v2: regenerate
* Accommodate to the changes in the client package
* asset/assets_vfsdata.go: regenerate
Signed-off-by: SuperQ <superq@gmail.com>
Signed-off-by: Simon Pasquier <spasquie@redhat.com>
Co-authored-by: Simon Pasquier <spasquie@redhat.com>
* Trim contents of slack api urls from files
Signed-off-by: Sarah Brofeldt <sarah@qtr.dk>
* notify/slack: fix test imports
Signed-off-by: Simon Pasquier <spasquie@redhat.com>
Signed-off-by: Sarah Brofeldt <sarah@qtr.dk>
Signed-off-by: Simon Pasquier <spasquie@redhat.com>
Co-authored-by: Simon Pasquier <spasquie@redhat.com>
- Added support for the file in both the global and the lower level
- Tried to follow configuration patterns I saw in prometheus
- The slack file is read on every request as mentioned in the prometheus issue to enable seamless switches
https://github.com/prometheus/alertmanager/issues/2498
Signed-off-by: Julien Duchesne <julien.duchesne@grafana.com>
Instead of keeping all notifiers in the notify package, it splits them
into individual sub-packages. This improves readability and
maintainability of the code.
Signed-off-by: Simon Pasquier <spasquie@redhat.com>