Commit Graph

3001 Commits

Author SHA1 Message Date
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
dependabot[bot]
63c3b26240
Bump github.com/hashicorp/go-sockaddr from 1.0.2 to 1.0.6
Bumps [github.com/hashicorp/go-sockaddr](https://github.com/hashicorp/go-sockaddr) from 1.0.2 to 1.0.6.
- [Commits](https://github.com/hashicorp/go-sockaddr/compare/v1.0.2...v1.0.6)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-12-01 15:28:36 +00:00
dependabot[bot]
2c635c820d
Bump golang.org/x/mod from 0.13.0 to 0.14.0
Bumps [golang.org/x/mod](https://github.com/golang/mod) from 0.13.0 to 0.14.0.
- [Commits](https://github.com/golang/mod/compare/v0.13.0...v0.14.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-12-01 15:27:24 +00:00
George Robinson
4494abfce4
Fix UTF-8 not supported in group_by (#3619)
* Fix UTF-8 not supported in group_by

This commit fixes missing UTF-8 support in the group_by for routes.

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

Signed-off-by: George Robinson <george.robinson@grafana.com>
2023-11-24 11:26:39 +00:00
George Robinson
70bd5dad98
Support UTF-8 label matchers: Use compat package in Alertmanager server (#3567)
* Support UTF-8 label matchers: Use compat package in Alertmanager server

This pull request adds use of the compat package in Alertmanager server that will allow users to switch between the new matchers/parse parser and the old pkg/labels parser. The new matchers/parse parser uses a fallback mechanism where if the input cannot be parsed in the new parser it then attempts to use the old parser. If an input is parsed in the old parser but not the new parser then a warning log is emitted.

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

---------

Signed-off-by: George Robinson <george.robinson@grafana.com>
2023-11-24 10:01:40 +00:00
gotjosh
b4f7027908
Deprecate and remove api/v1/ (#2970)
* Deprecate and remove api/v1/

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

Signed-off-by: gotjosh <josue.abreu@gmail.com>
2023-11-24 09:06:04 +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
gotjosh
aaf9490576
API: Allow the Silences API to use their own 400 response (#3610)
There's no change to the logic here - it just stroke me as odd that we were reusing the response from alerting groups in the silences call when it's pretty simple to add a new one in the API description.

This is more accurate as well, as this will be used to power the documentation.

Signed-off-by: gotjosh <josue.abreu@gmail.com>
2023-11-22 10:25:27 +00:00
George Robinson
ca5089d33e
Support UTF-8 label matchers: Rename feature flags and make package public (#3604)
* Rename feature flags and make package public

This commit renames the feature flags "classic-matchers-parsing"
and "utf8-matchers-parsing" to "classic-matchers" and "utf8-matchers".
This better represents their use, for example, when validating
both alerts and silences created via the API.

It also makes the feature flags package public for two reasons:

1. AllowedFlags is a public variable
2. We would rather use these consts in Mimir then have to hardcode
   the strings ourselves, and be subject to breaking changes in future

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

Signed-off-by: George Robinson <george.robinson@grafana.com>
2023-11-17 20:07:54 +00:00
Tomas Kozak
d2b6692f2c
Reflect Discord's max length message limits (#3597)
* Reflect Discord's max length message limits

Signed-off-by: Tomas Kozak <kozak@talko.cz>

* Fix log key name

Signed-off-by: Tomas Kozak <kozak@talko.cz>

---------

Signed-off-by: Tomas Kozak <kozak@talko.cz>
2023-11-15 07:37:47 +00:00
George Robinson
9dbc8b6b91
Support UTF-8 label matchers: Update Stringer for non-Prometheus compliant label names (#3580)
* Update Stringer for non-Prometheus compliant label names

This commit updates the String method to print non-Prometheus
compliant label names in a format that can be parsed in the
UTF-8 parser. Such inputs are never valid in the classic parser.
If the label name is Prometheus compliant, it is still printed
unquoted.

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

---------

Signed-off-by: George Robinson <george.robinson@grafana.com>
2023-11-14 16:25:13 +00:00
Simon Pasquier
716830a56f
Merge pull request #3599 from cr7258/fix-label-mismatch
fix: label mismatch for alertmanager_notifications_failed_total
2023-11-14 11:39:36 +01:00
George Robinson
f96ba1b58f
unquote should check for invalid UTF-8 code points (#3595)
Quoted tokens can contain both UTF-8 byte and code point literals
that should be interpreted when quoted. However, we need to check
that the interpreted literals are valid UTF-8 code points or not.
This now happens in unquote.

Signed-off-by: George Robinson <george.robinson@grafana.com>
2023-11-13 16:31:15 +00:00
chengzw
aff09c28dc fix label mismatch for alertmanager_notifications_failed_total
Signed-off-by: chengzw <chengzw258@163.com>
2023-11-11 22:26:38 +08:00
George Robinson
ce6efba023
Update go.mod to require Go 1.21 (#3581)
* Update circleci/go to 1.9.0

---------

Signed-off-by: George Robinson <george.robinson@grafana.com>
2023-11-06 14:16:57 +01:00
Alexander Weaver
fdea7e731c
Isolate react-app package (#3589)
* Isolate react-app package

Signed-off-by: Alex Weaver <weaver.alex.d@gmail.com>

---------

Signed-off-by: Alex Weaver <weaver.alex.d@gmail.com>
2023-11-03 14:50:06 +00:00
Simon Pasquier
861c3d87c7
Merge pull request #3587 from prometheus/dependabot/go_modules/golang.org/x/tools-0.14.0
Bump golang.org/x/tools from 0.13.0 to 0.14.0
2023-11-02 15:02:06 +01:00
dependabot[bot]
2ffdc95721
Bump golang.org/x/tools from 0.13.0 to 0.14.0
Bumps [golang.org/x/tools](https://github.com/golang/tools) from 0.13.0 to 0.14.0.
- [Release notes](https://github.com/golang/tools/releases)
- [Commits](https://github.com/golang/tools/compare/v0.13.0...v0.14.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-11-02 13:45:48 +00:00
Simon Pasquier
0e02f89688
Merge pull request #3583 from prometheus/dependabot/go_modules/github.com/aws/aws-sdk-go-1.47.0
Bump github.com/aws/aws-sdk-go from 1.44.317 to 1.47.0
2023-11-02 14:44:28 +01:00
Simon Pasquier
55ab6d2894
Merge pull request #3586 from prometheus/dependabot/go_modules/github.com/go-openapi/swag-0.22.4
Bump github.com/go-openapi/swag from 0.22.3 to 0.22.4
2023-11-02 14:39:38 +01:00
Simon Pasquier
9fcdc1b80c
Merge pull request #3585 from prometheus/dependabot/go_modules/github.com/hashicorp/golang-lru/v2-2.0.7
Bump github.com/hashicorp/golang-lru/v2 from 2.0.2 to 2.0.7
2023-11-02 14:37:39 +01:00
dependabot[bot]
c4cd73c3b6
Bump github.com/go-openapi/swag from 0.22.3 to 0.22.4
Bumps [github.com/go-openapi/swag](https://github.com/go-openapi/swag) from 0.22.3 to 0.22.4.
- [Commits](https://github.com/go-openapi/swag/compare/v0.22.3...v0.22.4)

---
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>
2023-11-01 15:44:36 +00:00
dependabot[bot]
9aa15e667b
Bump github.com/hashicorp/golang-lru/v2 from 2.0.2 to 2.0.7
Bumps [github.com/hashicorp/golang-lru/v2](https://github.com/hashicorp/golang-lru) from 2.0.2 to 2.0.7.
- [Release notes](https://github.com/hashicorp/golang-lru/releases)
- [Commits](https://github.com/hashicorp/golang-lru/compare/v2.0.2...v2.0.7)

---
updated-dependencies:
- dependency-name: github.com/hashicorp/golang-lru/v2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-11-01 15:44:32 +00:00
dependabot[bot]
91fa40b2c0
Bump github.com/aws/aws-sdk-go from 1.44.317 to 1.47.0
Bumps [github.com/aws/aws-sdk-go](https://github.com/aws/aws-sdk-go) from 1.44.317 to 1.47.0.
- [Release notes](https://github.com/aws/aws-sdk-go/releases)
- [Commits](https://github.com/aws/aws-sdk-go/compare/v1.44.317...v1.47.0)

---
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>
2023-11-01 15:44:18 +00:00
George Robinson
7cdecbf6ee
Remove braces from suggestion (#3568)
This commit removes the open and close braces from the suggestion
as braces do not make sense in the configuration file. This does
not change the behavior of the suggestion whatsoever as these
are optional.

Signed-off-by: George Robinson <george.robinson@grafana.com>
2023-10-30 14:30:19 +00:00
George Robinson
b5b5a1df3d
Support UTF-8 label matchers: Do not allow unquoted escape sequences (#3571)
* Do not allow unquoted escape sequences

This commit updates the matchers parser to reject unquoted
openmetrics escape sequences. As an example, foo=bar\n
will no longer parse, and must instead be written as
foo="bar\n". This avoids an issue where the input is valid
in both the matchers and classic parsers, but results
in two different parsings.

---------

Signed-off-by: George Robinson <george.robinson@grafana.com>
2023-10-30 13:56:54 +00:00
George Robinson
8512285e54
Support UTF-8 label matchers: Update compliance tests (#3569)
* Update compliance tests

This commit updates compliance tests to include openmetrics
escape sequences that are not valid in the UTF-8 matchers parser.

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

* Add tests for openmetrics escape sequences

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

---------

Signed-off-by: George Robinson <george.robinson@grafana.com>
2023-10-25 09:52:17 +01:00
George Robinson
d2501323d2
Add debug logs for muted alerts (#3558)
This commit adds debug logs to MuteStage that logs when an alert
is muted. This can help operators root cause missing notifications
when alerts are silenced by mistake or purpose but then forgotten
about.

Signed-off-by: George Robinson <george.robinson@grafana.com>
2023-10-24 18:00:38 +01:00
Simon Pasquier
280a742b76
Merge pull request #3563 from prometheus/bump-go-swagger-to-latest-stable
Bump: go-swagger to latest stable
2023-10-19 17:06:10 +02:00
gotjosh
2ec6b89aa7
Bump: go-swagger to latest stable
Bumps the API spec/client generation util of `go-swagger` from 0.30.2 to 0.30.5 which is the latest stable.

Signed-off-by: gotjosh <josue.abreu@gmail.com>
2023-10-19 12:11:29 +01:00
George Robinson
16aa996c4f
Support UTF-8 label matchers: Add compat package with feature flag and use in amtool (#3483)
* Add adapter package for parser feature flag

This commit adds the compat package allowing users to switch
between the new matchers/parse parser and the old pkg/labels parser.
The new matchers/parse parser uses a fallback mechanism where if
the input cannot be parsed in the new parser it then attempts to
use the old parser. If an input is parsed in the old parser but
not the new parser, then a warning log is emitted.

---------

Signed-off-by: George Robinson <george.robinson@grafana.com>
2023-10-19 12:00:01 +01:00
Alexander Weaver
412f06255a
Separate and export BuildReceiverIntegrations (#3553)
* Move and export BuildReceiverIntegrations

Signed-off-by: Alex Weaver <weaver.alex.d@gmail.com>

---------

Signed-off-by: Alex Weaver <weaver.alex.d@gmail.com>
2023-10-17 14:45:44 +01:00
George Robinson
98290c3349
Add duration to the notify success message (#3559)
This commit updates Alertmanager to add a duration to the notify
success message. It complements the existing histogram to offer
fine-grained information about notification attempts. This can be
useful when debuggin duplicate notifications, for example, when
the duration exceeds peer_timeout.

Signed-off-by: George Robinson <george.robinson@grafana.com>
2023-10-17 09:50:33 +01:00
Simon Pasquier
bdcff29194
Merge pull request #3561 from slashpai/cve_fix
fix: Bump golang.org/x/net to v0.17.0
2023-10-17 09:42:12 +02:00
Simon Pasquier
2c14fa3fb3
Merge pull request #3542 from prometheus/dependabot/go_modules/github.com/prometheus/client_golang-1.17.0
Bump github.com/prometheus/client_golang from 1.16.0 to 1.17.0
2023-10-17 09:27:49 +02:00
Jayapriya Pai
9e26979dc9
fix: Bump golang.org/x/net to v0.17.0
Address CVE-2023-39325

Signed-off-by: Jayapriya Pai <janantha@redhat.com>
2023-10-17 07:40:37 +05:30
gotjosh
acb58400fd
Refactor: Move inTimeIntervals from notify to timeinterval (#3556)
* Refactor: Move `inTimeIntervals` from `notify` to `timeinterval`

There's absolutely no change of functionality here and I've expanded coverage for similar logic in both places.
---------

Signed-off-by: gotjosh <josue.abreu@gmail.com>
2023-10-13 14:15:05 +01: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
Jan Fajerski
d7b865d6cc
actions: cross build in ci and fix publish (#3533)
* actions: cross build in ci and fix publish

Signed-off-by: Jan Fajerski <jfajersk@redhat.com>

* actions: build before release publishing

Signed-off-by: Jan Fajerski <jfajersk@redhat.com>

---------

Signed-off-by: Jan Fajerski <jfajersk@redhat.com>
2023-10-12 10:43:30 +01:00
Simon Pasquier
e92d29d861
Merge pull request #3540 from prometheus/dependabot/go_modules/golang.org/x/tools-0.13.0
Bump golang.org/x/tools from 0.12.0 to 0.13.0
2023-10-02 10:21:22 +02:00