Commit Graph

885 Commits

Author SHA1 Message Date
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
Fabian Reinartz
6ad866dd27 types: validate ID existance for silences 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
c5d006537b main: simplify meshWait function 2016-08-09 12:00:28 +02:00
Fabian Reinartz
26b6eac6e1 *: add Procfile for example setup
This add a Procfile that can be run with `goreman start`. It starts
three Alertmanagers and one webhook receiver. The webhook receiver
simply reflects sent messages.
The send_alerts.sh script simulates a set of alerts sent by a Prometheus
server to all Alertmanagers at once.
2016-08-09 12:00:28 +02:00
Fabian Reinartz
c59f39557b notify,main: implement peer based notify backoff
This commit implements a wait period before actually dispatching
notifications. The backoff linearly depends on the UID order of
participating peers.
This gives the gossip state time to catch up and avoids duplicate
notifications while ensuring that every peer notifies eventually.
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
c8a22d5750 main: use flags as arguments instead of globals 2016-08-09 11:59:35 +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
c308b616c1 vendor: add weaveworks/mesh 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
2d0444cac1 vendor: add github.com/satori/go.uuid 2016-08-09 11:48:38 +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
4b3830310e Merge pull request #446 from prometheus/fabxc-retryctx
notify: always check context before retrying
2016-08-05 10:43:47 +02:00
Fabian Reinartz
bdcd3770ca notify: always check context before retrying
This addresses the misleading error messages reported in #212
Explanation: https://github.com/prometheus/alertmanager/issues/282#issuecomment-237784895

Fixes #282
2016-08-05 10:18:10 +02:00
Fabian Reinartz
66142a9115 Merge pull request #443 from prometheus/fabxc-empty-slack
config: make Slack channel optional
2016-08-03 10:06:10 +02:00
Fabian Reinartz
f8de58b6b6 config: make Slack channel optional 2016-08-03 08:24:42 +02:00
Fabian Reinartz
a9f7c9f318 Merge pull request #429 from mattbostock/hide_silenced_groups
Hide groups if all alerts within are silenced
2016-07-28 14:42:14 -07:00
Matt Bostock
16d8afd5a8 Hide groups if all alerts within are silenced
Currently, even if all alerts within a group are silenced, the group
summary still appears. This can take up a lot of space when many alerts
are silenced.

If all alerts in a group are silenced and 'Hide silences' is checked,
hide the empty group.

bindata was updated by running:

    make assets format
2016-07-28 13:28:12 +01:00
Fabian Reinartz
5b64baa419 Update Travis Go versions 2016-07-27 11:58:56 -07:00
Fabian Reinartz
42696d91de Merge pull request #417 from rhazdon/master
Add VictorOps Notifier
2016-07-27 11:58:32 -07:00
Djordje Atlialp
8e0f405e67 Add VictorOps Notifier
Add default VictorOpsAPIURL

Add VictorOps default config

Add VictorOpsConfig struct in notifiers

Add new template tags for victorops

Add notifications logic for victorops

Compiled template tags with make assets

Remove common labels from entity_id template

Set messageType default value to CRITICAL

Recovery messageType is not configurable anymore. Firing state only allows specific keys

Make assets

Using log.Debugf

EntityID should not be configureable

Remove entity_id from template

Use GroupKey(ctx) as entity_id

Improve debug logging

Fix type of entity_id
2016-07-27 00:49:05 +02:00
Fabian Reinartz
9a2132a45b Revert "circle: tag pre-release docker images"
This reverts commit 8c2320752e.
2016-07-14 11:40:10 +09:00
Fabian Reinartz
8c2320752e circle: tag pre-release docker images 2016-07-14 11:36:39 +09:00
Julius Volz
50aac965ba Merge pull request #426 from tcolgate/master
OpsGenie Notifier, fixes and additions:
2016-07-13 01:31:53 +02:00
Tristan Colgate
de2252911e OpsGenie Notifier, fixes and additions:
- OpsGenie notifier confused the description and message fields
- Also added the notes field.
2016-07-12 16:20:23 +01:00
Fabian Reinartz
42c193b136 Merge pull request #424 from prometheus/sdurrheimer/fix-circleci-regex
circleci : fix missing regex update for v-prefiexed tags
2016-07-09 19:19:34 +02:00