Commit Graph

305 Commits

Author SHA1 Message Date
Martijn van Groningen 27f83bb621 Clear the queue once the reader thread sees that it needs to stop.
Original commit: elastic/x-pack-elasticsearch@b70a224ff1
2014-11-27 12:14:30 +01:00
Martijn van Groningen 1cd5ae6a31 Added assertion
Original commit: elastic/x-pack-elasticsearch@3aae405242
2014-11-27 11:40:56 +01:00
Martijn van Groningen 29dd1bb888 Removed error log for null values
Original commit: elastic/x-pack-elasticsearch@4477fc1c2a
2014-11-27 10:17:51 +01:00
Martijn van Groningen 775f1cb878 Increased logging
Original commit: elastic/x-pack-elasticsearch@375279fca5
2014-11-27 09:53:10 +01:00
Martijn van Groningen 45ee1d2d9b Test: Added test that uses an agg in a trigger.
Original commit: elastic/x-pack-elasticsearch@ad87b18aa5
2014-11-26 23:31:40 +01:00
Martijn van Groningen 3965cb194c Make sure that the alerts templates get applied and disabled test template since it conflicts with the alerts templates.
Original commit: elastic/x-pack-elasticsearch@ddd178da78
2014-11-26 23:23:15 +01:00
Martijn van Groningen e4d10c58a9 Core: load alert store before the action manager, b/c action depends on alert store
Original commit: elastic/x-pack-elasticsearch@6aa3cb33b0
2014-11-26 22:51:34 +01:00
Martijn van Groningen 56a121109d Simplified getAlertHistoryIndexNameForTime()
Original commit: elastic/x-pack-elasticsearch@08ce6daf75
2014-11-26 22:38:40 +01:00
Martijn van Groningen 4048bfe55c Removed explicit delete index calls, because it redundant and the test framework wipes the clusters between tests.
Original commit: elastic/x-pack-elasticsearch@eebeef3bee
2014-11-26 22:18:19 +01:00
Martijn van Groningen 6b4f68fcb3 Test: made the simple no master node test more useful
Original commit: elastic/x-pack-elasticsearch@4ffc11d702
2014-11-26 22:00:26 +01:00
Martijn van Groningen 168bed9d32 Restored some code and fix the assert trigger methods
Original commit: elastic/x-pack-elasticsearch@7ca18b77b9
2014-11-26 21:56:13 +01:00
Brian Murphy 871274adbd Add back in the exists checks for the alert history indices.
Original commit: elastic/x-pack-elasticsearch@a170742e56
2014-11-26 18:17:31 +00:00
Brian Murphy 87e056d762 Fix missing index issue by explicitly creating the index if implicit creation fails
This really shouldn't be happening.

Original commit: elastic/x-pack-elasticsearch@7d334ec76f
2014-11-26 18:10:52 +00:00
Brian Murphy 193865925c Properly catch errors on startup and return false from start if we get errors looking for the alert history indices.
Original commit: elastic/x-pack-elasticsearch@9db4691783
2014-11-26 17:27:22 +00:00
Brian Murphy 779e7e83c0 TEST Fix Bootstrap test that got munged by merge.
Original commit: elastic/x-pack-elasticsearch@b0f40fd764
2014-11-26 16:28:11 +00:00
Brian Murphy c55ebc29e2 Merge pull request elastic/elasticsearch#49 from elasticsearch/timebased_histroy
Timebased history index

Original commit: elastic/x-pack-elasticsearch@0be1188599
2014-11-26 16:00:58 +00:00
Brian Murphy f8e26c2f75 Remove dependency on the alert history indices being started in the actions.
Original commit: elastic/x-pack-elasticsearch@a3f0e0fe46
2014-11-26 15:58:52 +00:00
Brian Murphy 713327cee5 TEST : Add bootstrap test to boot strap different history indices.
Original commit: elastic/x-pack-elasticsearch@72c36f6d4d
2014-11-26 15:58:52 +00:00
Brian Murphy aaef7de62d TEST: This test got forgotten when I squash the commits.
Original commit: elastic/x-pack-elasticsearch@5109b4bea6
2014-11-26 15:58:52 +00:00
Brian Murphy 914a5035fd Remove merge conflict in comment.
Original commit: elastic/x-pack-elasticsearch@aa4bb3dab6
2014-11-26 15:58:52 +00:00
Brian Murphy f6027e9a6b Alert History : Make alert history index time based.
This commit makes the alert history index a time based index.
The alert history now is a timebased index prefixed with .alert_history_
with the time fomat YYYY-MM-dd.

This commit makes the alert history index a time based index.

