Commit Graph

3041 Commits

Author SHA1 Message Date
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
George Robinson
0483a6ad0f Fix missing check for len(name) == 0
Signed-off-by: George Robinson <george.robinson@grafana.com>
2024-01-15 19:46:52 +00:00
George Robinson
fa6a7e6dd6
Fix inconsistent defaults in UTF-8 behavior (#3668)
This commit fixes inconsistent UTF-8 behavior if the compat package is
not initialized and feature flags are not passed to the API. This can
happen when Alertmanager is used as a package in software such
as Cortex or Mimir.

The inconsistent behavior is that Alertmanager will accept UTF-8 alerts
but reject UTF-8 configurations.

Since feature flags are optional via api.Options, we cannot force them
to be passed to api.New at compile time. Instead, it's better to defer
back to the compat package which is consistent even when not initialized.

Signed-off-by: George Robinson <george.robinson@grafana.com>
2024-01-15 10:03:51 +00:00
PrometheusBot
9ed52df5a7
Update common Prometheus files (#3666)
Signed-off-by: prombot <prometheus-team@googlegroups.com>
2024-01-09 08:56:05 +00:00
Simon Pasquier
ab2248afa7
Merge pull request #3650 from prometheus/dependabot/go_modules/github.com/prometheus/exporter-toolkit-0.11.0
Bump github.com/prometheus/exporter-toolkit from 0.10.0 to 0.11.0
2024-01-05 14:58:19 +01:00
dependabot[bot]
7c4793dd34
Bump github.com/prometheus/exporter-toolkit from 0.10.0 to 0.11.0
Bumps [github.com/prometheus/exporter-toolkit](https://github.com/prometheus/exporter-toolkit) from 0.10.0 to 0.11.0.
- [Release notes](https://github.com/prometheus/exporter-toolkit/releases)
- [Changelog](https://github.com/prometheus/exporter-toolkit/blob/master/CHANGELOG.md)
- [Commits](https://github.com/prometheus/exporter-toolkit/compare/v0.10.0...v0.11.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-01-05 13:52:14 +00:00
Simon Pasquier
710b4c914f
Merge pull request #3651 from prometheus/dependabot/go_modules/github.com/prometheus/client_golang-1.18.0
Bump github.com/prometheus/client_golang from 1.17.0 to 1.18.0
2024-01-05 14:50:27 +01:00
Simon Pasquier
9efb81d55b
Merge pull request #3654 from prometheus/dependabot/go_modules/golang.org/x/tools-0.16.1
Bump golang.org/x/tools from 0.16.0 to 0.16.1
2024-01-05 14:49:32 +01:00
George Robinson
378933649c
Add origin to logs in compat (#3662)
Signed-off-by: George Robinson <george.robinson@grafana.com>
2024-01-05 11:13:09 +00:00
George Robinson
848e2191d9
Support UTF-8 label matchers: Add metrics to matchers compat package (#3658)
* Add metrics to matchers compat package

This commit adds the following metrics to the compat package:

  alertmanager_matchers_parse
  alertmanager_matchers_disagree
  alertmanager_matchers_incompatible
  alertmanager_matchers_invalid

With a label called origin to differentiate the different sources
of inputs: the configuration file, the API, and amtool.

The disagree_total metric is incremented when an input is invalid
in both parsers, but results in different parsed representations,
then there is disagreement. This should not happen, and suggests
their is either a bug in one of the parsers or a mistake in the
backwards compatible guarantees of the matchers/parse parser.

The incompatible_total metric is incremented when an input is valid
in pkg/labels, but not the UTF-8 parser in matchers/parse. In such
case, the matcher should be updated to be compatible. This often
means adding double quotes around the right hand side of the matcher.
For example, foo="bar".

The invalid_total metric is incremented when an input is invalid
in both parsers. This was never a valid input.

The tests have been updated to check the metrics are incremented
as expected.

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

---------

Signed-off-by: George Robinson <george.robinson@grafana.com>
2024-01-05 10:21:20 +00:00
George Robinson
e772920993
Support UTF-8 label matchers: Make functions in compat package public (#3659)
* Make functions in compat package public

This commit makes functions in the compat package public. These
functions are useful for software that builds on top of the
Alertmanager that also need to migrate from classic mode to UTF-8.

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

* Fix lint

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

---------

Signed-off-by: George Robinson <george.robinson@grafana.com>
2024-01-04 17:42:58 +00:00
dependabot[bot]
bbe10a338b
Bump github.com/alecthomas/kingpin/v2 from 2.3.2 to 2.4.0 (#3653)
Bumps [github.com/alecthomas/kingpin/v2](https://github.com/alecthomas/kingpin) from 2.3.2 to 2.4.0.
- [Release notes](https://github.com/alecthomas/kingpin/releases)
- [Commits](https://github.com/alecthomas/kingpin/compare/v2.3.2...v2.4.0)

---
updated-dependencies:
- dependency-name: github.com/alecthomas/kingpin/v2
  dependency-type: direct:production
  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-01-04 11:38:01 +00:00
dependabot[bot]
747410085a
Bump github.com/go-openapi/swag from 0.22.4 to 0.22.7 (#3655)
Bumps [github.com/go-openapi/swag](https://github.com/go-openapi/swag) from 0.22.4 to 0.22.7.
- [Commits](https://github.com/go-openapi/swag/compare/v0.22.4...v0.22.7)

---
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>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-01-04 11:37:48 +00:00
PrometheusBot
3383942745
Update common Prometheus files (#3643)
Signed-off-by: prombot <prometheus-team@googlegroups.com>
2024-01-04 11:37:15 +00:00
dependabot[bot]
70abb19825
Bump golang.org/x/tools from 0.16.0 to 0.16.1
Bumps [golang.org/x/tools](https://github.com/golang/tools) from 0.16.0 to 0.16.1.
- [Release notes](https://github.com/golang/tools/releases)
- [Commits](https://github.com/golang/tools/compare/v0.16.0...v0.16.1)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-01-01 15:26:32 +00:00
dependabot[bot]
2770838332
Bump github.com/go-openapi/errors from 0.20.4 to 0.21.0
Bumps [github.com/go-openapi/errors](https://github.com/go-openapi/errors) from 0.20.4 to 0.21.0.
- [Commits](https://github.com/go-openapi/errors/compare/v0.20.4...v0.21.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-01-01 15:26:19 +00:00
dependabot[bot]
07a632467f
Bump github.com/prometheus/client_golang from 1.17.0 to 1.18.0
Bumps [github.com/prometheus/client_golang](https://github.com/prometheus/client_golang) from 1.17.0 to 1.18.0.
- [Release notes](https://github.com/prometheus/client_golang/releases)
- [Changelog](https://github.com/prometheus/client_golang/blob/main/CHANGELOG.md)
- [Commits](https://github.com/prometheus/client_golang/compare/v1.17.0...v1.18.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-01-01 15:26:15 +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
Simon Pasquier
0f2b0c8286
Merge pull request #3636 from mmorel-35/testifylint
golangci-lint: enable testifylint linter
2023-12-11 14:28:30 +01:00
Simon Pasquier
d11afddc9c
Merge pull request #3634 from prometheus/repo_sync
Synchronize common files from prometheus/prometheus
2023-12-11 11:21:31 +01:00
Simon Pasquier
a7252c7927
Merge pull request #3635 from hoffie/README-config-new-matchers
README: Use new matchers syntax in config examples
2023-12-11 10:41:43 +01:00
Matthieu MOREL
b9e347b9d1 golangci-lint: enable testifylint linter
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
2023-12-10 08:50:03 +00:00
Christian Hoffmann
61e7ec8833
README: fix spelling in route config example comment
Signed-off-by: Christian Hoffmann <mail@hoffmann-christian.info>
2023-12-08 23:23:52 +01:00
Christian Hoffmann
a127573b14
README: use 0.22+ style matcher syntax from #1023
Signed-off-by: Christian Hoffmann <mail@hoffmann-christian.info>
2023-12-08 23:22:22 +01:00
prombot
8ccdfdfe53 Update common Prometheus files
Signed-off-by: prombot <prometheus-team@googlegroups.com>
2023-12-08 17:48:12 +00:00
Ben Kochie
4a0bf2aa74
Merge pull request #3620 from mmorel-35/errors
use Go standard errors
2023-12-08 17:18:24 +01:00
Matthieu MOREL
b81bad8711 use Go standard errors
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
2023-12-08 16:44:13 +01:00
Walther Lee
3416d5a4f5
Add context reasons to notifications failed counter (#3631)
---------

Signed-off-by: Walther Lee <walther.lee@reddit.com>
Co-authored-by: Walther Lee <walther.lee@reddit.com>
Co-authored-by: Ben Kochie <superq@gmail.com>
2023-12-08 15:30:43 +01:00
Simon Pasquier
dc1466487a
Merge pull request #3584 from prometheus/dependabot/go_modules/github.com/prometheus/common-0.45.0
Bump github.com/prometheus/common from 0.44.0 to 0.45.0
2023-12-08 08:40:06 +01:00
dependabot[bot]
14c254ac83
Bump github.com/prometheus/common from 0.44.0 to 0.45.0
Bumps [github.com/prometheus/common](https://github.com/prometheus/common) from 0.44.0 to 0.45.0.
- [Release notes](https://github.com/prometheus/common/releases)
- [Commits](https://github.com/prometheus/common/compare/v0.44.0...v0.45.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>
2023-12-07 17:16:45 +00:00
Ben Kochie
0c6393b3f4
Update golanci-lint (#3632)
Update golangci-lint from upstream Prometheus and fixup issues.

Signed-off-by: SuperQ <superq@gmail.com>
2023-12-07 16:42:42 +00:00
Simon Pasquier
83486834de
Merge pull request #3627 from prometheus/dependabot/go_modules/gopkg.in/telebot.v3-3.2.1
Bump gopkg.in/telebot.v3 from 3.1.3 to 3.2.1
2023-12-04 14:32:21 +01:00
dependabot[bot]
718792d59b
Bump gopkg.in/telebot.v3 from 3.1.3 to 3.2.1
Bumps gopkg.in/telebot.v3 from 3.1.3 to 3.2.1.

---
updated-dependencies:
- dependency-name: gopkg.in/telebot.v3
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-12-04 10:36:04 +00:00
Simon Pasquier
191b6f2117
Merge pull request #3626 from prometheus/dependabot/go_modules/golang.org/x/tools-0.16.0
Bump golang.org/x/tools from 0.14.0 to 0.16.0
2023-12-04 11:34:58 +01:00
dependabot[bot]
f5310baf84
Bump golang.org/x/tools from 0.14.0 to 0.16.0
Bumps [golang.org/x/tools](https://github.com/golang/tools) from 0.14.0 to 0.16.0.
- [Release notes](https://github.com/golang/tools/releases)
- [Commits](https://github.com/golang/tools/compare/v0.14.0...v0.16.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>
2023-12-01 15:54:34 +00:00
Simon Pasquier
b82df1dc9b
Merge pull request #3628 from prometheus/dependabot/go_modules/golang.org/x/mod-0.14.0
Bump golang.org/x/mod from 0.13.0 to 0.14.0
2023-12-01 16:53:35 +01:00
Simon Pasquier
eae70acb1d
Merge pull request #3629 from prometheus/dependabot/go_modules/github.com/hashicorp/go-sockaddr-1.0.6
Bump github.com/hashicorp/go-sockaddr from 1.0.2 to 1.0.6
2023-12-01 16:52:51 +01:00