Commit Graph

7 Commits

Author SHA1 Message Date
TJ Hoplock f6b942cf9b
chore!: adopt log/slog, drop go-kit/log (#4089)
* chore!: adopt log/slog, drop go-kit/log

The bulk of this change set was automated by the following script which
is being used to aid in converting the various exporters/projects to use
slog:

https://gist.github.com/tjhop/49f96fb7ebbe55b12deee0b0312d8434

This commit includes several changes:
- bump exporter-tookit to v0.13.1 for log/slog support
- updates golangci-lint deprecated configs
- enables sloglint linter
- removes old go-kit/log linter configs
- introduce some `if logger == nil { $newLogger }` additions to prevent
  nil references
- converts cluster membership config to use a stdlib compatible slog
  adapter, rather than creating a custom io.Writer for use as the
membership `logOutput` config

Signed-off-by: TJ Hoplock <t.hoplock@gmail.com>

* chore: address PR feedback

Signed-off-by: TJ Hoplock <t.hoplock@gmail.com>

---------

Signed-off-by: TJ Hoplock <t.hoplock@gmail.com>
2024-11-06 09:09:57 +00:00
Jeff Wong 95655dccb8
Discord notifier: Add username and avatar_url (#4081)
* Feat(discord):

Allow for custom username and avatar URLs to be set in discord notifications.

Add `username` and `avatar_url` to discord configuration, default empty string.

Re-implement #3821

Signed-off-by: Jeff Wong <awole20@gmail.com>

* Test the new fields

Signed-off-by: gotjosh <josue.abreu@gmail.com>

* These are not templeatable strings

Signed-off-by: gotjosh <josue.abreu@gmail.com>

---------

Signed-off-by: Jeff Wong <awole20@gmail.com>
Signed-off-by: gotjosh <josue.abreu@gmail.com>
Co-authored-by: gotjosh <josue.abreu@gmail.com>
2024-10-24 21:12:05 +01:00
gotjosh 615d5ffa30
Add a test for `Notify` of the Discord integration (#4082)
Just to ensure this works correclty as expected, I originally thought there was a bug with the shadowing of the `content` varible but there isn't - to avoid further confusion I have followed up on this document left by George: https://github.com/prometheus/alertmanager/pull/3555#discussion_r1398448423

Signed-off-by: gotjosh <josue.abreu@gmail.com>
2024-10-24 20:55:35 +01:00
Hottochelli 6b77acd166
Extend discord messages with content (#4007)
* Extend discord messages with content
Signed-off-by: Yevhen Sydorenko <mogoll92@gmail.com>

Signed-off-by: Yevhen Sydorenko <mogoll92@gmail.com>

* Updated configuration.md
Updated assets_vfsdata.go

Signed-off-by: Yevhen Sydorenko <mogoll92@gmail.com>

* Fix grammar

Signed-off-by: Yevhen Sydorenko <mogoll92@gmail.com>

* Updated vfsdata

Signed-off-by: Yevhen Sydorenko <mogoll92@gmail.com>

---------

Signed-off-by: Yevhen Sydorenko <mogoll92@gmail.com>
2024-10-23 19:27:01 +01:00
Philipp B 3d49ff83c7
feat: implement webhook_url_file for discord and msteams (#3555)
* feat: implement webhook_url_file for discord

implements #3482

Signed-off-by: Philipp Born <git@pborn.eu>

* feat: implement webhook_url_file for msteams

implements #3536

Signed-off-by: Philipp Born <git@pborn.eu>

---------

Signed-off-by: Philipp Born <git@pborn.eu>
2024-02-07 10:33:46 +00:00
Tomas Kozak d2b6692f2c
Reflect Discord's max length message limits (#3597)
* Reflect Discord's max length message limits

Signed-off-by: Tomas Kozak <kozak@talko.cz>

* Fix log key name

Signed-off-by: Tomas Kozak <kozak@talko.cz>

---------

Signed-off-by: Tomas Kozak <kozak@talko.cz>
2023-11-15 07:37:47 +00:00
Matthias Loibl 550952eb51
notify/discord: Create Discord integration
Signed-off-by: Matthias Loibl <mail@matthiasloibl.com>
2022-07-04 22:56:48 +02:00