Fabian Reinartz
ed4f295c70
notify: embed nflogpb.Receiver in stage
...
This commit directly adds the nflogpb.Receiver object to stage
objects at stage creation time. Hence, we no longer rely on a value from
within the context.
2016-08-16 16:40:42 +02:00
Fabian Reinartz
4a5df40539
nflog: add logging
2016-08-16 16:33:17 +02:00
Fabian Reinartz
998a9ce38e
notify: rename Receiver to ReceiverName
...
This string value is initially used to store a receiver name. It is
later overloaded with a unique string identifier of <name, integration,
index>.
This renaming is in preparation to separate the two and use the Receiver
object of the nflogpb package.
2016-08-16 16:33:17 +02:00
Fabian Reinartz
b40703a584
vendor: add github.com/go-kit/kit/log
2016-08-16 16:33:17 +02:00
Fabian Reinartz
48b6c8ff70
nflog: add initial tests
2016-08-16 11:11:48 +02:00
Fabian Reinartz
36b2e89f27
vendor: add testify package and dependencies
2016-08-16 11:11:48 +02:00
Fabian Reinartz
086d581cf8
nflog: add gc/snapshotting maintenance, remove delete
...
This removes the Delete function from the interface as the log
should be append-only and only be reduced by expired entries.
This also adds an argument to configure a background processing routine,
which periodically garbage collects and snapshots.
2016-08-16 11:11:48 +02:00
Fabian Reinartz
80afd502d5
nflog: add mesh gossip support
2016-08-16 11:11:48 +02:00
Fabian Reinartz
3d8e60ded7
nflog: add notification log package
...
This adds a new nflog package meant to replace provider.Notifies. It
has a central protobuf type package, which is also meant for usage for
other packages and the API.
The generated Go types are also the in-memory representation.
2016-08-16 11:11:48 +02:00
Fabian Reinartz
cbdcf0a983
vendor: add protobuf related dependencies
2016-08-16 11:11:48 +02:00
Fabian Reinartz
f1cddf5a63
Merge pull request #459 from brancz/refactor-notification-pipeline
...
refactor notification pipeline
2016-08-16 11:11:16 +02:00
Frederic Branczyk
7bc851e894
rework building of stage pipelines
2016-08-16 10:56:46 +02:00
Frederic Branczyk
840dd7d2f5
introduce Stage interface
2016-08-12 16:01:40 +02:00
Frederic Branczyk
3dfb17e601
refactor notification pipeline
...
move hard to read backwards declared approach to more transparent
pipeline approach with more detailed interfaces
2016-08-11 15:04:03 +02:00
Fabian Reinartz
5c12950576
vendor: remove unused dependencies
2016-08-11 11:35:46 +02:00
Steve Durrheimer
1c13e773a7
Merge pull request #455 from prometheus/fabxc-buildarch
...
promu: readd build archs
2016-08-09 15:36:34 +02:00
Fabian Reinartz
2c6454b370
Merge pull request #454 from prometheus/fabxc-restruct2
...
*: restructure package tree
2016-08-09 15:20:23 +02:00
Fabian Reinartz
76e7183427
promu: readd build archs
...
We can build these binaries again with no longer depending on cgo.
2016-08-09 15:12:25 +02:00
Fabian Reinartz
b822fe58b6
Merge branch 'slack_enhance' of https://github.com/dmclain/alertmanager into dmclain-slack_enhance
2016-08-09 14:46:39 +02:00
Fabian Reinartz
3931d4e64b
*: restructure package tree
...
This commit packages up individual modules and removes the top-level
main package.
2016-08-09 14:24:52 +02:00
Fabian Reinartz
6a20296af4
*: fixup, remove bolt provider
2016-08-09 14:17:50 +02:00
Fabian Reinartz
2fda2f3071
Merge pull request #365 from prometheus/fabxc-soha
...
[WIP] Alertmanager HA mode
2016-08-09 12:03:47 +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
24ebd7d89d
vendor: remove unused dependencies
2016-08-09 12:01:31 +02:00
Fabian Reinartz
951345f686
vendor: update protobuf vendoring
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
2098be4f93
ui: handle silence edit modes
...
This change makes actions around silences in different stages more
clear. Changes that are not allowed to be in-place are handled by
creating a new silence and deleting/expiring the old one behind the
scenes.
2016-08-09 12:01:31 +02:00
Fabian Reinartz
1e5babd843
ui: split silences into pending/elapsed/active
2016-08-09 12:01:14 +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
a840fae9de
ui: don't delete old silence on modification
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
3d8d065a1b
api: omit uuid.Nil silences
...
Switching to UUID caused `,omitempty` to be ignored for nil
IDs. All alerts were marked as silenced as a result.
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
4761663380
types: make Matchers sorted and compareable
2016-08-09 12:00:28 +02:00
Fabian Reinartz
00b1a396af
api: push silence validation into provider
2016-08-09 12:00:28 +02:00