Commit Graph

60 Commits

Author SHA1 Message Date
Jose Donizetti 20598bfd71 Remove old silence code (#1080) 2017-11-11 15:41:17 +01:00
Jose Donizetti cf85bd84f2 Add CalcSilenceState Test (#1085) 2017-11-11 15:13:12 +01:00
Jose Donizetti bc9b34d3db Add test to matchers (#1079)
* Add Test to Matcher and Matchers

* Move matchers string test to match_test.go
2017-11-07 11:39:22 +01:00
Julius Volz 9b72c10134 Minor code cleanups 2017-11-01 23:08:34 +01:00
Frederic Branczyk 0ef6695055
*: Remove .WasInhibited and .WasSilenced fields of Alert type 2017-10-10 15:50:15 +02:00
Corentin Chary bff889b490 silence|alerts: add metrics about current silences and alerts
This adds metrics that look like this:
```
alertmanager_alerts{state="active"} 6
alertmanager_alerts{state="suppressed"} 0
alertmanager_silences{state="active"} 1
alertmanager_silences{state="expired"} 1
alertmanager_silences{state="pending"} 0
```

This can be used to monitor alertmanager's usage and validate that
alertmanagers in a mesh have a similar number of silences and alerts.
2017-10-02 13:33:29 +02:00
Corentin Chary 9b2afbf18b Make sure Matchers are always ordered
This fixes https://github.com/prometheus/alertmanager/issues/881
Also add some unit tests
2017-06-23 15:30:34 +02:00
Max Leonard Inden 401e440db4
Return silence state on /silences
silenceState = "expired" | "active" | "pending"
```
"status": {
  "state": "expired"
}
```
2017-05-10 12:01:21 +02:00
Max Inden d463f1c298 Sync ui-rewrite with master (#779) 2017-05-10 11:49:02 +02:00
stuart nelson 6a909abf17 Add processing status field to alert 2017-04-27 14:18:52 +02:00
Fabian Reinartz 3269bc39e1 *: switch group key to matcher serialization
Turn the GroupKey into a string that is composed of the matchers if the
path in the routing tree and the grouping labels.
Only hash it at the very end to ensure we don't exceed size limits of
integration APIs.
2017-04-21 12:06:23 +02:00
Fabian Reinartz 8d88d9e05b Merge pull request #481 from prometheus/fabxc-meshsil
*: integrate new silence package
2016-08-30 16:53:34 +02:00
Fabian Reinartz 98101f3868 silence: fix doc strings 2016-08-30 14:19:22 +02:00
Fabian Reinartz a4e8703567 *: integrate new silence package 2016-08-30 12:15:23 +02:00
Fabian Reinartz 1baf98fb1a provider: remove NotificationInfos provider 2016-08-23 13:57:19 +02:00
Fabian Reinartz 66c2171bd8 *: rename NotifyInfo to NotificationInfo 2016-08-09 12:01:31 +02:00
Fabian Reinartz c0103dd8c6 provider/mesh: filter deleted silences from results 2016-08-09 12:00:52 +02:00
Fabian Reinartz 3d350a34b5 provider/mesh: extract silence deletion into state 2016-08-09 12:00:28 +02:00
Fabian Reinartz 4761663380 types: make Matchers sorted and compareable 2016-08-09 12:00:28 +02:00
Fabian Reinartz 6ad866dd27 types: validate ID existance for silences 2016-08-09 12:00:28 +02:00
Fabian Reinartz b92c5f5bd4 provider/mesh: add silence state 2016-08-09 11:59:35 +02:00
Fabian Reinartz 81cbf3cda7 *: refactor Silence type, use UUID
This commit removes the dependency on model.Silence for the internal
Silence type, uses UUIDs instead of uint64s and clarifies invariants
around timestamp handling.

The created_at timestamp is removed for the time being.
2016-08-09 11:59:35 +02:00
Fabian Reinartz 0e954e10cf provider/boltmem: Add Put/Get for BoltDB provider 2016-05-03 12:46:34 +02:00
Fabian Reinartz 438e22f246 Add merge alert test 2016-02-03 14:11:59 +01:00
Fabian Reinartz 4ada2398f2 Set previous inhibition/silence state 2015-12-04 10:58:56 +01:00
beorn7 93ffa534a5 PR with changes after code review
Now to be reverse-reveiewed.
2015-11-23 18:24:57 +01:00
Fabian Reinartz e4e594d826 Unify receiver naming 2015-11-10 13:47:04 +01:00
Fabian Reinartz d4e2bdc36f Track and expose silenced/inhibited status of alerts 2015-11-09 14:34:57 +01:00
Fabian Reinartz 8d2bbc348b Simplify and rename notification info struct.
The delivered field was previously unused and is removed by this commit.
Only successful notifications are stored. The type was renamed to NotifyInfo.
2015-11-06 10:09:39 +01:00
Fabian Reinartz 5ce39632f8 Fix go vet warnings 2015-11-05 10:25:25 +01:00
Fabian Reinartz a765ef9534 Add aggregation group unit test 2015-10-27 18:26:44 +01:00
Fabian Reinartz a4333564a0 Improve UI tree JSON, style UI tree 2015-10-22 09:49:16 +02:00
Fabian Reinartz c045a6285b Implement deterministic incident keys, complete PD integration 2015-10-21 13:08:53 +02:00
Fabian Reinartz 78008cd012 Fix infinite recursion bug in Alert merge 2015-10-15 16:21:36 +02:00
Fabian Reinartz 5dc2f6e9b1 Add license headers 2015-10-11 17:24:49 +02:00
Fabian Reinartz ce74f8363b Simplify initialization
No longer update components based on a new configuration. Generally,
destroying and recreating has no performance impact and is less
error-prone.
This also removes the Reloadable interface and simplifies the entire
startup contraption.
2015-10-11 16:54:39 +02:00
Fabian Reinartz 41821faf92 Use multi-error for notify-fanout 2015-10-11 12:40:43 +02:00
Fabian Reinartz 9b0ceacef8 Fix creation of model.Alert from types.Alert 2015-10-11 12:33:54 +02:00
Fabian Reinartz 7ef293d9bc Make loadable templates configurable 2015-10-09 11:06:04 +02:00
Fabian Reinartz 9bf18ec4a5 Always assume success on reload of valid config 2015-10-09 09:05:21 +02:00
Fabian Reinartz 856d5091c1 Implement merging of alerts on insert 2015-10-02 16:52:04 +02:00
Fabian Reinartz 4e381c7e64 Store model.Silence and restore types.Silence correctly 2015-10-01 22:16:44 +02:00
Fabian Reinartz 46e09e2b2c Switch to model.Silence 2015-10-01 17:50:15 +02:00
Fabian Reinartz 0600d6b47b Integrate new model types, separate internal and external types better 2015-10-01 15:46:10 +02:00
Fabian Reinartz 70f1be20da Update vendoring for alert type 2015-10-01 15:22:27 +02:00
Fabian Reinartz d2a0a218aa Remove obsolete fingerprint method 2015-10-01 15:17:37 +02:00
Fabian Reinartz 0b4d58fbdb Switch to model.Alert 2015-10-01 14:53:49 +02:00
Fabian Reinartz d40bb99cee Add proper sorting comparison for alerts 2015-09-30 18:44:53 +02:00
Fabian Reinartz 006939de12 Hide resolved it alert JSON if it was added via timeout 2015-09-30 14:53:05 +02:00
Fabian Reinartz 5ed89a72a5 Change to clearer alert time fields 2015-09-29 17:26:44 +02:00