Commit Graph

3077 Commits

Author SHA1 Message Date
Philipp Stehle 81c3e3bae5
`amtool template render` improve default data (#3725)
Signed-off-by: Philipp Stehle <anderschwiedu@gmail.com>
2024-02-28 11:10:25 +00:00
Luca Kröger efa801faf7
fix discord & msteams webhook url configuration (#3728)
Signed-off-by: Luca Kröger <l.kroeger01@gmail.com>
2024-02-19 16:53:59 +00:00
gotjosh 80b3cb072f
Notify: Several improvements around the `suppressed_total` metric and logs for muting. (#3723) 2024-02-15 11:12:58 +00:00
gotjosh b7d4c4ab86
Release: Cut 0.27.0-rc.0 (#3721)
* Release: Cut 0.27.0-rc.0

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

* small fixes

- typo in respond
- add PR numbers for UTF-8

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

* more worthsmithing

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

* Fix flaky test TestClusterJoinAndReconnect/TestTLSConnection (#3722)

wait until `p2.Status()` returns because it blocks until we're ready - that way, we're guaranteed to know that the cluster size is 2.

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

---------

Signed-off-by: gotjosh <josue.abreu@gmail.com>
2024-02-14 11:27:10 +00:00
gotjosh d352d16e27
Fix flaky test TestClusterJoinAndReconnect/TestTLSConnection (#3722)
wait until `p2.Status()` returns because it blocks until we're ready - that way, we're guaranteed to know that the cluster size is 2.

Signed-off-by: gotjosh <josue.abreu@gmail.com>
2024-02-14 11:18:28 +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
George Robinson 4d6ddd25c9
Fix panic in acceptance tests (#3592)
* Fix panic in acceptance tests

This commit attempts to address a panic that occurs in acceptance
tests if a server in the cluster fails to start.

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

* Remove started and check am.cmd.Process != nil

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

---------

Signed-off-by: George Robinson <george.robinson@grafana.com>
2024-02-13 15:38:44 +00:00
George Robinson 604d442f30
Fix log line in featurecontrol (#3719)
This commit fixes a log line in the featurecontrol package which
should be "UTF-8 strict mode" and not "UTF-8 mode".

Signed-off-by: George Robinson <george.robinson@grafana.com>
2024-02-13 14:35:03 +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
George Robinson 44d5f70c3b
Fix a small number of inconsistencies in compat package logging (#3718)
This commit fixes a small number of inconsistencies in the compat
package logging. It now has consistent use of classic matchers
parser and UTF-8 matchers parser, instead of old matchers parser
and new matchers parser.

Signed-off-by: George Robinson <george.robinson@grafana.com>
2024-02-13 11:37:42 +00:00
TJ Hoplock f00025d037
feat: add counter to track alerts dropped outside of time_intervals (#3565)
* feat: add counter to track alerts dropped outside of time_intervals

Addresses: #3512

This adds a new counter metric `alertmanager_alerts_supressed_total`
that is incremented by `len(alerts)` when an alert is suppressed for
being outside of a time_interval, ie inside of a mute_time_intervals or
outside of an active_time_intervals.

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

* test: add time interval suppression metric checks for notify

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

* test: fix failure message log values in notifier

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

* ref: address PR feedback for #3565

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

* fix: track suppressed notifications metric for inhibit/silence

Based on PR feedback:

https://github.com/prometheus/alertmanager/pull/3565/files#r1393068026

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

* fix: broken notifier tests

- fixed metric count check to properly check the diff between
  input/output notifications from the suppression to compare to suppression
metric, was previously inverted to compare to how many notifications it
suppressed.
- stopped using `Reset()` to compare collection counts between the
  multiple stages that are executed in `TestMuteStageWithSilences()`.
the intent was to compare a clean metric collection after each stage
execution, but the final stage where all silences are lifted results in
no metric being created in the test, causing `prom_testutil.ToFloat64()`
to panic. changed to separate vars to check counts between each stage,
with care to consider prior counts.

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

* rename metric and add constants

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

---------

Signed-off-by: TJ Hoplock <t.hoplock@gmail.com>
Signed-off-by: gotjosh <josue.abreu@gmail.com>
Co-authored-by: gotjosh <josue.abreu@gmail.com>
2024-02-13 11:17:24 +00:00
George Robinson f69a508665
Remove metrics from compat package (#3714)
This commit removes the metrics from the compat package
in favour of the existing logging and the additional tools
at hand, such as amtool, to validate Alertmanager configurations.

Due to the global nature of the compat package, a consequence
of config.Load, these metrics have proven to be less useful
in practice than expected, both in Alertmanager and other projects
such as Mimir.

There are a number of reasons for this:

1. Because the compat package is global, these metrics cannot be
   reset each time config.Load is called, as in multi-tenant
   projects like Mimir loading a config for one tenant would reset
   the metrics for all tenants. This is also the reason the metrics
   are counters and not gauges.

2. Since the metrics are counters, it is difficult to create
   meaningful dashboards for Alertmanager as, unlike in Mimir,
   configurations are not reloaded at fixed intervals, and as such,
   operators cannot use rate to track configuration changes
   over time.

In Alertmanager, there are much better tools available to validate
that an Alertmanager configuration is compatible with the UTF-8
parser, including both the existing logging from Alertmanager
server and amtool check-config.

In other projects like Mimir, we can track configurations for
individual tenants using log aggregation and storage systems
such as Loki. This gives operators far more information than
what is possible with the metrics, including the timestamp,
input and ID of tenant configurations that are incompatible
or have disagreement.

Signed-off-by: George Robinson <george.robinson@grafana.com>
2024-02-08 09:59:03 +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
PrometheusBot 5eca7d5170
Update common Prometheus files (#3712)
Signed-off-by: prombot <prometheus-team@googlegroups.com>
2024-02-07 09:43:19 +00:00
George Robinson 6d02051f2b
Do not register compat metrics in amtool (#3713)
There is no need to register these metrics in amtool, so use
compat.NewMetrics(nil) instead of compat.RegisteredMetrics.

Signed-off-by: George Robinson <george.robinson@grafana.com>
2024-02-07 09:43:03 +00:00
Simon Pasquier e1f6a0e7ae
Merge pull request #3704 from prometheus/dependabot/go_modules/github.com/go-openapi/validate-0.23.0
Bump github.com/go-openapi/validate from 0.22.1 to 0.23.0
2024-02-06 16:53:02 +01:00
dependabot[bot] 8e7f3d2366
Bump ts-loader from 9.4.2 to 9.5.1 in /ui/react-app (#3688)
Bumps [ts-loader](https://github.com/TypeStrong/ts-loader) from 9.4.2 to 9.5.1.
- [Release notes](https://github.com/TypeStrong/ts-loader/releases)
- [Changelog](https://github.com/TypeStrong/ts-loader/blob/main/CHANGELOG.md)
- [Commits](https://github.com/TypeStrong/ts-loader/compare/v9.4.2...v9.5.1)

---
updated-dependencies:
- dependency-name: ts-loader
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-02-06 15:50:34 +00:00
dependabot[bot] e8084744f0
Bump style-loader from 3.3.1 to 3.3.4 in /ui/react-app (#3689)
Bumps [style-loader](https://github.com/webpack-contrib/style-loader) from 3.3.1 to 3.3.4.
- [Release notes](https://github.com/webpack-contrib/style-loader/releases)
- [Changelog](https://github.com/webpack-contrib/style-loader/blob/v3.3.4/CHANGELOG.md)
- [Commits](https://github.com/webpack-contrib/style-loader/compare/v3.3.1...v3.3.4)

---
updated-dependencies:
- dependency-name: style-loader
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-02-06 15:36:31 +00:00
dependabot[bot] 0b40ac1fd6
Bump eslint from 8.35.0 to 8.56.0 in /ui/react-app (#3692)
Bumps [eslint](https://github.com/eslint/eslint) from 8.35.0 to 8.56.0.
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md)
- [Commits](https://github.com/eslint/eslint/compare/v8.35.0...v8.56.0)

---
updated-dependencies:
- dependency-name: eslint
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-02-06 15:36:22 +00:00
dependabot[bot] d5d89b3fc0
Bump eslint-webpack-plugin from 3.2.0 to 4.0.1 in /ui/react-app (#3695)
Bumps [eslint-webpack-plugin](https://github.com/webpack-contrib/eslint-webpack-plugin) from 3.2.0 to 4.0.1.
- [Release notes](https://github.com/webpack-contrib/eslint-webpack-plugin/releases)
- [Changelog](https://github.com/webpack-contrib/eslint-webpack-plugin/blob/master/CHANGELOG.md)
- [Commits](https://github.com/webpack-contrib/eslint-webpack-plugin/compare/v3.2.0...v4.0.1)

---
updated-dependencies:
- dependency-name: eslint-webpack-plugin
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-02-06 15:36:13 +00:00
dependabot[bot] 946a3b4e77
Bump @types/react from 18.0.28 to 18.2.51 in /ui/react-app (#3706)
Bumps [@types/react](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/react) from 18.0.28 to 18.2.51.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/react)

---
updated-dependencies:
- dependency-name: "@types/react"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-02-06 15:36:04 +00:00
Simon Pasquier d4deb6d9ed
Merge pull request #3703 from prometheus/dependabot/go_modules/github.com/go-openapi/analysis-0.22.2
Bump github.com/go-openapi/analysis from 0.22.0 to 0.22.2
2024-02-01 17:44:23 +01:00
dependabot[bot] 9ef2bfb9ba
Bump github.com/go-openapi/analysis from 0.22.0 to 0.22.2
Bumps [github.com/go-openapi/analysis](https://github.com/go-openapi/analysis) from 0.22.0 to 0.22.2.
- [Commits](https://github.com/go-openapi/analysis/compare/v0.22.0...v0.22.2)

---
updated-dependencies:
- dependency-name: github.com/go-openapi/analysis
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-02-01 16:39:07 +00:00
dependabot[bot] b9e5d1cd3c
Bump github.com/go-openapi/validate from 0.22.1 to 0.23.0
Bumps [github.com/go-openapi/validate](https://github.com/go-openapi/validate) from 0.22.1 to 0.23.0.
- [Commits](https://github.com/go-openapi/validate/compare/v0.22.1...v0.23.0)

---
updated-dependencies:
- dependency-name: github.com/go-openapi/validate
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-02-01 16:38:12 +00:00
Simon Pasquier 4d150b0cc4
Merge pull request #3702 from prometheus/dependabot/go_modules/github.com/go-openapi/runtime-0.27.1
Bump github.com/go-openapi/runtime from 0.26.0 to 0.27.1
2024-02-01 17:37:16 +01:00
dependabot[bot] 4d1743cfb3
Bump github.com/go-openapi/runtime from 0.26.0 to 0.27.1
Bumps [github.com/go-openapi/runtime](https://github.com/go-openapi/runtime) from 0.26.0 to 0.27.1.
- [Release notes](https://github.com/go-openapi/runtime/releases)
- [Commits](https://github.com/go-openapi/runtime/compare/v0.26.0...v0.27.1)

---
updated-dependencies:
- dependency-name: github.com/go-openapi/runtime
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-02-01 16:27:38 +00:00
Simon Pasquier 185255698e
Merge pull request #3705 from prometheus/dependabot/go_modules/github.com/go-openapi/spec-0.20.14
Bump github.com/go-openapi/spec from 0.20.13 to 0.20.14
2024-02-01 17:26:56 +01:00
Simon Pasquier 99262b68eb
Merge pull request #3701 from prometheus/dependabot/go_modules/github.com/aws/aws-sdk-go-1.50.8
Bump github.com/aws/aws-sdk-go from 1.47.0 to 1.50.8
2024-02-01 17:26:36 +01:00
dependabot[bot] fbd9856922
Bump github.com/go-openapi/spec from 0.20.13 to 0.20.14
Bumps [github.com/go-openapi/spec](https://github.com/go-openapi/spec) from 0.20.13 to 0.20.14.
- [Commits](https://github.com/go-openapi/spec/compare/v0.20.13...v0.20.14)

---
updated-dependencies:
- dependency-name: github.com/go-openapi/spec
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-02-01 15:06:57 +00:00
dependabot[bot] 982898fd8b
Bump github.com/aws/aws-sdk-go from 1.47.0 to 1.50.8
Bumps [github.com/aws/aws-sdk-go](https://github.com/aws/aws-sdk-go) from 1.47.0 to 1.50.8.
- [Release notes](https://github.com/aws/aws-sdk-go/releases)
- [Commits](https://github.com/aws/aws-sdk-go/compare/v1.47.0...v1.50.8)

---
updated-dependencies:
- dependency-name: github.com/aws/aws-sdk-go
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-02-01 15:06:00 +00:00
Simon Pasquier f708f32ac7
Merge pull request #3690 from prometheus/dependabot/go_modules/golang.org/x/tools-0.17.0
Bump golang.org/x/tools from 0.16.1 to 0.17.0
2024-01-31 16:15:31 +01:00
dependabot[bot] f98fc96b7c
Bump golang.org/x/tools from 0.16.1 to 0.17.0
Bumps [golang.org/x/tools](https://github.com/golang/tools) from 0.16.1 to 0.17.0.
- [Release notes](https://github.com/golang/tools/releases)
- [Commits](https://github.com/golang/tools/compare/v0.16.1...v0.17.0)

---
updated-dependencies:
- dependency-name: golang.org/x/tools
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-01-31 15:10:14 +00:00
Simon Pasquier 066f2723c1
Merge pull request #3696 from prometheus/dependabot/go_modules/github.com/go-openapi/loads-0.21.5
Bump github.com/go-openapi/loads from 0.21.2 to 0.21.5
2024-01-31 16:05:10 +01:00
dependabot[bot] 675a86107a
Bump github.com/go-openapi/loads from 0.21.2 to 0.21.5
Bumps [github.com/go-openapi/loads](https://github.com/go-openapi/loads) from 0.21.2 to 0.21.5.
- [Commits](https://github.com/go-openapi/loads/compare/v0.21.2...v0.21.5)

---
updated-dependencies:
- dependency-name: github.com/go-openapi/loads
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-01-31 14:59:52 +00:00
Simon Pasquier a795523a7b
Merge pull request #3694 from prometheus/dependabot/go_modules/github.com/go-openapi/strfmt-0.22.0
Bump github.com/go-openapi/strfmt from 0.21.7 to 0.22.0
2024-01-31 15:58:57 +01:00
dependabot[bot] e060efbc32
Bump github.com/go-openapi/strfmt from 0.21.7 to 0.22.0
Bumps [github.com/go-openapi/strfmt](https://github.com/go-openapi/strfmt) from 0.21.7 to 0.22.0.
- [Commits](https://github.com/go-openapi/strfmt/compare/v0.21.7...v0.22.0)

---
updated-dependencies:
- dependency-name: github.com/go-openapi/strfmt
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-01-31 14:53:44 +00:00
Simon Pasquier 561ccdf290
Merge pull request #3693 from prometheus/dependabot/go_modules/github.com/prometheus/common-0.46.0
Bump github.com/prometheus/common from 0.45.0 to 0.46.0
2024-01-31 15:52:27 +01:00
Simon Pasquier f952676051
Merge pull request #3697 from prometheus/dependabot/go_modules/github.com/go-openapi/swag-0.22.9
Bump github.com/go-openapi/swag from 0.22.7 to 0.22.9
2024-01-31 15:44:52 +01:00
dependabot[bot] 666ffa778a
Bump github.com/go-openapi/swag from 0.22.7 to 0.22.9
Bumps [github.com/go-openapi/swag](https://github.com/go-openapi/swag) from 0.22.7 to 0.22.9.
- [Commits](https://github.com/go-openapi/swag/compare/v0.22.7...v0.22.9)

---
updated-dependencies:
- dependency-name: github.com/go-openapi/swag
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-01-30 11:20:10 +00:00
dependabot[bot] b34f4239df
Bump github.com/prometheus/common from 0.45.0 to 0.46.0
Bumps [github.com/prometheus/common](https://github.com/prometheus/common) from 0.45.0 to 0.46.0.
- [Release notes](https://github.com/prometheus/common/releases)
- [Commits](https://github.com/prometheus/common/compare/v0.45.0...v0.46.0)

---
updated-dependencies:
- dependency-name: github.com/prometheus/common
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-01-30 11:19:56 +00:00
Ben Kochie 355c6df229
Merge pull request #3687 from prometheus/superq/nmp_updates
Enable Dependabot for React UI
2024-01-30 12:19:08 +01:00
SuperQ 73d1aa50cc
Enable Dependabot for React UI
Add a monthly dependabot update for NPM packages in the new React UI.

Signed-off-by: SuperQ <superq@gmail.com>
2024-01-30 11:53:55 +01:00
Ben Kochie 5658f8cfb5
Merge pull request #3652 from prometheus/dependabot/go_modules/github.com/go-openapi/errors-0.21.0
Bump github.com/go-openapi/errors from 0.20.4 to 0.21.0
2024-01-30 11:48:48 +01:00
George Robinson cab8ecbc95
Change compat metrics to counters (#3686)
This commit changes the metrics in the compat package from gauges
to counters. The reason for this is that in some cases the gauge
should behave like a gauge (i.e. loading configurations) but in
other cases should behave like a counter (i.e. HTTP requests).

Second, because the compat package is a global package
(due to how config.Load works), in tenanted systems like Cortex
and Mimir it was non-trivial to reset the gauges per tenant
each time their configuration was reloaded.

Instead, it's easier to compute the rate of increase as 0 instead
of check that the gauge is 0 to know if UTF-8 strict mode can be
enabled.

Signed-off-by: George Robinson <george.robinson@grafana.com>
2024-01-30 10:22:00 +00:00
George Robinson c97b7f1b27
Fix nil error in warn logs about incompatible matchers (#3683)
This commit fixes a small bug in the warning logs for incompatible
matchers where the error from the UTF-8 parser was logged as nil.

Signed-off-by: George Robinson <george.robinson@grafana.com>
2024-01-29 18:04:52 +00:00
George Robinson 1da134aa30
Add metric for inhibit rules (#3681)
* Add metric for inhibit rules

This commit adds a new metric called alertmanager_inhibit_rules.
It is identical to the alertmanager_integrations and
alertmanager_receivers metrics that are present in the current
and previous versions.

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

* Rename metric and variable

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

---------

Signed-off-by: George Robinson <george.robinson@grafana.com>
2024-01-23 16:29:14 +00:00
Simon Pasquier 7a3c189315
Merge pull request #3680 from giorgiga/trimsmtppasswordfilecontents
Newlines in smtp password file are now ignored
2024-01-23 15:25:10 +01:00
Giorgio Gallo 4271a77bd0
Newlines in smtp password file are now ignored 2024-01-22 21:26:18 +01:00
George Robinson f92a08d073
Remove unused feature flags (#3676)
This commit removes some code that should have been removed in #3668.
The FeatureFlags in silence.Options are no longer used but were
still initialized. These had a no-op effect.

Signed-off-by: George Robinson <george.robinson@grafana.com>
2024-01-19 10:43:50 +00:00
Simon Pasquier 30fa9cd44b
Merge pull request #3671 from grobinson-grafana/grobinson/fix-missing-check-valid-labels
Fix missing check for len(name) == 0
2024-01-16 10:05:02 +01:00