Commit Graph

2505 Commits

Author SHA1 Message Date
Philip Gough
f8c06b4dc8 config: root route should have empty matchers
Unmarshal should validate that the root route does
not contain any matchers. Prior to this change,
only the deprecated match structures were checked.

Signed-off-by: Philip Gough <philip.p.gough@gmail.com>
2021-12-17 15:33:34 +00:00
Simon Pasquier
ec83f71257
Merge pull request #2758 from mac-chaffee/main
Document that matchers are ANDed together
2021-12-17 16:32:24 +01:00
Simon Pasquier
5fa473c203
Merge pull request #2785 from clyang82/fix_lint
fix lint error
2021-12-17 16:27:33 +01:00
clyang82
5414963190 fix lint error
Signed-off-by: clyang82 <chuyang@redhat.com>
2021-12-10 08:20:23 +00:00
sinkingpoint
e2a10119aa Move api v1 client into v1 tests
This commit moves the stuff formerly in /client into /test/with_api_v1
so that we can discourage use of the v1 client without breaking things

Signed-off-by: sinkingpoint <colin@quirl.co.nz>
2021-11-16 09:36:07 +01:00
Joe Groocock
4fcbeeca9e Add client TLS configuration
Allows connecting to alertmanager instances behind a TLS endpoint that
requires mutual TLS. Conveniently also allows specifying a CA
certificate file for alertmanagers that use trusted roots not in the
system root trust store.

