6
6
package org.opensearch.alerting
7
7
8
8
import org.opensearch.action.ActionRequest
9
+ import org.opensearch.alerting.action.DocLevelMonitorFanOutAction
9
10
import org.opensearch.alerting.action.ExecuteMonitorAction
10
11
import org.opensearch.alerting.action.ExecuteWorkflowAction
11
12
import org.opensearch.alerting.action.GetDestinationsAction
@@ -55,6 +56,7 @@ import org.opensearch.alerting.transport.TransportAcknowledgeAlertAction
55
56
import org.opensearch.alerting.transport.TransportAcknowledgeChainedAlertAction
56
57
import org.opensearch.alerting.transport.TransportDeleteMonitorAction
57
58
import org.opensearch.alerting.transport.TransportDeleteWorkflowAction
59
+ import org.opensearch.alerting.transport.TransportDocLevelMonitorFanOutAction
58
60
import org.opensearch.alerting.transport.TransportExecuteMonitorAction
59
61
import org.opensearch.alerting.transport.TransportExecuteWorkflowAction
60
62
import org.opensearch.alerting.transport.TransportGetAlertsAction
@@ -220,6 +222,7 @@ internal class AlertingPlugin : PainlessExtension, ActionPlugin, ScriptPlugin, R
220
222
ActionPlugin .ActionHandler (AlertingActions .DELETE_WORKFLOW_ACTION_TYPE , TransportDeleteWorkflowAction ::class .java),
221
223
ActionPlugin .ActionHandler (ExecuteWorkflowAction .INSTANCE , TransportExecuteWorkflowAction ::class .java),
222
224
ActionPlugin .ActionHandler (GetRemoteIndexesAction .INSTANCE , TransportGetRemoteIndexesAction ::class .java),
225
+ ActionPlugin .ActionHandler (DocLevelMonitorFanOutAction .INSTANCE , TransportDocLevelMonitorFanOutAction ::class .java)
223
226
)
224
227
}
225
228
@@ -254,6 +257,8 @@ internal class AlertingPlugin : PainlessExtension, ActionPlugin, ScriptPlugin, R
254
257
val settings = environment.settings()
255
258
val lockService = LockService (client, clusterService)
256
259
alertIndices = AlertIndices (settings, client, threadPool, clusterService)
260
+ val alertService = AlertService (client, xContentRegistry, alertIndices)
261
+ val triggerService = TriggerService (scriptService)
257
262
runner = MonitorRunnerService
258
263
.registerClusterService(clusterService)
259
264
.registerClient(client)
@@ -264,8 +269,8 @@ internal class AlertingPlugin : PainlessExtension, ActionPlugin, ScriptPlugin, R
264
269
.registerThreadPool(threadPool)
265
270
.registerAlertIndices(alertIndices)
266
271
.registerInputService(InputService (client, scriptService, namedWriteableRegistry, xContentRegistry, clusterService, settings))
267
- .registerTriggerService(TriggerService (scriptService) )
268
- .registerAlertService(AlertService (client, xContentRegistry, alertIndices) )
272
+ .registerTriggerService(triggerService )
273
+ .registerAlertService(alertService )
269
274
.registerDocLevelMonitorQueries(DocLevelMonitorQueries (client, clusterService))
270
275
.registerJvmStats(JvmStats .jvmStats())
271
276
.registerWorkflowService(WorkflowService (client, xContentRegistry))
@@ -296,7 +301,17 @@ internal class AlertingPlugin : PainlessExtension, ActionPlugin, ScriptPlugin, R
296
301
297
302
DeleteMonitorService .initialize(client, lockService)
298
303
299
- return listOf (sweeper, scheduler, runner, scheduledJobIndices, docLevelMonitorQueries, destinationMigrationCoordinator, lockService)
304
+ return listOf (
305
+ sweeper,
306
+ scheduler,
307
+ runner,
308
+ scheduledJobIndices,
309
+ docLevelMonitorQueries,
310
+ destinationMigrationCoordinator,
311
+ lockService,
312
+ alertService,
313
+ triggerService
314
+ )
300
315
}
301
316
302
317
override fun getSettings (): List <Setting <* >> {
@@ -327,6 +342,7 @@ internal class AlertingPlugin : PainlessExtension, ActionPlugin, ScriptPlugin, R
327
342
AlertingSettings .ALERT_HISTORY_RETENTION_PERIOD ,
328
343
AlertingSettings .ALERTING_MAX_MONITORS ,
329
344
AlertingSettings .PERCOLATE_QUERY_DOCS_SIZE_MEMORY_PERCENTAGE_LIMIT ,
345
+ AlertingSettings .DOC_LEVEL_MONITOR_FAN_OUT_NODES ,
330
346
DOC_LEVEL_MONITOR_SHARD_FETCH_SIZE ,
331
347
AlertingSettings .PERCOLATE_QUERY_MAX_NUM_DOCS_IN_MEMORY ,
332
348
AlertingSettings .REQUEST_TIMEOUT ,
0 commit comments