Commit Graph

2201 Commits

Author SHA1 Message Date
Björn Rabenstein
023937679f
Catch unknown matcher types in gossipped silences (#2484)
This has been discussed in #2479. Even if the conclusion there was
that we don't need this in a bugfix release, it's still better to have
this kind of robustness. So this introduces the same check into the
main branch.

Signed-off-by: beorn7 <beorn@grafana.com>
2021-02-10 12:02:56 +01:00
Simon Pasquier
23a7f89398
Update github.com/gogo/protobuf to v1.3.2 (#2478)
Fix for CVE-2021-3121

Signed-off-by: Simon Pasquier <spasquie@redhat.com>
2021-02-09 16:49:07 +01:00
Simon Pasquier
45db1a1163
ui: update versions for the Elm components (#2482)
The frontend CI job started to fail for some obscure reasons, most
probably because we use a very old version of NodeJS.

To make it work again, this change does the following:

* Bump to the latest NodeJS LTS version and use the buster variant.
* Use Yarn instead of npm to install Javascript packages.
* Bump Elm components to their latest versions.

There should be no functional change to the UI code.

Signed-off-by: Simon Pasquier <spasquie@redhat.com>
2021-02-09 15:47:54 +01:00
gotjosh
e6a1bede89
Make MaxGossipPacketSize public (#2475)
Downstream implementations might want to configure it.

Signed-off-by: gotjosh <josue@grafana.com>
2021-02-05 18:06:47 +01:00
Gábor Lipták
f2f7a72813
Add Docker command to README (#2465)
Signed-off-by: Gábor Lipták <gliptak@gmail.com>
2021-01-29 14:59:51 +01:00
Jack Baldry
bf94d58d56
fix(notify/victorops): Catch routing_key templating errors (#2467)
* test(notify/victorops): Add test for templating errors

Signed-off-by: Jack Baldry <jack.baldry@grafana.com>

* fix(notify/victorops): Catch routing_key templating errors

Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
2021-01-29 14:40:33 +01:00
treydock
e6824a3110
Fix extended printing of regex sign (#2445)
Signed-off-by: Trey Dockendorf <tdockendorf@osc.edu>
2021-01-27 11:06:47 +01:00
Julien Pivotto
8ebd888488
Support https (#2446)
Signed-off-by: Julien Pivotto <roidelapluie@inuits.eu>
2021-01-27 10:52:08 +01:00
Björn Rabenstein
f328dc6f84
Merge pull request #2444 from mucamaca/trailing-ws
remove trailing whitespace in docs
2021-01-25 14:50:00 +01:00
Björn Rabenstein
165e2d012d
Merge pull request #2456 from vladimiroff/rm-types-matcher
Replace types.Matcher(s)? with labels.Matcher(s)?
2021-01-23 13:11:40 +01:00
Björn Rabenstein
c3c1aefbc2
Merge pull request #2463 from prometheus/beorn7/config
Add JSON marshaling to config.Matchers
2021-01-22 19:46:48 +01:00
beorn7
7561e7643c Add JSON marshaling to config.Matchers
I have found out that we still need this for the v1 API (and possibly
elsewhere).

Signed-off-by: beorn7 <beorn@grafana.com>
2021-01-22 16:44:23 +01:00
Kiril Vladimirov
f85651f2c4 Marshal Matcher to JSON for API v1 compatibility
Signed-off-by: Kiril Vladimirov <kiril@vladimiroff.org>
2021-01-22 17:03:27 +02:00
Kiril Vladimirov
97e0c754c0 Remove NewRegexpMatcher and panic on error instead
Signed-off-by: Kiril Vladimirov <kiril@vladimiroff.org>
2021-01-22 17:03:24 +02:00
Kiril Vladimirov
f5382af591 silence: Add tests for Not(Equal|Regexp) matchers
... and fix a bug in validating silences with such matchers, caught
while writing them.

Signed-off-by: Kiril Vladimirov <kiril@vladimiroff.org>
2021-01-22 17:02:50 +02:00
Kiril Vladimirov
91083d6cd9 types: Fix typo in Silence.Matchers' documentation
Signed-off-by: Kiril Vladimirov <kiril@vladimiroff.org>
2021-01-22 17:02:50 +02:00
Kiril Vladimirov
7320d83cbc Replace types.Matcher(s)? with labels.Matcher(s)?
Signed-off-by: Kiril Vladimirov <kiril@vladimiroff.org>
2021-01-22 17:02:48 +02:00
Atibhi Agrawal
4ffba65ff5
Add negative matchers for inhibitors (#2460)
Add new matchers for inhibition rules

Signed-off-by: aSquare14 <atibhi.a@gmail.com>
2021-01-22 15:54:11 +01:00
Julien Pivotto
3f46b62d75
Merge pull request #2459 from prometheus/repo_sync
Synchronize common files from prometheus/prometheus
2021-01-17 02:19:50 +01:00
prombot
bca9422306 Update common Prometheus files
Signed-off-by: prombot <prometheus-team@googlegroups.com>
2021-01-17 00:04:09 +00:00
Atibhi Agrawal
6b36afbbec
Add negative matchers for routing. (#2434)
Add negative route matchers using label.Matcher

Signed-off-by: aSquare14 <atibhi.a@gmail.com>

Signed-off-by: beorn7 <beorn@grafana.com>

Co-authored-by: Björn Rabenstein <beorn@grafana.com>
2021-01-15 21:11:39 +01:00
Björn Rabenstein
a715283b37
Merge pull request #2441 from prometheus/beorn7/matcher
Improve labels.Matcher
2021-01-15 20:12:16 +01:00
beorn7
99e4a4fbae Address code review comments
Signed-off-by: beorn7 <beorn@grafana.com>
2021-01-13 18:49:06 +01:00
beorn7
e1ab2477c0 Fix escaping for Matcher.String()
Now the string created will correctly parse back.

Signed-off-by: beorn7 <beorn@grafana.com>
2021-01-13 13:21:30 +01:00
Bor Grošelj Simić
dd6b3afebe Remove trailing whitespace in docs
Signed-off-by: Bor Grošelj Simić <bor.groseljsimic@telemach.net>
2021-01-05 16:27:38 +01:00
beorn7
f7742393ae labels.Matcher: Add more test cases
Signed-off-by: beorn7 <beorn@grafana.com>
2020-12-23 23:59:25 +01:00
beorn7
3ce1d888d7 labels.ParseMatchers: Allow escaped quotes
Previously, escaped double quotes would still be seen as ending the
quoting, potentially leading to wronk tokenization.

Signed-off-by: beorn7 <beorn@grafana.com>
2020-12-23 22:37:12 +01:00
beorn7
9bb7ab43cd labels.Matcher: Improve regexp and allow escaping
This addresses a number of issues:

- It was impossible to include a literal '"' or a line break in the value.
- It was impossible to include '=', '~', or '!' in the value.
- It was not validated if the label name is valid.
- It was not validated if the value is valid UTF-8.
- No whitespace was allowed around the operator.

Signed-off-by: beorn7 <beorn@grafana.com>
2020-12-23 21:55:30 +01:00
beorn7
e87985a9a8 Add doc comments to labels.ParseMatcher and labels.ParseMatchers
The doc comments do not describe the current (arguably buggy) state,
but the desired state, as it will be implemented in future commits.

Signed-off-by: beorn7 <beorn@grafana.com>
2020-12-23 20:47:35 +01:00
Björn Rabenstein
ce108378d4
Fix and improve AlertmanagerClusterFailedToSendAlerts (#2437)
The alert was just looking at the minimum across integrations. So a
complete failure of one integration would be masked by a still worknig
other integration. With this fix, the `integration` label is retained
(as it was already expected by the `description`), and thus any
failing integration will trigger the alert.

In addition, an `alertmanagerCriticalIntegrationsRegEx` is provided
that allows to mark integrations as critical. Integrations that are
not used to deliver critical alerts, or those that are just there for
auditing and logging purposes can now be configured to only trigger a
warning alert if they fail.

Signed-off-by: beorn7 <beorn@grafana.com>
2020-12-23 15:15:38 +01:00
Björn Rabenstein
9e1e4fa420
Merge pull request #2435 from prometheus/beorn7/build
Fix docker image build
2020-12-17 01:20:33 +01:00
beorn7
01b9194397 Fix docker image build
New debian image has a nobody group.

Signed-off-by: beorn7 <beorn@grafana.com>
2020-12-16 21:31:12 +01:00
Nicholas Capo
193ebba04d
Display Silence and Alert dates in ISO8601 format (#2363)
* This changes the Alert view the SilenceList and SilenceView

Signed-off-by: Nicholas Capo <nicholas.capo@gmail.com>
2020-12-03 23:06:14 +01:00
Tom Wilkie
6c5dee008f
Beginnings of an Alertmanager mixin. (#1629)
Add an Alertmanager mixin

Signed-off-by: beorn7 <beorn@grafana.com>
Co-authored-by: Tom Wilkie <tom.wilkie@gmail.com>
Co-authored-by: beorn7 <beorn@grafana.com>
Co-authored-by: Simon Pasquier <spasquie@redhat.com>
2020-12-03 15:57:42 +01:00
Koki Kato
042d7b34f0
cli: avoid nil dereference in silence update (#2427)
Signed-off-by: Koki Kato <koki.kato1994@gmail.com>
2020-12-02 17:02:12 +01:00
Max Neverov
c39b787800
Add metrics for notification requests (#2361) (#2383)
Signed-off-by: Max Neverov <neverov.max@gmail.com>
2020-11-06 15:24:18 +01:00
PrometheusBot
3974abd0f4
Update common Prometheus files (#2411)
Signed-off-by: prombot <prometheus-team@googlegroups.com>
2020-11-06 12:28:36 +01:00
Victor Araujo
846c04e807
Make filter labels consistent with Prometheus (#2403)
* Make filter labels consistent with Prometheus

Filtering the alert out when the label is missing precludes a
possible match for an empty value. This change allows the
match to be evaluated.

Closes #2342

Signed-off-by: Victor Araujo <vear91@gmail.com>

* Add tests for matchFilterLabels in v2 api

Signed-off-by: Victor Araujo <vear91@gmail.com>
2020-11-06 11:26:32 +01:00
PrometheusBot
6e7f922d3a
Update common Prometheus files (#2401)
Signed-off-by: prombot <prometheus-team@googlegroups.com>
2020-10-28 18:09:58 +01:00
Isaac Gaskin
10ecddd9a6
docs(readme): correcting hyperlink text for RFC url (#2396)
Signed-off-by: Isaac Gaskin <igaskin@tesla.com>
2020-10-20 22:17:02 +02:00
B++
00b86d9067
setting favicon.ico dinamically (#2392)
* added favico link with relative path

Signed-off-by: jberny <f.bernardi89@gmail.com>

* re-generated assets

Signed-off-by: jberny <f.bernardi89@gmail.com>
2020-10-15 11:10:48 +02:00
Gerard Ryan
a8ed0d5850
Add some missing PagerDuty fields to docs (#2380)
These fields are all available on the PagerdutyConfig type:
59a96579cc/config/notifiers.go (L201..L203)

I took the descriptions from the PagerDuty events-api-v2 docs:
https://developer.pagerduty.com/docs/events-api-v2/overview/

Signed-off-by: Gerard Ryan <gryan@redhat.com>
2020-09-28 15:52:37 +02:00
Kevin Hellemun
dd1a8fb77b
[#2372] Move config reload metrics to Coordinator.Reload() (#2373)
* prometheus/alertmanager#2372 Move config reload metrics to Coordinator.Reload()

Signed-off-by: Kevin Hellemun <17928966+OGKevin@users.noreply.github.com>

* #2372 Minor refactoring.

Signed-off-by: Kevin Hellemun <17928966+OGKevin@users.noreply.github.com>
2020-09-28 14:43:57 +02:00
Benoît Knecht
59a96579cc
notify/pagerduty: Filter out empty images and links (#2379)
PagerDuty Event API v2 [1] requires images to have an `src` property, and links
to have an `href` property.

This commit filters out images and links that don't satisfy those conditions,
to avoid getting an HTTP 400 error in response.

This also adds flexibilty when using templates to configure images and links,
as it's now possible to omit images or links by letting the template return an
empty string for the `src` or `href` property, respectively.

[1]: https://developer.pagerduty.com/docs/events-api-v2/trigger-events/#context-properties

Signed-off-by: Benoît Knecht <bknecht@protonmail.ch>
2020-09-25 17:31:22 +02:00
PrometheusBot
1fdff6b3f9
Update common Prometheus files (#2364)
Signed-off-by: prombot <prometheus-team@googlegroups.com>
2020-09-11 18:01:12 +02:00
Julien Pivotto
470634d49f
Update common (#2353)
- Disable HTTP2: https://github.com/prometheus/common/pull/249
- Composite duration: https://github.com/prometheus/common/pull/246

Signed-off-by: Julien Pivotto <roidelapluie@inuits.eu>
2020-08-25 15:48:59 +02:00
Julien Pivotto
565fb4fc00
Remove resolve timeout from the config shipped by default (#2349)
It is not needed with Prometheus and can confuse users.

Signed-off-by: Julien Pivotto <roidelapluie@inuits.eu>
2020-08-25 15:46:38 +02:00
Jon Campbell
8e861c646b
Corrected Template Username Casing (#2345)
* Corrected Template Username Casing

Signed-off-by: midnightconman <midnightconman@gmail.com>

* Added assets_vfsdata

Signed-off-by: midnightconman <midnightconman@gmail.com>
2020-08-12 17:53:56 +02:00
Fahri YARDIMCI
41cd012c61
Add alert status for extended and simple output (#2324)
Signed-off-by: Fahri Yardımcı <f.yardimci06@gmail.com>
2020-07-24 15:02:58 +02:00
Julien Pivotto
7d28e5b876
Change HA exemple defaults to be more reasonable (#2325)
10s+10s does not really change.

Give 30s for group wait and 5m for group interval seems better.

Signed-off-by: Julien Pivotto <roidelapluie@inuits.eu>
2020-07-24 14:59:27 +02:00