Commit Graph

928 Commits

Author SHA1 Message Date
Fabian Reinartz 6f8c9673b2 Merge pull request #467 from prometheus/fabxc-meshproto3
*: integrate nflog
2016-08-18 16:03:19 +02:00
Fabian Reinartz 72fdf3d3ab *: integrate nflog
This commit replaces the previous NotifyInfo provider with the new
nflog package. It needs adjustments in the behavior of the deduping
stage.
The nflog stores notification digests per receiver per alert aggregation
group rather than one entry for alert per receiver. This drastically
reduces the number of entries and removes interference
across aggregation groups.
2016-08-18 15:52:28 +02:00
Fabian Reinartz 374e984444 Merge branch 'master' of github.com:prometheus/alertmanager 2016-08-18 14:42:56 +02:00
Fabian Reinartz a833522232 Merge pull request #463 from prometheus/notify-recv
Reduce runtime context dependencies
2016-08-18 14:41:39 +02:00
Fabian Reinartz a52992196b Merge pull request #464 from prometheus/fabxc-stagectx
notify: include context in Stage interface
2016-08-18 14:41:17 +02:00
Fabian Reinartz 9f8845d036 Merge pull request #460 from prometheus/fabxc-meshproto
nflog: append-only log for notification information
2016-08-18 14:40:03 +02:00
Fabian Reinartz a42a473213 nflog: add doc comments, license headers 2016-08-18 14:08:01 +02:00
Fabian Reinartz d2a556b269 notify: include context in Stage interface
This adds context.Context to the return arguments of a Stage.
This is necessary to propagate modified contexts.
2016-08-18 11:42:37 +02:00
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