Commit graph

19 commits

Author SHA1 Message Date
Thorben Günther
add22b771a
Remove default ntfy server setting
Setting this to "https://ntfy.sh" has security implications: If the user
forgets to set his server, but uses the new short form for topics, the
notification will be sent to "ntfy.sh" and could expose information.
2024-11-21 12:21:12 +01:00
Thorben Günther
84a45a909b
config: Allow to separate the ntfy topic from the server 2024-11-07 13:54:21 +01:00
Thorben Günther
e85b5e6ea5
Let a label specify its own ntfy topic
References: https://todo.xenrox.net/~xenrox/ntfy-alertmanager/9
2024-11-06 14:16:36 +01:00
Thorben Günther
f4483532f5
Add support for displaying the alert's GeneratorURL 2024-11-06 14:01:01 +01:00
Thorben Günther
f2cac349c6
Support logging to file 2024-09-11 22:45:56 +02:00
Thorben Günther
765235c0ca
config: Remove unused config field
The implementation did not use this field after all.
2024-09-11 22:18:44 +02:00
Thorben Günther
af3857d162
config: Use "example.com" domain
This is recommended by RFC2606[1].

[1]: https://datatracker.ietf.org/doc/html/rfc2606
2024-09-11 22:12:21 +02:00
Thorben Günther
dc9741b798
config: ReadConfig -> Read
The function is already in the config package, the old naming is
redundant.
2024-09-11 22:02:50 +02:00
Thorben Günther
6c2521eeca
config: Support "include" directive
With this directive other configuration files can be imported into the
main config. Can be useful for keeping secrets out of the latter.

Closes: https://todo.xenrox.net/~xenrox/ntfy-alertmanager/23
2024-09-11 21:53:26 +02:00
Thorben Günther
8868bfa20d
Run gofmt 2023-09-28 13:42:49 +02:00
Thorben Günther
9a030f2902
config: Fix test 2023-09-28 13:41:23 +02:00
Jackson Chen
9b4b135a39
implement priority for resolved alerts 2023-09-28 13:05:28 +02:00
Thorben Günther
86afe915f3
publish: Move fingerprint conversion to config parsing
We only really need to do it once, not every time a new message gets
published.
2023-08-28 00:36:41 +02:00
Thorben Günther
8f28182111
config.scfg: Add instructions to obtain cert fingerprint 2023-08-25 22:46:41 +02:00
Thorben Günther
25e65db8bd
Add support for self signed ntfy certificates
A fingerprint can be specified in the configuration file. If it matches
the one from the server certificate, it will be accepted.

Closes: https://todo.xenrox.net/~xenrox/ntfy-alertmanager/22
2023-08-25 14:57:54 +02:00
Thorben Günther
ddd41a6341
Add option for setting the logging format 2023-08-13 16:02:02 +02:00
Thorben Günther
a9fa7e4b23
config: Switch default values of alert mode and cache type
By default alerts will no longer be split apart and any caching
functionality will be disabled. With this the behaviour will be closer
to what the user has configured in Alertmanger/Prometheus itself.
2023-07-12 19:17:47 +02:00
Thorben Günther
b2a1ab61c9
cache: Move creation logic into cache package 2023-07-12 19:00:25 +02:00
Thorben Günther
c70b82e9ab
config: Move to own package 2023-07-12 14:56:48 +02:00