Fixes: https://github.com/prometheus/alertmanager/issues/2652
Signed-off-by: Joe Groocock <me@frebib.net>
2021-11-16 09:35:09 +01:00
Jean-Philippe Quémémer
4fbcae7d05 Remove /api/v2/ from StripPrefix
Signed-off-by: Danny Kopping <danny.kopping@grafana.com>
2021-11-16 00:42:43 +01:00
Danny Kopping
143fd46467 Preferring the use of the basePath attribute
Signed-off-by: Danny Kopping <danny.kopping@grafana.com>
2021-11-16 00:42:43 +01:00
Danny Kopping
97e5779c3f Regenerated OpenAPI client code
Signed-off-by: Danny Kopping <danny.kopping@grafana.com>
2021-11-16 00:42:43 +01:00
Danny Kopping
7c5f105506 Oops, this is actually v2
Signed-off-by: Danny Kopping <danny.kopping@grafana.com>
2021-11-16 00:42:43 +01:00
Danny Kopping
15a1a115de Adding /api/v1 prefix to all endpoints
Signed-off-by: Danny Kopping <danny.kopping@grafana.com>
2021-11-16 00:42:43 +01:00
Jean-Philippe Quéméner
6a41fc22b3
Expose the fields from MuteTimeInterval in JSON correctly (#2765)
Before this PR, when marshalling to JSON, the go variable name would be taken (respective 'Name' and 'TimeIntervals') as JSON field name. With this PR we take instead the same name as for the YAML fields as everywhere else in the configuration.

Signed-off-by: Jean-Philippe Quémémer <jeanphilippe.quemener@grafana.com>
2021-11-15 11:16:52 +01:00
Philip Gough
30e0da4754
opsgenie: Extend config with 'entity' and 'actions' fields (#2753)
Signed-off-by: Philip Gough <philip.p.gough@gmail.com>
2021-11-13 07:37:59 +01:00
Devin Trejo
fad796931b
Add feature flag to enable discovery and use of public IPaddr for clustering. (#2719)
* Add feature flag to enable discovery and use of public IPaddr for clustering.

Before this change, Alertmanager would refuse to startup if using a
advertise address binding to any address (0.0.0.0), and the host only
had an interface with a public IP address. After this change we feature
flag permitting the use of a discovered public address for cluster
gossiping.

Signed-off-by: Devin Trejo <dtrejo@palantir.com>
2021-11-10 17:40:48 +01:00
mousavian
2f445bcf98
Add support for security-related HTTP headers (#2759)
* Add support for security-related HTTP headers

Signed-off-by: Rahman Mousavian <mousavian.rahman@gmail.com>

* go mod tidy

Signed-off-by: Rahman Mousavian <mousavian.rahman@gmail.com>
2021-11-10 17:29:04 +01:00
Julien Pivotto
d59548fbab
Enable HTTP 2 again (#2720)
We are re-enabling HTTP 2 again. There has been a few bugfixes upstream
in go, and we have also enabled ReadIdleTimeout.

Signed-off-by: Julien Pivotto <roidelapluie@inuits.eu>
2021-11-10 17:28:47 +01:00
Mac Chaffee
5e88a91be5
Remove extra parentheticals
Signed-off-by: Mac Chaffee <me@macchaffee.com>
2021-11-09 17:57:57 -05:00
Nik Reiman
5b825e22a4
Allow filtering silences by createdBy author (#2718)
This commit adds a `--created-by` argument to the `amtool silence
query` command so that silences can be filtered by the author they
were created with in `amtool silence add --author=<name>`.

Signed-off-by: nre <nre@ableton.com>
2021-11-09 13:10:19 +01:00
Mac Chaffee
78545d8abc
Document that matchers are ANDed together
Signed-off-by: Mac Chaffee <me@macchaffee.com>
2021-11-06 22:35:45 -04:00
csuzhang
b7035556e8
Update outdated url link with slack (#2749)
* fix outdated url link with slack

Signed-off-by: csuzhang <csuzhang@tencent.com>
2021-11-04 22:47:07 +01:00
markoposavec
05490d8954
Dynamic opsgenie responders (#2685)
* added option to specify multiple teams in opsgenie configuration

Signed-off-by: Marko Posavec <maposavec@infobip.com>
2021-11-04 22:32:20 +01:00
Simon Pasquier
992cea6007
Merge pull request #2727 from PhilipGough/fixes-2693
docs: Update default value for opsgenie_config 'message'
2021-10-29 16:43:57 +02:00
Simon Pasquier
a6b34e3450
Merge pull request #2746 from prometheus/repo_sync
Synchronize common files from prometheus/prometheus
2021-10-29 16:41:38 +02:00
Philip Gough
f52c11f3d1 docs: Update default value for opsgenie_config 'message'.
Signed-off-by: Philip Gough <philip.p.gough@gmail.com>
2021-10-28 16:59:49 +01:00
prombot
7893345f3d Update common Prometheus files
Signed-off-by: prombot <prometheus-team@googlegroups.com>
2021-10-24 00:01:47 +00:00
Kyle Brandt
1b8afe7cb5
export ValidateMatcher for DI (#2) (#2716)
so third parties, Grafana in particular, can over ride the validation.

Grafana wants to do this because other data sources will have label keys with things like spaces, periods, or other characters - and looking for a better integration with alert manager.

goes with grafana/grafana#38629
replaces https://github.com/prometheus/alertmanager/pull/2694

Signed-off-by: Kyle Brandt <kyle@grafana.com>
2021-10-21 09:29:55 +02:00
Jan-Otto Kröpke
186362cef0
Implement opsgenie_api_key_file (#2728)
Signed-off-by: Jan-Otto Kröpke <joe@adorsys.de>
2021-10-21 09:29:03 +02:00
PrometheusBot
b9ce1d1e99
Update common Prometheus files (#2708)
Signed-off-by: prombot <prometheus-team@googlegroups.com>
2021-10-19 01:13:02 +02:00
Yuriy Tseretyan
15f44f4a61
Close file descriptor after snapshot file was read (#2710)
* close file if it is opened

Signed-off-by: Yuriy Tseretyan <yuriy.tseretyan@grafana.com>
2021-10-19 01:12:02 +02:00
Bryan Boreham
f5768fb193
Update xxhash to v2.1.1 and improve pooling (#2709)
* Update xxhash to v2.1.1

This saves linking two different versions

Signed-off-by: Bryan Boreham <bjboreham@gmail.com>
2021-10-19 01:09:37 +02:00
Takuma Ishikawa
789a7bd6c3
Minor fixes on docs of receiver (#2726)
Signed-off-by: Takuma Ishikawa <nekketsuuu@users.noreply.github.com>
2021-10-19 01:07:53 +02:00
Takuma Ishikawa
5ddf9e24ea
amtool: Fix behavior of adding silence with duration option (#2741)
endsAt should be calculated from startsAt, not from the current time

Signed-off-by: nekketsuuu <nekketsuuu@users.noreply.github.com>
2021-10-18 15:13:42 +02:00
István Gazsi
78fdd6f56b
Generalize User-Agent header in receiver requests (#2722) (#2730)
Signed-off-by: István Gazsi <istvan.gazsi@theag3nt.com>
2021-10-18 14:34:22 +02:00
Björn Rabenstein
523c932859
Merge pull request #2737 from prometheus/beorn7/deprecation
Add deprecation note to pkg directory
2021-10-13 14:42:11 +02:00
beorn7
2cc5cc4f29 Add deprecation note to pkg directory
Signed-off-by: beorn7 <beorn@grafana.com>
2021-10-13 14:21:52 +02:00
Julien Pivotto
70abcccedb
Merge pull request #2725 from prometheus/release-0.23
docs: Fix default value of send_resolved for sns_configs (#2724)
2021-10-01 11:56:08 +02:00
Takuma Ishikawa
16fa045db4
docs: Fix default value of send_resolved for sns_configs (#2724)
Signed-off-by: Takuma Ishikawa <nekketsuuu@users.noreply.github.com>
2021-10-01 11:27:26 +02:00
Julien Pivotto
e35efbddb6
Merge pull request #2706 from pracucci/fix-sns-receiver-http-client
Fix HTTP client options in SNS receiver
2021-09-14 19:25:21 +02:00
Marco Pracucci
8006780ce2
Fix HTTP client options in SNS receiver
Signed-off-by: Marco Pracucci <marco@pracucci.com>
2021-09-14 16:25:48 +02:00
Julien Pivotto
c1b05a6085
Merge pull request #2703 from prometheus/release-0.23
Merge back Release 0.23
2021-09-14 15:38:29 +02:00
Julius Volz
5195460c95
Correctly call default silence maintenance function (#2701)
https://github.com/prometheus/alertmanager/pull/2689 introduced a
regression where the default maintenance function would no longer be
called even if no override was specified. The Alertmanager now crashes
on any silence maintenance run without this fix.

Signed-off-by: Julius Volz <julius.volz@gmail.com>
2021-09-13 19:42:48 +05:30
Julien Pivotto
44011410d7
Merge pull request #2519 from tomasfreund/opsgenie-update-message-description
Add the option to update message and description when sending alerts to opsgenie
2021-09-08 17:10:59 +02:00
gotjosh
8da517524a
Enable support for custom callbacks as part of maintenance (#2689)
* Enable support for custom callbacks as part of maintenance

This enables support for custom Maintenance callbacks as part of the periodic maintenance of silences and notification logs.
Effectively a no-op for the Alertmanager but allows downstream implementation to inject custom logic as part of it.

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

* Add tests

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

* Fix tests and remove whitespace

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

* Address review comments

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

* run go fmt

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

* Fix import ordering

Signed-off-by: gotjosh <josue.abreu@gmail.com>
2021-09-06 16:19:39 +05:30
Julien Pivotto
61046b1777
Merge pull request #2684 from roidelapluie/releasetwentythree
Release 0.23.0
2021-08-25 12:25:08 +02:00
Julien Pivotto
60a6e4cf76 Release 0.23.0
Signed-off-by: Julien Pivotto <roidelapluie@inuits.eu>
2021-08-25 12:23:34 +02:00
Julien Pivotto
d6e758ad37
Merge pull request #2680 from machinly/main
Fix some typo
2021-08-24 13:53:26 +02:00
machinly
829e884a8d Fix some typo
Signed-off-by: machinly <machinly@acm.org>
2021-08-16 16:34:53 +08:00
machinly
fbf9bee8af Fix some typo
Signed-off-by: machinly <machinly@acm.org>
2021-08-16 16:34:53 +08:00
machinly
c9abed28d2 Make the apostrophe uniform
Signed-off-by: machinly <machinly@acm.org>
2021-08-16 16:34:53 +08:00
Tomáš Freund
10e6e04376 fix imports order
Signed-off-by: Tomáš Freund <tomas.freund@datamole.cz>
2021-08-10 19:05:54 +02:00