Commit Graph

2241 Commits

Author SHA1 Message Date
Ben Ridley
fb60329aad Add fullstops to comments
Signed-off-by: Ben Ridley <benridley29@gmail.com>
2021-03-01 08:30:02 +11:00
Ben Ridley
70b138a17a Apply formatting suggestions from code review
Co-authored-by: Julien Pivotto <roidelapluie@gmail.com>
Signed-off-by: Ben Ridley <benridley29@gmail.com>
2021-03-01 08:30:02 +11:00
Ben Ridley
2c5c17a16a Update timeinterval/timeinterval.go
Co-authored-by: Julien Pivotto <roidelapluie@gmail.com>
Signed-off-by: Ben Ridley <benridley29@gmail.com>
2021-03-01 08:30:02 +11:00
Ben Ridley
1957e3c80e Add some more complete test cases, test for broken clamping
Signed-off-by: Ben Ridley <benridley29@gmail.com>
2021-03-01 08:30:02 +11:00
Ben Ridley
2c86b696c9 Prevent clamping dates that start after the end of the month
Signed-off-by: Ben Ridley <benridley29@gmail.com>
2021-03-01 08:30:02 +11:00
Ben Ridley
adf94c3168 Correct errors, test for specific error messages, improve formatting
Signed-off-by: Ben Ridley <benridley29@gmail.com>
2021-03-01 08:30:01 +11:00
Ben Ridley
4c881ef5fb Tidy up error message formatting
Signed-off-by: Ben Ridley <benridley29@gmail.com>
2021-03-01 08:30:01 +11:00
Ben Ridley
dd7a35e2b8 Add tests for configuration of mute times
Signed-off-by: Ben Ridley <benridley29@gmail.com>
2021-03-01 08:30:01 +11:00
Ben Ridley
ad385c275f Add check for undefined name in a mute time interval
Signed-off-by: Ben Ridley <benridley29@gmail.com>
2021-03-01 08:30:01 +11:00
Ben Ridley
44e9aa9762 Change undefined route to use quoted string formatting
Signed-off-by: Ben Ridley <benridley29@gmail.com>
2021-03-01 08:30:01 +11:00
Ben Ridley
3ece40664b Remove unused test function
Signed-off-by: Ben Ridley <benridley29@gmail.com>
2021-03-01 08:30:01 +11:00
Ben Ridley
e052540c92 Add license header
Signed-off-by: Ben Ridley <benridley29@gmail.com>
2021-03-01 08:30:01 +11:00
Ben Ridley
0e9838c8f3 Fix formatting
Signed-off-by: Ben Ridley <benridley29@gmail.com>
2021-03-01 08:30:01 +11:00
Ben Ridley
58c1ef58a1 Clarify boundaries of ranges in docs
Signed-off-by: Ben Ridley <benridley29@gmail.com>
2021-03-01 08:30:01 +11:00
Ben Ridley
3d97ee55eb Update docs to include mute time sections
Signed-off-by: Ben Ridley <benridley29@gmail.com>
2021-03-01 08:30:01 +11:00
Ben Ridley
11c24d4ae6 Correct case from renaming
Signed-off-by: Ben Ridley <benridley29@gmail.com>
2021-03-01 08:30:01 +11:00
Ben Ridley
c51e598f91 Remove container testing script
Signed-off-by: Ben Ridley <benridley29@gmail.com>
2021-03-01 08:30:01 +11:00
Ben Ridley
93e0117b46 Change logging to debug when notifications aren't sent due to route mute
Signed-off-by: Ben Ridley <benridley29@gmail.com>
2021-03-01 08:30:01 +11:00
Ben Ridley
a3cb125e5c Move timeinterval library into locally maintained package
Signed-off-by: Ben Ridley <benridley29@gmail.com>
2021-03-01 08:30:01 +11:00
Ben Ridley
f53e7a984c Add tests for TimeMuteStage
Signed-off-by: Ben Ridley <benridley29@gmail.com>
2021-03-01 08:30:01 +11:00
ben
d1f5e07909 Add mute time stage and pipeline
Signed-off-by: Ben Ridley <benridley29@gmail.com>
2021-03-01 08:30:01 +11:00
ben
44d8cb43d2 Update gotime to v0.0.2
Signed-off-by: Ben Ridley <benridley29@gmail.com>
2021-03-01 08:30:01 +11:00
ben
fe4b8399c3 Move time intervals to own section, add config validation
Signed-off-by: Ben Ridley <benridley29@gmail.com>
2021-03-01 08:30:01 +11:00
ben
ea5b925147 Add buildah script for test container
Signed-off-by: Ben Ridley <benridley29@gmail.com>
2021-03-01 08:30:01 +11:00
ben
1d912faab6 Add config timeinterval that allows intervals to be dumped back out on the status page of Alertmanager
Signed-off-by: Ben Ridley <benridley29@gmail.com>
2021-03-01 08:30:01 +11:00
ben
cbfbf07188 Allow routes to reference time intervals
Signed-off-by: Ben Ridley <benridley29@gmail.com>
2021-03-01 08:30:00 +11:00
ben
5df661653c Allow time intervals in global config
Signed-off-by: Ben Ridley <benridley29@gmail.com>
2021-03-01 08:30:00 +11:00
ben
c2c0c5544d Add gotime library
Signed-off-by: Ben Ridley <benridley29@gmail.com>
2021-03-01 08:30:00 +11:00
Björn Rabenstein
d57b2dcdec
Merge pull request #2471 from vladimiroff/issue-1682
Expose negative matching in silences
2021-02-19 18:17:42 +01:00
Kiril Vladimirov
740a97345f ui: add isEqual field to Matcher
Signed-off-by: Kiril Vladimirov <kiril@vladimiroff.org>
2021-02-19 00:14:04 +02:00
Kiril Vladimirov
84dd6ab8d7 cli/format: Use Matchers.String for extended formatting
Signed-off-by: Kiril Vladimirov <kiril@vladimiroff.org>
2021-02-18 23:43:15 +02:00
Kiril Vladimirov
217562e838 cli/format: Create labels.Matcher to format
There is non-trivial value escaping going inside pkg/labels.

