Commit Graph

12 Commits

Author SHA1 Message Date
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 309c6af4b2
nflog: use alert set instead of hash for deduplication
Building a hash over an entire set of alerts causes problems, because
the hash differs, on any change, whereas we only want to send
notifications if the alert and it's state have changed. Therefore this
introduces a list of alerts that are active and a list of alerts that
are resolved. If the currently active alerts of a group are a subset of
the ones that have been notified about before then they are
deduplicated. The resolved notifications work the same way, with a
separate list of resolved notifications that have already been sent.
2017-04-13 15:13:47 +02:00
Fabian Reinartz b6851a5421 silences: fix concurrent cache writes (#561)
This fixes #559 by removing concurrent map writes to the matcher cache.
The cache was guarded by the Silence's main lock, which only used a
read-lock on queries.
The cache's get methods lazily loads data into the cache and thus
causing concurrent writes.

We just change the main lock to always write-lock, as we don't expect
high lock contention at this point and would have it in a dedicated
cache lock anyway.
2016-11-21 11:09:49 +01: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 b2461bb2d4 *: remove go-kit logging 2016-09-06 11:56:57 +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 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