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
adds the following actions and an AlertsClient with AlertsClientInterface.
CreateAlert : Creates an alert.
UpdateAlert : Updates an existing alert.
DeleteAlert : Deletes an existing alert.
GetAlert : Gets an existing alert.
Original commit: elastic/x-pack-elasticsearch@8638fa7e35
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