Commit Graph

13 Commits

Author SHA1 Message Date
Jose Donizetti 74808e40f3 Refactor silence constants (#1076)
* Refactor remove dups silence state constants

* Refactor to use const instead of string
2017-11-07 11:36:30 +01: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
Jose Donizetti 9449bd1fa9 Ignore expired silences OnGossip (#999)
This will fix the bug of resync deleted silences
due to the state of other peers.
2017-09-28 10:25:35 +02:00
Corentin Chary 34d9524ab9 silences: avoid deadlock (#995)
* silences: avoid deadlock

Calling gossip.GossipBroadcast() will cause a deadlock if
there is a currently executing OnBroadcast* function.

See #982

* silence_test: better unit test to detect deadlocks
2017-09-27 11:48:28 +02:00
Corentin Chary 869a038a2b Add a mutex to silences.go:gossipData (#984)
This should fix silence/silence.go #982
2017-09-13 11:18:01 +02:00
Max Leonard Inden 08be6a4149
Expire pending silence and move to expired state
Instead of setting endsAt to startsAt we can set both to now. Thereby
the Silence will get the expired state by default.
2017-05-29 18:44:58 +02:00
Fabian Reinartz f53974d5e6 silence: fix and test expiration behavior 2017-05-22 09:27:57 +02:00
Fabian Reinartz d73a655bf4 Simplify silence modifications, add update endpoint (#796)
* Simplify silence modifications, add update endpoint

* vendor: add pkg/errors

* ui: Handle upserting of silences

.

* Regenerate bindata
2017-05-16 16:48:25 +02:00
Fabian Reinartz b1486ca546 silence: move to gogoproto
This generates the protobuf Go code with gogoproto and switches to
standard library time types.
2017-04-18 12:47:42 +02:00
Fabian Reinartz 7517453c68 silence: add metrics 2016-09-29 09:54:34 +02:00
Frederic Branczyk e72e45c8f1 silence: add cache for silence matchers
compiling regex silence matchers on every query is expensive, therefore
caching them as soon as they are gossiped through the mesh
2016-09-09 11:41:39 +02:00
Fabian Reinartz a4e8703567 *: integrate new silence package 2016-08-30 12:15:23 +02:00
Fabian Reinartz ed3fdc747d silence: add protobuf-based silence package.
This commit adds an implementation of a silence storage that can
share store and modify silences, share state via a mesh network,
write and load snapshots, and be dynamically queried.
All data formats are based on protocol buffers.
2016-08-24 17:48:31 +02:00