Commit Graph

2179 Commits

Author SHA1 Message Date
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
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
Tim Reddehase 7a4db5c7c0
do not omit "empty" booleans in yaml output (#2317)
The "empty" boolean is the false value. This means that values of false will not
be present in the YAML output. As such they won't be displayed in the config
section on the Status overview page (/#/status), which can be especially
confusing for the SMTPRequireTLS (smtp_require_tls) field of the configuration
as this one will default to true.

Signed-off-by: Tim Reddehase <tim.reddehase@new-work.se>
2020-07-24 14:58:59 +02:00
masataka 73db78741f
Add date picker to silence form views (#2262)
* add datepicker

Signed-off-by: m-masataka <m.mizukoshi.wakuwaku@gmail.com>

* fix import error

Signed-off-by: m-masataka <m.mizukoshi.wakuwaku@gmail.com>

* fix unnecessary import from DateTime package

Signed-off-by: m-masataka <m.mizukoshi.wakuwaku@gmail.com>

* fix unnecessary import utc

Signed-off-by: m-masataka <m.mizukoshi.wakuwaku@gmail.com>

* change datetime picker component

Signed-off-by: m-masataka <m.mizukoshi.wakuwaku@gmail.com>

* added datetime picker utils

Signed-off-by: m-masataka <m.mizukoshi.wakuwaku@gmail.com>

* added datetime picker utils

Signed-off-by: m-masataka <m.mizukoshi.wakuwaku@gmail.com>

* remove config

Signed-off-by: m-masataka <m.mizukoshi.wakuwaku@gmail.com>

* replace case expressions to Result.toMaybe

Signed-off-by: m-masataka <m.mizukoshi.wakuwaku@gmail.com>
2020-07-24 14:52:29 +02:00
Jason Cooper 277c9ed462
notify: add markdown support for wechat (#2309)
* notify: add markdown support for wechat

Signed-off-by: Jason Cooper <master@deamwork.com>

* docs: update WeChat receiver configuration document

Signed-off-by: Jason Cooper <master@deamwork.com>

* fix: check WeChat msgType, apply default if not present

Signed-off-by: Jason Cooper <master@deamwork.com>

* chore: remove unnecessary comment

Signed-off-by: Jason Cooper <master@deamwork.com>

* fix: simplify msgType process

Signed-off-by: Jason Cooper <master@deamwork.com>

* docs: wechat configs document update

Signed-off-by: Jason Cooper <master@deamwork.com>

* fix: apply error message suggestions

Signed-off-by: Jason Cooper <master@deamwork.com>

* test: add test for regex

Signed-off-by: Jason Cooper <master@deamwork.com>

* fix: wechat message safe param

Signed-off-by: Jason Cooper <master@deamwork.com>
2020-07-06 15:56:42 +02:00
Calle Pettersson 1895fde856
Update PagerDuty doc links (#2314)
PagerDuty has restructured their documentation, making links stale

Signed-off-by: Calle Pettersson <calle@cape.nu>
2020-06-28 10:58:02 +02:00
PrometheusBot 51127923f1
Update common Prometheus files (#2310)
Signed-off-by: prombot <prometheus-team@googlegroups.com>
2020-06-23 17:04:38 +02:00
Simon Pasquier 13253c8692
docs: document alert's fingerprint (#2308)
Signed-off-by: Simon Pasquier <spasquie@redhat.com>
2020-06-18 14:52:39 +02:00
Julien Pivotto a9d4a71494
Add note about details handling for Opsgenie (#2305)
Signed-off-by: ricoberger <mail@ricoberger.de>

Co-authored-by: ricoberger <mail@ricoberger.de>
2020-06-17 23:36:32 +02:00
Julien Pivotto 3228822f06
Merge pull request #2303 from simonpasquier/merge-release-0.21
Merge release 0.21
2020-06-17 22:19:59 +02:00
Simon Pasquier a3d98c476a Merge remote-tracking branch 'origin/release-0.21' into merge-release-0.21
Signed-off-by: Simon Pasquier <spasquie@redhat.com>
2020-06-17 16:46:08 +02:00
Julien Pivotto a7f9fdadbe
docs: Fix dead link to visual route editor (#2298) (#2300)
Relative links are rendered relatively to the source repository, so this
link points to GitHub at the moment.

This commit changes the link to an absolute URL, bringing readers to the
Routing tree editor.

Signed-off-by: Manuel Hutter <manuel@hutter.io>

Co-authored-by: Manuel Hutter <mhutter@users.noreply.github.com>
2020-06-17 16:42:32 +02:00
Simon Pasquier 4c6c03ebfe
Cut v0.21.0 (#2297)
Signed-off-by: Simon Pasquier <spasquie@redhat.com>
2020-06-17 10:44:48 +02:00
Manuel Hutter 2747a02774
docs: Fix dead link to visual route editor (#2298)
Relative links are rendered relatively to the source repository, so this
link points to GitHub at the moment.

This commit changes the link to an absolute URL, bringing readers to the
Routing tree editor.

Signed-off-by: Manuel Hutter <manuel@hutter.io>
2020-06-16 20:05:09 +02:00
Simon Pasquier 56f09a62b2
notify: always retry with a back-off (#2290)
By default the library implementing the back-off timer stops the timer
after 15 minutes. Since the code never checked the value returned by the
ticker, notification retries were executed without delay after the 15
minutes had elapsed (e.g. for `group_interval` greater than 15m).

This change ensures that the back-off timer never expires.

Signed-off-by: Simon Pasquier <spasquie@redhat.com>
2020-06-16 09:50:35 +02:00
Simon Pasquier 073c298d32
Merge pull request #2296 from roidelapluie/merge-0.20
Merge 0.20 release
2020-06-16 08:49:28 +02:00
Julien Pivotto 339aea1859 Merge remote-tracking branch 'origin/release-0.20' 2020-06-12 19:17:36 +02:00
Julien Pivotto 2f74a34176
Release 0.21 documentation (#2294)
* Release 0.20 docs (#2292)

* Raw docs imports

Signed-off-by: Julien Pivotto <roidelapluie@inuits.eu>

* Adapt for this repository

Signed-off-by: Julien Pivotto <roidelapluie@inuits.eu>

* Add max alerts doc

Signed-off-by: Julien Pivotto <roidelapluie@inuits.eu>

* Remove HipChat from docs

Signed-off-by: Julien Pivotto <roidelapluie@inuits.eu>
2020-06-12 12:25:00 +02:00
Julien Pivotto 1cba0c7a37
Remove HipChat (#2281)
Signed-off-by: Julien Pivotto <roidelapluie@inuits.eu>
2020-06-11 15:51:10 +02:00
Julien Pivotto e831a6af5d
Release 0.20 docs (#2292)
* Raw docs imports

Signed-off-by: Julien Pivotto <roidelapluie@inuits.eu>

* Adapt for this repository

Signed-off-by: Julien Pivotto <roidelapluie@inuits.eu>
2020-06-11 15:49:40 +02:00
Julien Pivotto ad9ed22043
Ask for all versions (#2280)
As 0.21.0 will update clusters, we want to know of people have all their
AM at the same release when they open a clustering issue.

Signed-off-by: Julien Pivotto <roidelapluie@inuits.eu>
2020-06-11 15:16:12 +02:00
vitt-bagal ce5d523596
Add image build for s390x architecture (#2289)
* Add suport for s390x

Signed-off-by: Nayana <nthorat@us.ibm.com>

* Added s390x support to docker image

Signed-off-by: vitthalb@us.ibm.com <vitthalb@us.ibm.com>

Co-authored-by: Nayana <nthorat@us.ibm.com>
2020-06-09 16:30:55 +02:00
Bartlomiej Plotka 6d77929c30
Merge pull request #2276 from ricoberger/pass-labels-to-opsgenie-details
Propagate labels to Opsgenie details
2020-06-09 14:39:03 +01:00
ricoberger 4b59db0adc Always pass all labels to Opsgenie
Signed-off-by: ricoberger <mail@ricoberger.de>
2020-06-09 13:51:46 +02:00