Signed-off-by: Kiril Vladimirov <kiril@vladimiroff.org>
2021-02-18 23:43:15 +02:00
Kiril Vladimirov
f503012c0b cli: Parse properly all matcher types
Signed-off-by: Kiril Vladimirov <kiril@vladimiroff.org>
2021-02-16 14:22:59 +02:00
Kiril Vladimirov
133b5bab42 cli: Unify matcher formatting
Signed-off-by: Kiril Vladimirov <kiril@vladimiroff.org>
2021-02-16 14:22:59 +02:00
Kiril Vladimirov
2b6315f399 api/v2: Add Matcher.IsEqual to support all types
Signed-off-by: Kiril Vladimirov <kiril@vladimiroff.org>
2021-02-16 14:22:59 +02:00
Björn Rabenstein
a7ca7b1d29
Merge pull request #2443 from ajalab/fix-get-silence-filter-regex
api: check silence matching by string comparison in getSilences
2021-02-11 21:37:38 +01:00
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
Koki Kato
b5ddc5d638 Add test cases for silences with negative matchers
Signed-off-by: Koki Kato <koki.kato1994@gmail.com>
2021-02-09 23:01:21 +09:00
Koki Kato
b9aae07a73 Check silence matching with Protobuf models
Signed-off-by: Koki Kato <koki.kato1994@gmail.com>

To support negative matchers.
2021-02-09 22:53:00 +09:00
Koki Kato
72ce7fd71f api: add test for gettableSilenceMatchesFilterLabels
Signed-off-by: Koki Kato <koki.kato1994@gmail.com>
2021-02-09 22:07:15 +09:00
Koki Kato
f8c33ab47d api: check silence matching by string comparison in getSilences
Signed-off-by: Koki Kato <koki.kato1994@gmail.com>
2021-02-09 22:07:15 +09: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