Commit Graph

25 Commits

Author SHA1 Message Date
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
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 66c2171bd8 *: rename NotifyInfo to NotificationInfo 2016-08-09 12:01:31 +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 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 11fae2a719 Simplify and fix notification grouping.
This commit changes the notification grouping behavior
to simply send all alerts of a group as soon as a single
one of them needs updating.

This fixes a critical bug which caused erroneous resolved
notifications to be sent.
2016-01-08 15:17:54 +01:00
Fabian Reinartz 9b4479cb6b Move send_resolved parameter to notifier configuration 2015-12-17 13:43:56 +01:00
Fabian Reinartz 4ada2398f2 Set previous inhibition/silence state 2015-12-04 10:58:56 +01:00
Fabian Reinartz e4e594d826 Unify receiver naming 2015-11-10 13:47:04 +01:00
Fabian Reinartz 8d2bbc348b Simplify and rename notification info struct.
The delivered field was previously unused and is removed by this commit.
Only successful notifications are stored. The type was renamed to NotifyInfo.
2015-11-06 10:09:39 +01:00
Fabian Reinartz 5ce39632f8 Fix go vet warnings 2015-11-05 10:25:25 +01:00
Fabian Reinartz 5dc2f6e9b1 Add license headers 2015-10-11 17:24:49 +02:00
Fabian Reinartz 9c5468786d Simplify notifier constructors 2015-10-11 16:54:31 +02:00
Fabian Reinartz c84a287be6 Notify pipeline restructuring
Notifcation configs may have multiple notification destinations.
This commit changes the pipeline so that each one has its own
retry and deduplication logic.
2015-10-10 15:11:37 +02:00
Fabian Reinartz 9cd90d3482 Implement retrying notifier
Retrying notifier is added to the end of the pipeline where it retries
sending out the final notifications until the context times out.
Exponential backoff is used.
2015-10-09 09:37:32 +02:00
Fabian Reinartz 0a5a7691fe Encapsulate context values in package.
Setting and getting of context values are done via helper
methods in the notifier package. The used keys are unexported. Thus,
we ensure that external code cannot overwrite the values and the type
is always correct.
2015-10-09 08:43:39 +02:00
Fabian Reinartz 638b3f9f40 Use a fixed now time through notify pipeline 2015-10-09 08:26:41 +02:00
Fabian Reinartz d1379a3f71 Move repeat_interval and send_resolved to route configuration 2015-10-08 10:50:37 +02:00
Fabian Reinartz be915a3752 Adjust test to new notify provider interface 2015-10-06 21:11:02 +02:00
Fabian Reinartz 8ee78e0e53 Fix formatting 2015-10-01 14:55:55 +02:00
Fabian Reinartz 0b4d58fbdb Switch to model.Alert 2015-10-01 14:53:49 +02:00
Fabian Reinartz 5ed89a72a5 Change to clearer alert time fields 2015-09-29 17:26:44 +02:00
Fabian Reinartz c3b36790eb Move notifiers into their own package 2015-09-29 15:36:36 +02:00