This commit adds a keyed lock to prevent concurrent modification of the alert store and alert index.
Original commit: elastic/x-pack-elasticsearch@416351c06d
With this commit alert actions are simple pojos with the action descriptions. The actual actions are undertaken by the AlertActionFactories.
Original commit: elastic/x-pack-elasticsearch@d47b453018
Core: synchronized initializing and stopping the scheduler to avoid scheduler stops leaving leaking threads behind
Original commit: elastic/x-pack-elasticsearch@b845651430
Before the index templates were installed via json files in the config directory, this commit installs templates from the classpath via the put index template api.
Also template versioning is enforced.
Original commit: elastic/x-pack-elasticsearch@22f6596015
This change changes the trigger manager to be pluggable.
Also removes the SimpleTrigger class, for now all triggers should be scripts.
Original commit: elastic/x-pack-elasticsearch@f7d0cb77e7
This commit adds the license header to all java files and enforces the license check on compile.
It also adds javadocs for all the methods in the AlertClientInterface
Original commit: elastic/x-pack-elasticsearch@2ec6f89b4b
This commit moves the execution of the alert trigger to the AlertActions queued thread.
Also change the states of AlertActionEntry to include SEARCH_NEEDED and ERROR and remove now uneeded states.
AlertActions now take a TriggerResult instead of an alert action entry.
Original commit: elastic/x-pack-elasticsearch@2b650ca4c1
This commit removes the uneeded addAlert methods in AlertManager and AlertsStore and
also changes the IndexAlertAction.NAME to "indices:data/write/alert/index"
Original commit: elastic/x-pack-elasticsearch@19013dcf3e
This commit removes the update action and renames the create action to index.
It also hides the Alert objects behind the interface rather than exposing them.
This means that all interactions should be via BytesReferences.
Original commit: elastic/x-pack-elasticsearch@87ac377d3e
* Reduce needed code to index Alert and AlertActionEntry
* Added scroll for loading action needed alert action entries
Original commit: elastic/x-pack-elasticsearch@a7b790ecc4
This commit :
1. Ensures an alert will run even if the lastFireTime is null (first time we see an alert)
2. Removes the incorrect license that existed in some of the files.
3. Cuts the BasicTest over to use the AlertsClient and deletes the alert at the end of the test
to prevent it running in a race condition.
4. Moves the execute method signatures in AlertsClient to be on a single line.
Original commit: elastic/x-pack-elasticsearch@9c3aec0127
This commit fixes the test and tests to make sure the alert we get back from
the alertsstore isn't null in execute alert since it may have been deleted.
Original commit: elastic/x-pack-elasticsearch@7a57dd090a
This change adds the AlertActionManager and AlertActionEntry. The old AlertActionManager has become the AlertActionRegistry.
This means that now the results of Alerts are queued up in a job queue and executed in separate threads.
The AlertActionManager is a composite member of the AlertManager.
Change the BasicTest to just run on a single node to fix the action registration if the action happens on a different node.
Threads are not directly constructed but now the threadpool is used.
The ClusterStateListener in AlertManager is responsible now for starting the job queue.
Original commit: elastic/x-pack-elasticsearch@a73c6b60f8
* Using cluster state listener to clear alerts when .alerts index is removed. (when running on multiple nodes the .alerts index is scattered so indices listener doesn't work).
* Remove the starting / loading thread and move the initial loading to cluster state listener.
Original commit: elastic/x-pack-elasticsearch@b8f41db2ea
* Made use of IndicesLifecycle, to catch when the .alerts index gets deleted, so we can clear the alerts
* Moved to concurrent hashmap in favour over normal hashmap with synchronized blocks
Original commit: elastic/x-pack-elasticsearch@5599d01c78
This commit renames the alerting package to alerts and will create the
alerts index on addAlert if needed.
Original commit: elastic/x-pack-elasticsearch@7cd691bd9b
On alert claim time, query index to make sure alert is still valid and enabled and is the same alert.
Original commit: elastic/x-pack-elasticsearch@72b816b7d1
This commit adds support for disabling alerts.
This commit adds preliminary support for scripted triggers.
Original commit: elastic/x-pack-elasticsearch@e14a56dbeb
This commit contains fixes to the IndexAlertAction and normalizes the serialization of
Alerts using ToXContent interface.
Original commit: elastic/x-pack-elasticsearch@47325bdd01
This commit add functionality so that multiple nodes running alert plugins won't stand on
each other trying to run the same alerts at the same time.
Original commit: elastic/x-pack-elasticsearch@9c350c0114
This commit adds timestamp clamping on the timeperiod to alerting.
Also adds index setting on alerts.
Original commit: elastic/x-pack-elasticsearch@222cd6eaef
This commit adds parsing of the triggers and actions, and allows alerts to be restricted to indices.
Original commit: elastic/x-pack-elasticsearch@44a6a51b17
This commit enables loading of alerts from the .alerts index and adds the
Quartz scheduler.
You can add the following alert :
````
curl -XPOST http://localhost:9200/.alerts/alert/myTestAlert -d '{
"query" : "myAlertQuery",
"schedule" : "00 * * * * ?",
"trigger" : {
"numberOfEvents" : ">1"
},
"timeperiod" : 300,
"action" : {
"email" : [ "brian.murphy@elasticsearch.com" ]
},
"version" : 1,
"lastRan" : "2014-05-05T12:12:12.123Z"
}
````
With the following search template:
````
curl -XPOST localhost:9200/_search/template/myAlertQuery -d '{ "template" : { "query" : { "match_all" : {} } } }'
````
This will execute the search every minute and trigger if there is more than one match (which there will be).
Original commit: elastic/x-pack-elasticsearch@708f927914