Skip to content

Commit

Permalink
add findings enabled flag in datasources
Browse files Browse the repository at this point in the history
Signed-off-by: Surya Sashank Nistala <snistala@amazon.com>
  • Loading branch information
eirsep committed Nov 2, 2022
1 parent 65395db commit f5ee243
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,8 @@ private void createAlertingMonitorFromQueries(Pair<String, List<Pair<String, Rul
detector.getAlertsIndex(),
detector.getAlertsHistoryIndex(),
detector.getAlertsHistoryIndexPattern(),
DetectorMonitorConfig.getRuleIndexMappingsByType(detector.getDetectorType())));
DetectorMonitorConfig.getRuleIndexMappingsByType(detector.getDetectorType()),
true));

IndexMonitorRequest indexMonitorRequest = new IndexMonitorRequest(Monitor.NO_ID, SequenceNumbers.UNASSIGNED_SEQ_NO, SequenceNumbers.UNASSIGNED_PRIMARY_TERM, refreshPolicy, RestRequest.Method.POST, monitor);
AlertingPluginInterface.INSTANCE.indexMonitor((NodeClient) client, indexMonitorRequest, listener);
Expand Down Expand Up @@ -226,7 +227,8 @@ private void updateAlertingMonitorFromQueries(Pair<String, List<Pair<String, Rul
detector.getAlertsIndex(),
detector.getAlertsHistoryIndex(),
detector.getAlertsHistoryIndexPattern(),
DetectorMonitorConfig.getRuleIndexMappingsByType(detector.getDetectorType())));
DetectorMonitorConfig.getRuleIndexMappingsByType(detector.getDetectorType()),
true));

IndexMonitorRequest indexMonitorRequest = new IndexMonitorRequest(detector.getMonitorIds().get(0), SequenceNumbers.UNASSIGNED_SEQ_NO, SequenceNumbers.UNASSIGNED_PRIMARY_TERM, refreshPolicy, RestRequest.Method.PUT, monitor);
AlertingPluginInterface.INSTANCE.indexMonitor((NodeClient) client, indexMonitorRequest, listener);
Expand Down

0 comments on commit f5ee243

Please sign in to comment.