Commit Graph

2968 Commits

Author SHA1 Message Date
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
dependabot[bot]
c1b5a371ba
Bump golang.org/x/tools from 0.12.0 to 0.13.0
Bumps [golang.org/x/tools](https://github.com/golang/tools) from 0.12.0 to 0.13.0.
- [Release notes](https://github.com/golang/tools/releases)
- [Commits](https://github.com/golang/tools/compare/v0.12.0...v0.13.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-10-02 08:15:18 +00:00
Simon Pasquier
88609d624b
Merge pull request #3543 from prometheus/dependabot/go_modules/github.com/rs/cors-1.10.1
Bump github.com/rs/cors from 1.9.0 to 1.10.1
2023-10-02 10:13:41 +02:00
Simon Pasquier
e9c2b0c26d
Merge pull request #3541 from prometheus/dependabot/go_modules/golang.org/x/net-0.15.0
Bump golang.org/x/net from 0.14.0 to 0.15.0
2023-10-02 10:12:32 +02:00
dependabot[bot]
641480717a
Bump github.com/rs/cors from 1.9.0 to 1.10.1
Bumps [github.com/rs/cors](https://github.com/rs/cors) from 1.9.0 to 1.10.1.
- [Release notes](https://github.com/rs/cors/releases)
- [Commits](https://github.com/rs/cors/compare/v1.9.0...v1.10.1)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-01 15:13:17 +00:00
dependabot[bot]
1da68ac7cc
Bump github.com/prometheus/client_golang from 1.16.0 to 1.17.0
Bumps [github.com/prometheus/client_golang](https://github.com/prometheus/client_golang) from 1.16.0 to 1.17.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.16.0...v1.17.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>
2023-10-01 15:13:12 +00:00
dependabot[bot]
0daf0bf24c
Bump golang.org/x/net from 0.14.0 to 0.15.0
Bumps [golang.org/x/net](https://github.com/golang/net) from 0.14.0 to 0.15.0.
- [Commits](https://github.com/golang/net/compare/v0.14.0...v0.15.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-01 15:13:02 +00:00
Yijie Qin
57fdd136ab
Add the route ID to uuid (#3372)
* Add the route ID to uuid

Signed-off-by: Yijie Qin <qinyijie@amazon.com>
---------

Signed-off-by: Yijie Qin <qinyijie@amazon.com>
2023-09-29 15:07:52 +01:00
George Robinson
c6be0bcabf
Remove unused function GetAlertmanagerURL (#3535)
Signed-off-by: George Robinson <george.robinson@grafana.com>
2023-09-25 11:11:56 +01:00
Jan Fajerski
b517645d95
Github actions (#3299)
* Move CI to github actions

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

* Skip email test in github action

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

* build before lint

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

---------

Signed-off-by: Jan Fajerski <jfajersk@redhat.com>
2023-09-21 17:22:17 +01:00
George Robinson
5a462df83a
Support UTF-8 label matchers: Add more acceptance tests for braces when using amtool (#3523)
* Add tests for PromQL braces when using amtool alert

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

Signed-off-by: George Robinson <george.robinson@grafana.com>
2023-09-21 13:57:11 +01:00
George Robinson
5ba9b9c7c3
Add test for PromQL braces when parsing lists of matchers (#3507)
* Add test for PromQL braces when parsing lists of matchers

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

* Use acceptance tests

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

* Add test creating silence with braces

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

---------

Signed-off-by: George Robinson <george.robinson@grafana.com>
2023-09-12 17:00:18 +01:00
Simon Pasquier
aa3e345017
Merge pull request #3516 from prometheus/remove-duplicate-msteams-integration
Remove duplicate integration from metrics
2023-09-08 17:01:13 +02:00
xenofree
5906dbc193
docs: fix typo regarding http_proxy for proxy_from_environment (#3514)
* docs: fix typo regarding http_proxy for proxy_from_environment

Signed-off-by: xenofree <35098906+xenofree@users.noreply.github.com>

* docs: add NO_PROXY environment

Co-authored-by: Simon Pasquier <spasquie@redhat.com>
Signed-off-by: xenofree <35098906+xenofree@users.noreply.github.com>

---------

Signed-off-by: xenofree <35098906+xenofree@users.noreply.github.com>
Co-authored-by: Simon Pasquier <spasquie@redhat.com>
2023-09-08 16:45:33 +02:00
gotjosh
eef3708925
Remove duplicate integration from metrics
This is harmless as the vector won't be duplicated but let's remove it anyways.

Signed-off-by: gotjosh <josue.abreu@gmail.com>
2023-09-08 15:26:36 +01:00
Colin Douch
cfe4411deb
Add the receiver name to notification metrics (#3045)
* Add receiver name as a label to notify metrics

This commit adds in a second label to the notify family of metrics
(e.g. numTotalFailedNotifications) - the receiver name. This allows
disambiguating which receiver is failing when one has many receivers
with the same integration type

Signed-off-by: sinkingpoint <colin@quirl.co.nz>

* Gate receiver names behind a feature flag

Signed-off-by: sinkingpoint <colin@quirl.co.nz>

---------

Signed-off-by: sinkingpoint <colin@quirl.co.nz>
Signed-off-by: gotjosh <josue.abreu@gmail.com>
Co-authored-by: gotjosh <josue.abreu@gmail.com>
2023-09-06 13:42:55 +01:00
George Robinson
6ce841ca22
Fix scheme required for webhook url in amtool (#3509)
* Fix scheme required for webhook url in amtool

This commit fixes issue #3505 where amtool would fail with
"error: scheme required for webhook url" when using amtool
with --alertmanager.url.

The issue here is that UnmarshalYaml for WebhookConfig checks
if the scheme is present when c.URL is non-nil. However,
UnmarshalYaml for SecretURL returns a non-nil, default value
url.URL{} if the response from api/v2/status contains <secret>
as the webhook URL.

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

* Add test for config routes test

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

---------

Signed-off-by: George Robinson <george.robinson@grafana.com>
2023-09-05 17:53:24 +01:00
Simon Pasquier
0ac174aa0f
Merge pull request #3511 from simonpasquier/merge-release-0.26
Merge release 0.26
2023-09-05 17:02:55 +02:00
Simon Pasquier
8090c43d27 Merge remote-tracking branch 'origin/release-0.26' into merge-release-0.26
Signed-off-by: Simon Pasquier <spasquie@redhat.com>
2023-09-05 16:30:25 +02:00
Simon Pasquier
474c1c2f22
Merge pull request #3291 from simonpasquier/bump-prometheus-orbs
.circleci/config.yml: bump to latest Prometheus orb
2023-09-05 15:30:31 +02:00
Simon Pasquier
87f69c4d58 .circleci/config.yml: bump to latest Prometheus orb
Signed-off-by: Simon Pasquier <spasquie@redhat.com>
2023-09-05 15:23:18 +02:00
gotjosh
0d7e127bc7
Define a RELEASE.MD for the Alertmanager Project (#3445)
* Define a `RELEASE.MD` for the Alertmanager Project

Will helps us get to a more regular cadance of releases.

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

---------

Signed-off-by: gotjosh <josue.abreu@gmail.com>
2023-09-05 14:09:34 +01:00
George Robinson
353c0a1304
Support UTF-8 label matchers: Add new parser (#3453)
* Add label matchers parser

This commit adds the new label matchers parser as proposed in #3353.
Included is a number of compliance tests comparing the grammar
supported in the new parser with the existing parser in pkg/labels.

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

Signed-off-by: George Robinson <george.robinson@grafana.com>
2023-09-05 11:32:58 +01:00
Ben Kochie
87d3ee7554
Cleanup golangci-lint errcheck (#3502)
Move the errcheck excludes list from an external file to inline in the
golangci-lint config file.

Signed-off-by: SuperQ <superq@gmail.com>
2023-09-04 09:40:11 +01:00
Simon Pasquier
314205b5e6
Merge pull request #3501 from prometheus/dependabot/go_modules/github.com/xlab/treeprint-1.2.0
Bump github.com/xlab/treeprint from 1.1.0 to 1.2.0
2023-09-04 10:33:45 +02:00
Simon Pasquier
2c6495d31a
Merge pull request #3497 from prometheus/dependabot/go_modules/github.com/prometheus/client_golang-1.16.0
Bump github.com/prometheus/client_golang from 1.15.1 to 1.16.0
2023-09-04 10:30:01 +02:00
dependabot[bot]
229e17d19f
Bump github.com/xlab/treeprint from 1.1.0 to 1.2.0
Bumps [github.com/xlab/treeprint](https://github.com/xlab/treeprint) from 1.1.0 to 1.2.0.
- [Release notes](https://github.com/xlab/treeprint/releases)
- [Commits](https://github.com/xlab/treeprint/compare/v1.1.0...v1.2.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-09-04 08:23:17 +00:00
dependabot[bot]
57f0965707
Bump github.com/prometheus/client_golang from 1.15.1 to 1.16.0
Bumps [github.com/prometheus/client_golang](https://github.com/prometheus/client_golang) from 1.15.1 to 1.16.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.15.1...v1.16.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>
2023-09-04 08:22:48 +00:00
Simon Pasquier
c5ea42b458
Merge pull request #3500 from prometheus/dependabot/go_modules/github.com/go-openapi/spec-0.20.9
Bump github.com/go-openapi/spec from 0.20.8 to 0.20.9
2023-09-04 10:22:07 +02:00
Simon Pasquier
6a1db02f8b
Merge pull request #3499 from prometheus/dependabot/go_modules/golang.org/x/tools-0.12.0
Bump golang.org/x/tools from 0.7.0 to 0.12.0
2023-09-04 10:21:04 +02:00
dependabot[bot]
e55b9272ec
Bump github.com/go-openapi/spec from 0.20.8 to 0.20.9
Bumps [github.com/go-openapi/spec](https://github.com/go-openapi/spec) from 0.20.8 to 0.20.9.
- [Commits](https://github.com/go-openapi/spec/compare/v0.20.8...v0.20.9)

---
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>
2023-09-01 15:40:39 +00:00
dependabot[bot]
979fcb1f18
Bump golang.org/x/tools from 0.7.0 to 0.12.0
Bumps [golang.org/x/tools](https://github.com/golang/tools) from 0.7.0 to 0.12.0.
- [Release notes](https://github.com/golang/tools/releases)
- [Commits](https://github.com/golang/tools/compare/v0.7.0...v0.12.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-09-01 15:40:35 +00:00
Jack
2a83643cdf
update msteams configs (#3495)
Signed-off-by: Jack Zhang <jack4zhang@gmail.com>
2023-09-01 15:03:47 +01:00
Hélia Barroso
ba303644e6
Add missing ttl in pushhover (#3474)
---------

Signed-off-by: Hélia Barroso <helia.barroso@farfetch.com>
Signed-off-by: Simon Pasquier <spasquie@redhat.com>
Co-authored-by: Simon Pasquier <spasquie@redhat.com>
2023-08-31 17:35:04 +02:00