1
0
mirror of https://github.com/prometheus/alertmanager.git synced 2026-02-05 15:45:34 +01:00

196 Commits

Author SHA1 Message Date
Siavash Safi
c90d8707d5 feat(provider): implement per-alert limits (#4819)
* feat(limit): add new limit package with bucket

Add a new limit package with generic bucket implementation.
This can be used for example to limit the number of alerts in memory.

Benchmarks:
```go
goos: darwin
goarch: arm64
pkg: github.com/prometheus/alertmanager/limit
cpu: Apple M3 Pro
BenchmarkBucketUpsert/EmptyBucket-12  	 8816954	       122.4 ns/op	      56 B/op	       2 allocs/op
BenchmarkBucketUpsert/AddToFullBucketWithExpiredItems-12         	 9861010	       123.0 ns/op	      56 B/op	       2 allocs/op
BenchmarkBucketUpsert/AddToFullBucketWithActiveItems-12          	 8343778	       143.6 ns/op	      56 B/op	       2 allocs/op
BenchmarkBucketUpsert/UpdateExistingAlert-12                     	10107787	       118.9 ns/op	      56 B/op	       2 allocs/op
BenchmarkBucketUpsert/MixedWorkload-12                           	 9436174	       126.0 ns/op	      56 B/op	       2 allocs/op
BenchmarkBucketUpsertScaling/BucketSize_10-12                    	10255278	       115.4 ns/op	      56 B/op	       2 allocs/op
BenchmarkBucketUpsertScaling/BucketSize_50-12                    	10166518	       117.1 ns/op	      56 B/op	       2 allocs/op
BenchmarkBucketUpsertScaling/BucketSize_100-12                   	10457394	       115.0 ns/op	      56 B/op	       2 allocs/op
BenchmarkBucketUpsertScaling/BucketSize_500-12                   	 9644079	       115.2 ns/op	      56 B/op	       2 allocs/op
BenchmarkBucketUpsertScaling/BucketSize_1000-12                  	10426184	       116.6 ns/op	      56 B/op	       2 allocs/op
BenchmarkBucketUpsertConcurrent-12                               	 5796210	       216.3 ns/op	     406 B/op	       5 allocs/op
PASS
ok  	github.com/prometheus/alertmanager/limit	15.497s
```

Signed-off-by: Siavash Safi <siavash@cloudflare.com>

* feat(provider): implement per-alert limits

Use the new limit module to add optional per alert-name limits.
The metrics for limited alerts can be enabled using
`alerts-limited-metric` feature flag.

Signed-off-by: Siavash Safi <siavash@cloudflare.com>

---------

Signed-off-by: Siavash Safi <siavash@cloudflare.com>
2026-02-01 13:21:20 +01:00
Christoph Maser
a7cb430211 docs(opsgenie): fix description of api_url field (#4908)
Fixes: #3206

Signed-off-by: Christoph Maser <christoph.maser+github@gmail.com>
2026-01-30 16:02:47 +01:00
Hélia Barroso
f5d5b6736b chore: documment slack app configs (#4871)
Signed-off-by: Hélia Barroso <helia_barroso@hotmail.com>
2026-01-30 16:01:42 +01:00
mihir-dixit2k27
1946357aa3 feat(slack): add support for top-level text field in Slack notificati… (#4867)
* feat(slack): add support for top-level text field in Slack notifications (#3071)
---------

Signed-off-by: mihir-dixit2k27 <mihidixi@gmail.com>
Signed-off-by: Mihir Dixit <dixitmihir1@gmail.com>
Signed-off-by: mihir-dixit2k27 <143348248+mihir-dixit2k27@users.noreply.github.com>
2026-01-30 11:07:49 +01:00
Gintoms
bc26ebb5e4 smtp: Customize the SSL/TLS port support (#4757) (#4818)
Signed-off-by: gintom <17498860+Gintoms@users.noreply.github.com>
2026-01-30 11:06:57 +01:00
Gulshan
e9b9ecdc0c Add chat_id_file configuration parameter for Telegram (#4909)
Signed-off-by: gulshank0 <gulshanbahadur002@gmail.com>
2026-01-28 18:51:28 +01:00
Siavash Safi
f3ed97944c docs: add notification integrations (#4901)
Add a new page to document the available notification integrations.

Closes #4900

Signed-off-by: Siavash Safi <siavash@cloudflare.com>
2026-01-19 20:37:09 +01:00
Christoph Maser
cae1590129 feat: add config directive to pass wechat api secret via file (#4734)
Ref: #2498

Signed-off-by: Christoph Maser <christoph.maser+github@gmail.com>
2026-01-05 18:13:23 +01:00
Walther Lee
b114dd40b7 update slack_config attachments documentation links (#4802)
Signed-off-by: Walther Lee <walthere.lee@gmail.com>
2026-01-05 18:11:12 +01:00
Hélia Barroso
ed17058208 fix: max-silence-size-bytes in doc (#4805)
Signed-off-by: Hélia Barroso <helia_barroso@hotmail.com>
2025-12-31 15:07:50 +01:00
Siavash Safi
18939cee8f feat: add distributed tracing support (#4745)
Add tracing support using otel to the the following components:
- api: extract trace and span IDs from request context
- provider: mem put
- dispatch: split logic and use better naming
- inhibit: source and target traces, mutes, etc. drop metrics
- silence: query, expire, mutes
- notify: add distributed tracing support to stages and all http requests

Note: inhibitor metrics are dropped since we have tracing now and they
are not needed. We have not released any version with these metrics so
we can drop them safely, this is not a breaking change.

This change borrows part of the implementation from #3673
Fixes #3670

Signed-off-by: Dave Henderson <dhenderson@gmail.com>
Signed-off-by: Siavash Safi <siavash@cloudflare.com>
Co-authored-by: Dave Henderson <dhenderson@gmail.com>
2025-12-05 22:58:44 +01:00
Dieter Maes
05561704f8 fix rocketchat_config docs (#4767)
* Drop duplicate `text` key
* Change `titleLink` to `title_link`

One of my commit hooks also automatically cleaned up some trailing
whitespace

Signed-off-by: Dieter Maes <dmaes@inuits.eu>
2025-12-05 20:28:28 +01:00
Siavash Safi
e3c74f565b feat: allow nested details fields in pagerduty (#3944)
This change allows nested key/value pair in pageduty configuration.
Events API V1 supports an object in `details` field:
https://developer.pagerduty.com/docs/send-v1-event#parameters

Events API V2 supports an object in `payload.custom_details` field:
https://developer.pagerduty.com/docs/send-alert-event#parameters

The configuration and message/payload types where changed from
`map[string]string` to `map[string]any`.

The default template is updated to use the new `toJson` function.

Fixes #2477
Fixes #3218

Signed-off-by: Siavash Safi <siavash@cloudflare.com>
2025-12-05 16:12:25 +01:00
Christoph Maser
913b3863c7 chore: add comment about SMTP PLAIN authentication (#4741)
Ref: #1236

Signed-off-by: Christoph Maser <christoph.maser+github@gmail.com>
2025-12-05 16:11:14 +01:00
Siavash Safi
e9405f942c feat(template): add toJson function (#4773)
This change introduces a new template function called `toJson` which
can convert internal Alertmanager data structures into their JSON
representation.

This is useful in notify integrations where JSON objects can be
passed to external services.

Signed-off-by: Siavash Safi <siavash@cloudflare.com>
2025-12-03 11:00:20 -08:00
Michael Stapelberg
4e54940287 feat: implement threading to group email alert groups into threads (#4623)
Some email clients such as Gmail apparently use their own heuristics
for threading and already implement this behavior based on the subject.

But for users of other email clients that only implement threading
based on the relevant headers (e.g. notmuch), those users currently
get one email thread for each newly firing alert.

With threading enabled, all alert emails (of the same alert)
on the same day are grouped into the same thread. Much nicer :)

Signed-off-by: Michael Stapelberg <stapelberg@google.com>
2025-12-02 16:28:59 +01:00
Holger Waschke
2da990663e fix(configuration.md): fix documentation hiccup (#4755)
Signed-off-by: Holger Waschke <waschkester@gmail.com>
2025-11-18 23:31:15 +01:00
Holger Waschke
a90da796bd Jira Integration: Allow configuring issue update via parameter (#4621)
* Jira Integration: Allow configuring issue update via parameter

---------

Signed-off-by: Holger Waschke <waschkester@gmail.com>
2025-11-18 18:12:39 +01:00
Solomon Jacobs
8693a18274 fix: <mute_time_interval> was renamed (#4729)
In https://github.com/prometheus/alertmanager/pull/2779 the field was
changed, but this part was forgotten.

Signed-off-by: Solomon Jacobs <solomonjacobs@protonmail.com>
2025-11-13 15:33:16 +01:00
Julius Volz
366e34dcbc Merge pull request #4708 from ultrotter/hadocs
Add documentation about high availability
2025-11-11 17:39:51 +01:00
Samuel Alfageme Sainz
cdf76d95d1 Fix 's/client/alerts_api/g' broken link in 0.29 (#4718)
8343ee renamed this file but missed adjusting links in the docs.

Signed-off-by: Samuel Alfageme Sainz <samuel@alfage.me>
2025-11-11 09:01:45 +01:00
Shyukri Shyukriev
5c8df7c3f2 Add documentation for client_allowed_sans (#4706)
* Add documentation for client_allowed_sans.

Signed-off-by: Shyukri Shyukriev <shyukri.shyukriev@crate.io>

* Update CHANGELOG.md

Signed-off-by: Ben Kochie <superq@gmail.com>

---------

Signed-off-by: Shyukri Shyukriev <shyukri.shyukriev@crate.io>
Signed-off-by: Ben Kochie <superq@gmail.com>
Co-authored-by: Ben Kochie <superq@gmail.com>
2025-11-10 17:03:27 +01:00
Guido Trotter
19bebbe0d4 Update docs/high_availability.md common deployment sizes
Co-authored-by: Ben Kochie <superq@gmail.com>
Signed-off-by: Guido Trotter <ultrotter@gmail.com>
2025-11-07 16:43:03 +00:00
Guido Trotter
25c23e16c3 Fix language on instance numbers in HA docs
Signed-off-by: Guido Trotter <guido@hudson-trading.com>
2025-11-07 11:36:37 -05:00
Guido Trotter
31328ae1c8 Update docs/high_availability.md sort rank
Co-authored-by: Ben Kochie <superq@gmail.com>
Signed-off-by: Guido Trotter <ultrotter@gmail.com>
2025-11-07 16:25:13 +00:00
Guido Trotter
54386326ab Fix indentation
Signed-off-by: Guido Trotter <guido@hudson-trading.com>
2025-11-07 08:26:30 -05:00
Guido Trotter
104c0a3208 Add documentation about high availability
This summarizes the principles for HA as stated by Ben, an old blog post by Julius
explaining how it works[1], and the current implementation.

Signed-off-by: Guido Trotter <guido@hudson-trading.com>

[1] https://promlabs.com/blog/2023/08/31/high-availability-for-prometheus-and-alertmanager-an-overview/#ha-for-the-alertmanager
2025-11-07 08:22:23 -05:00
StopMotionCuber
f969a4c8f6 Add templating functions for working with URLs (#4625)
* Add safeUrl to mark URL strings as safe

Signed-off-by: Ruben Simons <r.simons@fz-juelich.de>

* Add urlUnescape to allow for reversing of escaped URL strings

Signed-off-by: Ruben Simons <r.simons@fz-juelich.de>

---------

Signed-off-by: Ruben Simons <r.simons@fz-juelich.de>
Co-authored-by: Ben Kochie <superq@gmail.com>
2025-11-05 18:04:58 +01:00
nick
3b515b7dc0 add Mattermost integration (#4090)
* add mattermost integration

---------

Signed-off-by: UndeadDemidov <45305584+UndeadDemidov@users.noreply.github.com>
Signed-off-by: Ben Kochie <superq@gmail.com>
Co-authored-by: Ben Kochie <superq@gmail.com>
Co-authored-by: Siavash Safi <git@hosted.run>
2025-11-03 21:08:49 +01:00
Siavash Safi
f2fbb318cf feat(inhibit): add inhibition metrics (#4629)
Add metrics for inhibitor:
- alertmanager_inhibitor_source_alerts_cache_items
- alertmanager_inhibitor_source_alerts_index_items
- alertmanager_inhibitor_mutes_duration_seconds

Add metrics for inhibition rules:
- alertmanager_inhibit_rule_source_alerts_cache_items
- alertmanager_inhibit_rule_source_alerts_index_items
- alertmanager_inhibit_rule_matches_duration_seconds
- alertmanager_inhibit_rule_mutes_duration_seconds

Other changes:
- Add debug logs for duplicate inhibition rule names
- Add Len() method to store.Alerts struct
- Add Len() method to inhibit.index struct
- update docs

Signed-off-by: Siavash Safi <siavash@cloudflare.com>
2025-10-25 13:25:27 +02:00
Siavash Safi
1f2df03c44 feat: add names to inhibit rules (#4628)
- add Name field to config.InhibitRule
- add Name field to inhibit.InhibitRule
- update docs for inhibit_rule

The name will be used in new metrics to be added in a separate change.

Signed-off-by: Siavash Safi <siavash@cloudflare.com>
2025-10-23 13:45:21 -04:00
Ben Kochie
ca9ed08940 Merge pull request #4354 from eyazici90/local/timeoutt
feat: add timeout option for pagerduty notifier
2025-10-19 08:06:43 +01:00
Ben Kochie
9ec88ae6ff Merge pull request #4355 from eyazici90/local/slack-timeout
feat: add timeout option for slack notifier
2025-10-19 08:05:52 +01:00
Ben Kochie
e8f6948f4a Update docs/configuration.md
Signed-off-by: Ben Kochie <superq@gmail.com>
2025-10-19 08:44:37 +02:00
Isaac Seymour
c22bd504ce Apply comments from @gotjosh
Signed-off-by: Isaac Seymour <i.seymour@oxon.org>
2025-09-22 16:27:00 +01:00
gotjosh
63bc1ef12a Merge branch 'main' into rorymalcolm/incidentio-notifier 2025-09-22 15:30:46 +01:00
Chris Jedro
cfd70e5047 Add new Jira search endpoint with new api_type option and auto detect (#4542)
* Add new Jira search endpoint with new api_type option and auto detect

Signed-off-by: christianjedro <cj@cloudeteer.de>

* adding recommendations, update doku, add comments

Signed-off-by: christianjedro <cj@cloudeteer.de>

* remove global api type (recommended by @jkroepke), add default value and remove test + implementation for empty string

Signed-off-by: christianjedro <cj@cloudeteer.de>

* dco

Signed-off-by: christianjedro <cj@cloudeteer.de>

* add better explanation

Signed-off-by: christianjedro <cj@cloudeteer.de>

---------

Signed-off-by: christianjedro <cj@cloudeteer.de>
2025-09-16 20:32:47 -04:00
rory malcolm
edb9a4d936 Merge branch 'main' into rorymalcolm/incidentio-notifier 2025-09-04 11:40:44 +01:00
Frank Blanning
f7b8a8e16a Add documentation for custom headers
Signed-off-by: Frank Blanning <frank.blanning@noris.gr>
2025-08-25 09:24:48 +03:00
Rory Malcolm
b8fc677c29 feat: incident.io Notifier
- Adds the technical implementation, and tests, for the incident.io notifier

- Configured through the following config:

```yaml
receivers:
  - name: 'incidentio-notifications'
    incidentio_configs:
      - url: '$alert_source_url'
        alert_source_token: '$alert_source_token'
```

- Add documentation for the incidentio_config

Signed-off-by: Isaac Seymour <i.seymour@oxon.org>
2025-08-06 17:47:30 +01:00
Julius Volz
47a4670c6d Standardize doc page title handling
See https://groups.google.com/g/prometheus-developers/c/cwL3cM66Em8

Signed-off-by: Julius Volz <julius.volz@gmail.com>
2025-05-28 20:57:39 +02:00
Jellyfrog
1de2935283 docs: Correct heading level for Slack
Signed-off-by: Jellyfrog <Jellyfrog@users.noreply.github.com>
2025-05-14 20:30:23 +02:00
Markus Cisler
90f24e0e0a pushover: Document HTML/monospace message formatting in config
Signed-off-by: Markus Cisler <hello@markuscisler.com>
2025-05-04 21:14:18 +02:00
emreya
f5c92db687 docs: add timeout option to slack configuration doc
Signed-off-by: emreya <e.yazici1990@gmail.com>
2025-04-18 14:44:13 +02:00
emreya
97ab57a29b docs: add timeout option to pagerduty configuration doc
Signed-off-by: emreya <e.yazici1990@gmail.com>
2025-04-17 17:41:18 +02:00
George Robinson
b15eed57d3 Fix extra space at the end of here
Signed-off-by: George Robinson <george.robinson@grafana.com>
2025-03-11 11:58:56 +00:00
George Robinson
7c171dfa1f Merge pull request #4306 from prometheus/grobinson/improve-client-docs
Improve docs for client behavior
2025-03-11 11:56:16 +00:00
George Robinson
8343ee691c Improve docs for client behavior
This commit updates the docs for client behavior, and describes a
number of the more nuanced semantics expected from clients to ensure
notifications are delivered as expected.

Signed-off-by: George Robinson <george.robinson@grafana.com>
2025-03-11 10:55:21 +00:00
George Robinson
01c9f70027 Small fix to grammar
Signed-off-by: George Robinson <george.robinson@grafana.com>
2025-03-11 08:09:00 +00:00
George Robinson
1df709e92b Improve documentation around group timers
This commit improves the documentation around the group timers such
as group_wait, group_interval and repeat_interval. It offers a
more in-depth explanation of how these timers work without going
into detail about how they are implemented in the code.

Signed-off-by: George Robinson <george.robinson@grafana.com>
2025-03-10 20:52:26 +00:00