Original commit: elastic/x-pack-elasticsearch@df6d6dee29
2014-11-26 15:58:52 +00:00
Martijn van Groningen 8512dfcb36 Removed enable from Alert.
Original commit: elastic/x-pack-elasticsearch@d65a883f70
2014-11-26 15:30:11 +01:00
Martijn van Groningen b0b3721f84 Added forgotten cluster block check
Original commit: elastic/x-pack-elasticsearch@022be40b54
2014-11-26 14:59:27 +01:00
Martijn van Groningen a34504b45e Test: stabilize the alert stopping during test cluster close and between tests.
Original commit: elastic/x-pack-elasticsearch@f2e7818d86
2014-11-26 12:21:05 +01:00
Martijn van Groningen b7dfde7de7 Changed the way alerting gets shut down when the test cluster gets closed.
Original commit: elastic/x-pack-elasticsearch@74c148c025
2014-11-26 00:26:43 +01:00
Martijn van Groningen 470fb053fd Load quartz job in batch style when starting the scheduler.
Original commit: elastic/x-pack-elasticsearch@9bcf84092a
2014-11-25 21:18:02 +01:00
Martijn van Groningen c9e181e597 Test: Replaced the internal clearing of the alert manager between tests with public stop alert service, delete alerts and alerts history index and start alert service calls.
Original commit: elastic/x-pack-elasticsearch@57c0120eb4
2014-11-25 15:12:00 +01:00
Martijn van Groningen 4b147b8f85 Fixes updating an existing alert works as expected.
Original commit: elastic/x-pack-elasticsearch@236407367a
2014-11-25 13:21:37 +01:00
Martijn van Groningen 00bfd694af Tests: restart action manager before clearing store between tests
Original commit: elastic/x-pack-elasticsearch@15f057c820
2014-11-25 00:17:43 +01:00
Martijn van Groningen 4eca3c86a0 Tests: restart the action manager between tests.
Original commit: elastic/x-pack-elasticsearch@73bc51717b
2014-11-24 21:33:30 +01:00
Martijn van Groningen 98bb60e4ba improve assert
Original commit: elastic/x-pack-elasticsearch@cfedeb5da8
2014-11-24 21:27:14 +01:00
Martijn van Groningen 7eb1ec8ba0 Test: Also clear the alert actions te be processed between tests.
Original commit: elastic/x-pack-elasticsearch@f6da5717aa
2014-11-24 21:14:18 +01:00
Martijn van Groningen 53ef534567 No need to clear the scheduler when it is going to be shut down.
Original commit: elastic/x-pack-elasticsearch@5e8e4134ee
2014-11-24 21:06:47 +01:00
Martijn van Groningen 3c896c3d44 Test: Fix mistake, this test requires cluster scope test
Original commit: elastic/x-pack-elasticsearch@e84b055c19
2014-11-24 18:38:03 +01:00
Martijn van Groningen 1a4e118d0d Improving the starting and stop logic of the alert manager.
- Remove synchronized
- Add STOPPING state
- Expose alert state in stats api
- Let the test framework disable alerting before closing the test cluster

Original commit: elastic/x-pack-elasticsearch@5794f5fd8f
2014-11-24 17:35:10 +01:00
Martijn van Groningen 4e543ded65 Test: Move ClusterScope annotation to base alerting test class.
Original commit: elastic/x-pack-elasticsearch@96bb107c03
2014-11-24 16:21:45 +01:00
Martijn van Groningen 619afe51af Test: use refresh and assertBusy
Original commit: elastic/x-pack-elasticsearch@44e0dab7ef
2014-11-24 10:15:14 +01:00
Martijn van Groningen e0eecc5550 Test: ensure alerting is started before adding alerts
Original commit: elastic/x-pack-elasticsearch@f034d20016
2014-11-23 21:02:21 +01:00
Martijn van Groningen 44b9d8229f Set the manually stopped flag we a node gets shutdown.
Original commit: elastic/x-pack-elasticsearch@f3841481b0
2014-11-23 20:55:40 +01:00
Martijn van Groningen 4e239a8be6 Test: check no master block on all nodes
Original commit: elastic/x-pack-elasticsearch@611ce01d69
2014-11-23 20:32:50 +01:00
Martijn van Groningen beb4fada5f Core: Changed the loading logic in AlertManager to happen all in a single forked thread only. Also retry attempts stay on the the same thread and is only done if there is a new cluster state version.
Test: Added first version of test that fails the elected master multiple times.

Original commit: elastic/x-pack-elasticsearch@2f7b840f5a
2014-11-21 18:15:09 +01:00
Brian Murphy c471abdab5 Merge branch 'master' of https://github.com/elasticsearch/elasticsearch-alerts
Original commit: elastic/x-pack-elasticsearch@7aee9aef96
2014-11-21 15:52:08 +00:00
Martijn van Groningen e6336010be Changed info log into debug log
Original commit: elastic/x-pack-elasticsearch@b142696ca5
2014-11-21 14:30:51 +01:00
Brian Murphy 97bbd747ea DOCS : Add REST API doc for akcing alerts.
Original commit: elastic/x-pack-elasticsearch@633444773d
2014-11-21 12:52:31 +00:00
Martijn van Groningen bb4d85a1a7 Removed error log statement
Original commit: elastic/x-pack-elasticsearch@8a33309b71
2014-11-21 13:44:18 +01:00
Martijn van Groningen 1adb25127b Added start, stop and restart apis.
Closes elastic/elasticsearch#37

Original commit: elastic/x-pack-elasticsearch@6d491c4cec
2014-11-21 12:28:54 +01:00
Brian Murphy 6ea6256e35 TEST : Fix ACK test
Get the count AFTER we ack.

Original commit: elastic/x-pack-elasticsearch@23dacea151
2014-11-21 10:41:08 +00:00
Martijn van Groningen c4787d9160 fixed bug, expected and update was swapped.
Original commit: elastic/x-pack-elasticsearch@78e42879be
2014-11-21 01:01:29 +01:00
Brian Murphy 178a701724 ACKS : Fix some issues when a transport client was used.
Original commit: elastic/x-pack-elasticsearch@9276820a90
2014-11-20 22:24:25 +00:00
Brian Murphy 42d484b62a TEST: Add extra logging when alert didn't trigger an action.
Original commit: elastic/x-pack-elasticsearch@bc389fccdc
2014-11-20 22:22:50 +00:00