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
3b5dfa8aba
provider: delete old silence provider
2016-08-30 12:01:24 +02:00
Fabian Reinartz
1baf98fb1a
provider: remove NotificationInfos provider
2016-08-23 13:57:19 +02:00
Fabian Reinartz
6a20296af4
*: fixup, remove bolt provider
2016-08-09 14:17:50 +02:00
Fabian Reinartz
96fa0bb468
provider/mesh: set expiration time on create
2016-08-09 12:01:31 +02:00
Fabian Reinartz
bebda718c0
provider/mesh: use protobuf gossip format
...
stuff
2016-08-09 12:01:31 +02:00
Fabian Reinartz
91fd3f5b3a
provider/mesh: use struct for string in state map
2016-08-09 12:01:31 +02:00
Fabian Reinartz
66c2171bd8
*: rename NotifyInfo to NotificationInfo
2016-08-09 12:01:31 +02:00
Fabian Reinartz
37eb2127b7
provider/mesh: add doc comments
2016-08-09 12:01:31 +02:00
Fabian Reinartz
fdf09b6ae6
provider/mesh: implement snapshotting
...
This change adds snapshotting to the silences and notification infos
providers. Snapshots are created periodically and on shutdown. They are
loaded into memory on startup.
Periodic snapshotting is run right after garbage collection.
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
022adbff36
provider/mesh: fix end timestamp for unstarted silences
...
This changes the end timestamp for unstarted silences to the
start timestamp so the silence remains valid by not having the end
time before the start time.
2016-08-09 12:00:52 +02:00
Fabian Reinartz
a89ba5b5ca
provider/mesh: allow timestamp equality tolerance
2016-08-09 12:00:28 +02:00
Fabian Reinartz
ddd3189bfe
provider/mesh: always store UTC
2016-08-09 12:00:28 +02:00
Fabian Reinartz
2a7047cdc1
*: fix golint warnings, add TODOs
2016-08-09 12:00:28 +02:00
Fabian Reinartz
00f1f1f8bf
provider/mesh: fix silence end time modification
2016-08-09 12:00:28 +02:00
Fabian Reinartz
8a517b485d
*: activate mesh garbage collection
2016-08-09 12:00:28 +02:00
Fabian Reinartz
dfa79409ae
provider/mesh: add silence garbage collection
2016-08-09 12:00:28 +02:00
Fabian Reinartz
c1ee634c16
provider/mesh: add notification garbage collection
2016-08-09 12:00:28 +02:00
Fabian Reinartz
06a8700472
provider/mesh: fix and test modification validity
...
This change fixes, extends, and tests silenceModAllowed. It now can also
be applied to new silences.
2016-08-09 12:00:28 +02:00
Fabian Reinartz
57b60ba33e
provider/mesh: add silence state del test
2016-08-09 12:00:28 +02:00
Fabian Reinartz
3d350a34b5
provider/mesh: extract silence deletion into state
2016-08-09 12:00:28 +02:00
Fabian Reinartz
9039a3cffa
provider/mesh: add Silences Set test
2016-08-09 12:00:28 +02:00
Fabian Reinartz
4a336799ef
provider/mesh: extract setting into silenceState
...
This change extracts setting logic directly into the silence state.
Only assigning of a UUID and mesh propagation are left directly to
the mesh provider.
Validity of modifying silence state extracted into its own method.
Test for state modification added.
2016-08-09 12:00:28 +02:00
Fabian Reinartz
cb74e2ad41
provider/mesh: add NotificationInfos Get test
2016-08-09 12:00:28 +02:00
Fabian Reinartz
d241016f95
proivder/mesh: add NotificationInfos Set test
2016-08-09 12:00:28 +02:00
Fabian Reinartz
3ebf21b7b4
provider/mesh: test NotificationInfos OnGossip*
2016-08-09 12:00:28 +02:00
Fabian Reinartz
e51770ce21
main: use mesh providers
2016-08-09 12:00:28 +02:00
Fabian Reinartz
9993a4f244
provider/mesh: add silence provider
2016-08-09 11:59:35 +02:00
Fabian Reinartz
3c7a16a838
provider/mesh: add notification gossip peer
2016-08-09 11:59:35 +02:00
Fabian Reinartz
b92c5f5bd4
provider/mesh: add silence state
2016-08-09 11:59:35 +02:00
Fabian Reinartz
8e9bd4cfd4
provider/mesh: add notificaiton 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
8cac0ea62a
provider: remove SQLite provider
...
Remove faulty and inperformat SQLite provider.
2016-08-09 11:48:38 +02:00
Fabian Reinartz
bc0897bb8f
provider: remove in-memory provider
...
Remove the in-memory provider. It will be equivalent to a 1-peer
gossip setup.
2016-08-09 11:48:38 +02:00
Fabian Reinartz
d6e64dccc5
provider/boltmem: make alerts purely in-memory.
...
Initial testing has shown BoltDB in plain usage to be a bottleneck
at a few thousand alerts or more (especially JSON decoding.
This commit actually makes them purely memory as a temporary solution.
2016-07-07 09:45:12 +02:00
Fabian Reinartz
ee37ea6965
provider/boltmem: add in-memory silence cache
2016-06-22 14:29:23 +02:00
Fabian Reinartz
639a4e9dc4
provider/boltmem: add license headers
2016-05-03 18:36:25 +02:00
Fabian Reinartz
0cd725ef3a
provider/boltmem: fix naming, add doc comments
2016-05-03 12:46:34 +02:00
Fabian Reinartz
3980a6904e
provider/boltmem: properly compare timestamps
...
Depending on the environment the timestamp internal fields
are different to handle timezones.
Thus a reflect.DeepEqual comparison falsely evaluates to
false.
This commit manually compares timestamps via the time.Time.Equal
method to circumvent the issue.
2016-05-03 12:46:34 +02:00
Fabian Reinartz
d8efdde515
main: Use bolt based storage
2016-05-03 12:46:34 +02:00
Fabian Reinartz
cc5aab6cff
provider/boltmem: add alert subscription.
...
This commit implements the Subscribe() and GetPending()
methods for the bolt based alert provider.
2016-05-03 12:46:34 +02:00
Fabian Reinartz
0e954e10cf
provider/boltmem: Add Put/Get for BoltDB provider
2016-05-03 12:46:34 +02:00
Fabian Reinartz
a66ea61041
provider/boltmem: Implement Silences.Mutes()
...
This commits implements the Mutes() method for the boltmem silence
provider.
2016-05-03 12:39:22 +02:00
Fabian Reinartz
f0cbdbec51
provider/boltmem: Implement Silences.All()
...
This commits adds the All() method to the Silence provider.
2016-05-03 12:39:21 +02:00
Fabian Reinartz
f833fe5073
provider/boltmem: Implement silence deletion
2016-05-03 12:39:21 +02:00
Fabian Reinartz
9e4dfb32ca
provider/boltmem: Implement set/del silences.
...
This commit implements creation and setting of silences.
They are stored as JSON objects in BoltDB and addressed by a unique
ID assigned on initial creation.
2016-05-03 12:39:21 +02:00
Fabian Reinartz
0019d4f858
provider/boltmem: Implement Notify, add dummies
...
This commit creates dummy implementations of the provider interfaces
for the boltmem provider.
It implements the NotifyInfo provider in BoltDB.
2016-05-03 12:39:21 +02:00
Fabian Reinartz
d2c0cd6832
Revert back to one DB file
2016-03-15 20:47:54 +01:00