Commit Graph

126 Commits

Author SHA1 Message Date
Gokhan a9b5cb4351
Enable setting ThreadId for Telegram notifications (#3638)
* Enable setting ThreadId for telegram notifications

Signed-off-by: Gokhan Sari <gokhan@sari.m

---------
Signed-off-by: gotjosh <josue.abreu@gmail.com>
2024-04-30 11:12:58 +01:00
George Robinson dc1e1a2b88
Add date and tz functions to templates (#3812)
* Add date and tz functions to templates

This commit adds the date and tz functions to templates. This means
users can now format time in a specified format and also change
the timezone to their specific locale.

An example of how these functions work, and can be composed together,
can be seen here:

	{{ .StartsAt | tz "Europe/Paris" | date "15:04:05 MST" }}

Signed-off-by: George Robinson <george.robinson@grafana.com>

---------

Signed-off-by: George Robinson <george.robinson@grafana.com>
2024-04-22 16:15:33 +02:00
Christoph Maser f82574a376
docs: better descibe `email_config.to` fromat (#3760)
Signed-off-by: Christoph Maser <christoph.maser+github@gmail.com>
2024-03-14 12:56:31 +00:00
George Robinson d1fe4b7f6f
Fix code blocks in the docs being blockquoted instead (#3744)
Signed-off-by: George Robinson <george.robinson@grafana.com>
2024-02-29 09:57:56 +00:00
George Robinson c2cf3db045
Support UTF-8 label matchers: Update the docs on how to use UTF-8 in label matchers and parse mode feature flags (#3572)
* Update the docs on how to use UTF-8 in label matchers and parse mode feature flags

Signed-off-by: George Robinson <george.robinson@grafana.com>
---------

Signed-off-by: George Robinson <george.robinson@grafana.com>
2024-02-14 09:20:42 +00:00
Lucas Burigo 2fd1b52c98
Update notification_examples.md (#3707)
Signed-off-by: Lucas Burigo <burigolucas@users.noreply.github.com>
2024-02-13 12:40:46 +00: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
Karl-Philipp Richter c920b605b6
Add links to concepts inhibition and grouping to docs/configuration.md (#3644)
Signed-off-by: Karl-Philipp Richter <krichter@posteo.de>
2023-12-18 18:25:23 +00:00
romankubu 4f0bdf4940
Add summary to msteams notification (#3616)
* Add summary to msteams notification

Signed-off-by: Roman Kubu <Roman.Kubu@airbank.cz>
---------

Signed-off-by: Roman Kubu <Roman.Kubu@airbank.cz>
Signed-off-by: romankubu <112698283+romankubu@users.noreply.github.com>
Co-authored-by: Jack <jack4zhang@gmail.com>
2023-11-24 08:58:57 +00:00
Lukas Hauser 318d2a3abf
Fix Docs: default (#3550)
Signed-off-by: Lukas Hauser <github@luka5.de>
2023-10-12 16:30:32 +01:00
George Robinson 573e2c3694
Update configuration docs for Repeat interval (#3552)
Although it is true that Repeat interval should be greater than or
equal to the Group interval, it should also be a multiple of it too.
If the Repeat interval is not a multiple, then because of how aggregation
groups are flushed, it will be made into one implicitly. This commit
documents this behavior.

Signed-off-by: George Robinson <george.robinson@grafana.com>
2023-10-12 16:12:12 +01:00
xenofree 5906dbc193
docs: fix typo regarding http_proxy for proxy_from_environment (#3514)
* docs: fix typo regarding http_proxy for proxy_from_environment

Signed-off-by: xenofree <35098906+xenofree@users.noreply.github.com>

* docs: add NO_PROXY environment

Co-authored-by: Simon Pasquier <spasquie@redhat.com>
Signed-off-by: xenofree <35098906+xenofree@users.noreply.github.com>

---------

Signed-off-by: xenofree <35098906+xenofree@users.noreply.github.com>
Co-authored-by: Simon Pasquier <spasquie@redhat.com>
2023-09-08 16:45:33 +02:00
Hélia Barroso ba303644e6
Add missing ttl in pushhover (#3474)
---------

Signed-off-by: Hélia Barroso <helia.barroso@farfetch.com>
Signed-off-by: Simon Pasquier <spasquie@redhat.com>
Co-authored-by: Simon Pasquier <spasquie@redhat.com>
2023-08-31 17:35:04 +02:00
George Robinson 4f1f020fe5
Docs: Update docs on inheritance for time intervals (#3472)
This commit updates the docs on inheritance for group_wait,
group_interval and repeat_interval.

Signed-off-by: George Robinson <george.robinson@grafana.com>
2023-08-24 21:21:14 +01:00
George Robinson e1e59925cc
Update docs for slack_config (#3455)
This commit updates the docs for slack_config with usage for both
Incoming webhooks and Bot tokens.

Signed-off-by: George Robinson <george.robinson@grafana.com>
2023-08-10 11:02:12 +01:00
George Robinson eaac8b7b2e Fix example matchers in docs
Signed-off-by: George Robinson <george.robinson@grafana.com>
2023-06-22 10:52:25 +01:00
Mahesh Vidhyadharan 2f3a4b0f10 fixing the field name for pagerduty image_config as per code https://pkg.go.dev/github.com/prometheus/alertmanager/config\#PagerdutyImage
Signed-off-by: Mahesh Vidhyadharan <mahesh.vidhyadharan@steel-eye.com>
2023-06-09 15:24:33 +02:00
George Robinson 229ecb7e9a
Log a warning when repeat_interval is less than group_interval (#3389)
* Log a warning when repeat_interval is less than group_interval

This commit updates Alertmanager to log a warning when
repeat_interval is less than group_interval for an individual route.

When repeat_interval is less than group_interval, the earliest
a notification can be sent again is the next time the aggregation
group is flushed, and this happens at each group_interval.

Signed-off-by: George Robinson <george.robinson@grafana.com>
---------

Signed-off-by: George Robinson <george.robinson@grafana.com>
Co-authored-by: gotjosh <josue.abreu@gmail.com>
2023-06-08 22:58:24 +02:00
Jack d10f21f38c
Add msteams (#3324)
* Add msteams

Signed-off-by: Jack Zhang <jack4zhang@gmail.com>
---------
Signed-off-by: Jack Zhang <jack4zhang@gmail.com>
Signed-off-by: Jack <jack4zhang@gmail.com>
2023-06-08 11:27:56 -04:00
Simon Pasquier fe287e504e
Merge pull request #3306 from simonpasquier/update-http-config-doc
docs: document the new proxy-related settings
2023-05-05 14:29:57 +02:00
Alec 3b9cd0408e
Add support for pushover devices (#3318)
* Add support for pushover devices

Signed-off-by: Alec Pinson <30310787+alec-pinson@users.noreply.github.com>

* update docs

Signed-off-by: Alec Pinson <30310787+alec-pinson@users.noreply.github.com>

---------

Signed-off-by: Alec Pinson <30310787+alec-pinson@users.noreply.github.com>
2023-05-05 13:04:47 +01:00
Simon Pasquier bb1c123b7f
Merge pull request #3226 from an5t/telegram-token-file
Support loading Telegram bot token from file
2023-04-06 17:15:17 +02:00
Simon Pasquier 5004dff1f8 docs: document the new proxy-related settings
The version of `github.com/prometheus/common` imported by Alertmanager
adds several fields to the `http_config` and `oauth2` structs for
setting proxy parameters:
* `no_proxy`
* `proxy_from_environment`
* `proxy_connect_header`

Signed-off-by: Simon Pasquier <spasquie@redhat.com>
2023-03-28 11:35:04 +02:00
Soon-Ping 6bb49b2f1c
Added note on data retention to documentation for repeat_interval (#3147)
* Added note on data retention to documentation for repeat_interval

Signed-off-by: Soon-Ping Phang <soonping@amazon.com>
---------

Signed-off-by: Soon-Ping Phang <soonping@amazon.com>
2023-03-07 11:27:12 +01:00
Ghazanfar d8bea84adc
Make TrimSpace available for use in the template (#3281)
* Make TrimSpace available for use in the template

Signed-off-by: Ghazanfar <ghazanfar.isc@gmail.com>
2023-03-07 09:38:57 +01:00
Simon Rozet 41eb1213bb
support loading webhook URL from a file (#3223)
* support loading webhook URL from a file

/cc #2498

Signed-off-by: Simon Rozet <me@simonrozet.com>

* notify/webhook: add test for reading url from file

Signed-off-by: Simon Rozet <me@simonrozet.com>

* notify/pushover: add tests for reading secrets from files

Signed-off-by: Simon Rozet <me@simonrozet.com>

---------

Signed-off-by: Simon Rozet <me@simonrozet.com>
2023-03-03 15:31:14 +01:00
Simon Rozet 8f559aad34
mark webhook URL as a secret (#3228)
Signed-off-by: Simon Rozet <me@simonrozet.com>
2023-02-02 16:23:51 +00:00
Andrey Mishakin 6c9c58015e Support loading Telegram bot token from file
Signed-off-by: Andrey Mishakin <stieroglif@gmail.com>
2023-01-22 16:35:01 +03:00
Simon Rozet a8e4c166a8
support loading pushover secrets from files (#3200)
* support loading pushover secrets from files

Add the user_key_file and token_file keys to the pushover config.

/cc https://github.com/prometheus/alertmanager/issues/2498

Signed-off-by: Simon Rozet <me@simonrozet.com>
2023-01-18 23:33:42 +01:00
Julius Volz 8a42cbc9b5 Multiple improvements to Alertmanager configuration docs
* The current page outline was an unstructured and unsorted mess, so I tried to
  organize the different configuration file fields into categories.
* I also sorted receivers alphabetically.
* Corrected the Telegram receiver's "bot_token" to be a "secret", not "string".
* Other minor improvements and wording additions to the sections.

Signed-off-by: Julius Volz <julius.volz@gmail.com>
2023-01-18 16:28:49 +01:00
Simon Pasquier ef150318b4
Merge pull request #3194 from aminvakil/telegram_default_parse_mode
Telegram default parse_mode has been changed to HTML
2023-01-05 11:54:40 +01:00
Julius Volz 3f27314fb5 Add missing docs for Discord notifier
Signed-off-by: Julius Volz <julius.volz@gmail.com>
2023-01-04 13:28:54 +01:00
Amin Vakil 9c9ddcb6be
Telegram default parse_mode has been changed to HTML
https://github.com/prometheus/alertmanager/pull/2981
https://github.com/prometheus/alertmanager/commit/d4c2048

Signed-off-by: Amin Vakil <info@aminvakil.com>
2022-12-28 15:52:42 +03:30
Simon Pasquier fac8c9245d doc: update with new HTTP configuration options
Signed-off-by: Simon Pasquier <spasquie@redhat.com>
2022-12-16 10:06:03 +01:00
gotjosh c3aaca8d61
Doc changes requested by review
Signed-off-by: gotjosh <josue.abreu@gmail.com>
2022-12-15 12:08:35 -04:00
gotjosh 572de996b7
Remove the `bot_token`
Signed-off-by: gotjosh <josue.abreu@gmail.com>
2022-12-15 11:48:01 -04:00
gotjosh 02660ba09e
Add the webex documentation
Signed-off-by: gotjosh <josue.abreu@gmail.com>
2022-12-15 11:19:17 -04:00
Oktarian T-B dd7214e51f
Add support for reading VictorOps API key from file (#3111)
* Read VictorOps API key from file

* Update documentation

* Improve tests

Signed-off-by: Oktarian T-B <oktariantilneybassett@improbable.io>
2022-10-25 15:40:17 +02:00
Oktarian T-B 1045dc0f21
Add support for reading PagerDuty secrets from files (#3107)
* Add support for reading PagerDuty secrets from files

* Update documentation

Signed-off-by: Oktarian Tilney-Bassett <oktariantilneybassett@improbable.io>
2022-10-14 14:55:59 +02:00
Oktarian T-B d034f116d5
Add PagerDuty source field (PD-CEF) (#3106)
* Add new source field to PD config
* Update documentation

Signed-off-by: Oktarian Tilney-Bassett <oktariantilneybassett@improbable.io>
2022-10-13 14:01:46 +02:00
Ben Ridley 33a0e77a71
Add timezone support to time intervals. (#2782)
* Add explicit UTC to time interval tests

Signed-off-by: Ben Ridley <benridley29@gmail.com>

* Add timezone support to time intervals

Signed-off-by: Ben Ridley <benridley29@gmail.com>

* Update time interval documentation with time zone info

Signed-off-by: Ben Ridley <benridley29@gmail.com>

* Refactor notification tests to test timezone support

Signed-off-by: Ben Ridley <benridley29@gmail.com>

* Make use of Local more clear

Signed-off-by: Ben Ridley <benridley29@gmail.com>

* Fix documentation about timezone support.

Makes it clear that the default is UTC, but others are supported.

Signed-off-by: Ben Ridley <benridley29@gmail.com>

* Remove commented/unused function

Signed-off-by: Ben Ridley <benridley29@gmail.com>

* Fix tests using incorrect timezones

Previously tests were using time zone names that were unsupported by the
RFC822 parser. This switches the tests to use RFC822Z and specifies the
zones by number.

Signed-off-by: Ben Ridley <benridley29@gmail.com>

* Add a few more timezone test cases

Signed-off-by: Ben Ridley <benridley29@gmail.com>

* Remove unnecessary if/else branch

Co-authored-by: Sylvain Rabot <sylvain@abstraction.fr>
Signed-off-by: Ben Ridley <benridley29@gmail.com>

* Rename timezone to location for consistency with Go stdlib

Signed-off-by: Ben Ridley <benridley29@gmail.com>

* Make Windows timezone error more specific

Signed-off-by: Ben Ridley <benridley29@gmail.com>

* Update docs to use 'location'

Signed-off-by: Ben Ridley <benridley29@gmail.com>

* Apply suggestions from code review

Co-authored-by: Sylvain Rabot <sylvain@abstraction.fr>
Signed-off-by: Ben Ridley <benridley29@gmail.com>

Signed-off-by: Ben Ridley <benridley29@gmail.com>
Co-authored-by: Sylvain Rabot <sylvain@abstraction.fr>
2022-09-22 14:45:17 +02:00
Eric R. Rath efc956c7f7
SMTP config: add global and local password file fields (#3038)
* SMTP config: add global and local password file fields

Add config fields (for both global email config and route-specific email
config) that specify path to file containing SMTP password.  We don't
want the password in the config file itself, and reading the password
from a k8s-secret-backed file keeps the password itself "encrypted at
rest" in etcd, and cleanly separated from the rest of the AM config.

I used the same approach as pull request #2534 "Add support to set the
Slack URL in the file"
<https://github.com/prometheus/alertmanager/pull/2534/files> in the
upstream repo.

Signed-off-by: Eric R. Rath <eric.rath@oracle.com>

* changed *AuthPasswordFile field types to string per review feedback

Signed-off-by: Eric R. Rath <eric.rath@oracle.com>

* added error to getPassword() retval per review feedback

Signed-off-by: Eric R. Rath <eric.rath@oracle.com>

* simplified conf.smtp-* files

Signed-off-by: Eric R. Rath <eric.rath@oracle.com>

* update docs to reflect field type change

Signed-off-by: Eric R. Rath <eric.rath@oracle.com>

* don't treat username-without-password as invalid

Signed-off-by: Eric R. Rath <eric.rath@oracle.com>

* test cleanup

Signed-off-by: Eric R. Rath <eric.rath@oracle.com>

* Apply suggestions from code review

Co-authored-by: Simon Pasquier <spasquie@redhat.com>
Signed-off-by: Eric R. Rath <4080262+ericrrath@users.noreply.github.com>

* Updated per review feedback

Signed-off-by: Eric R. Rath <eric.rath@oracle.com>

* added sub-test per review feedback

Signed-off-by: Eric R. Rath <eric.rath@oracle.com>

* added test on Email.getPassword() per feedback

Signed-off-by: Eric R. Rath <eric.rath@oracle.com>

* only inherit global SMTP passwords if neither local password field is set

Signed-off-by: Eric R. Rath <eric.rath@oracle.com>

* removed blank line caught by gofumpt

Signed-off-by: Eric R. Rath <eric.rath@oracle.com>

Signed-off-by: Eric R. Rath <eric.rath@oracle.com>
Signed-off-by: Eric R. Rath <4080262+ericrrath@users.noreply.github.com>
Co-authored-by: Simon Pasquier <spasquie@redhat.com>
2022-09-16 14:36:57 +02:00
Nicolas Dumazet dec51b5ad9
/-/{healthy,ready}/ respond to HEAD (#3039)
Some frameworks issue HEAD requests to determine health.

This is meant to be the alertmanager equivalent of prometheus/prometheus#11160

Signed-off-by: Nicolas Dumazet <nicdumz.commits@gmail.com>

Signed-off-by: Nicolas Dumazet <nicdumz.commits@gmail.com>
2022-09-09 16:08:46 +02:00
Julien Pivotto dbc86188c0
Merge pull request #2956 from a-gavin/https_docs
docs: clarify supported tls cipher suites
2022-09-05 11:51:46 +02:00
Wen Long da6de1f1cc
docs: correct the accepted value for X-XSS-Protection header (#3004)
Signed-off-by: heylongdacoder <heylongdacoder@gmail.com>
2022-07-14 00:49:29 +02:00
Max Lowther 4abf1bf1dc
fixed oauth2 doc to reflect tls_config (#2979)
Signed-off-by: Max Lowther <lowther.max@gmail.com>
2022-07-04 16:54:44 +02:00
Alex Gavin a9b758a952 docs: clarify supported tls cipher suites
Signed-off-by: Alex Gavin <a_gavin@icloud.com>
2022-06-21 11:12:56 -07:00
Julius Volz 73a3fb8da0 Fixup
Signed-off-by: Julius Volz <julius.volz@gmail.com>
2022-05-14 11:13:40 +02:00
Julius Volz 423fa6e3d0 Fix Markdown formatting bugs / typos in the config docs
I noticed that some of the formatting on
https://prometheus.io/docs/alerting/latest/configuration/#time_interval-0 is
broken. This should fix that.

Signed-off-by: Julius Volz <julius.volz@gmail.com>
2022-05-13 20:01:21 +02:00
Mike 71d61c9c91
fix comment (#2869)
Signed-off-by: mikechengwei <842725815@qq.com>
2022-04-08 14:51:02 +02:00