Skip to content

Commit

Permalink
handle threat intel enabled check during detector updation
Browse files Browse the repository at this point in the history
  • Loading branch information
eirsep committed Oct 9, 2023
1 parent 8415d9f commit adbfdd5
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ private void createMonitorFromQueries(List<Pair<String, Rule>> rulesById, Detect

List<IndexMonitorRequest> monitorRequests = new ArrayList<>();

if (!docLevelRules.isEmpty()) {
if (!docLevelRules.isEmpty() || detector.getThreatIntelEnabled()) {
monitorRequests.add(createDocLevelMonitorRequest(docLevelRules, detector, refreshPolicy, Monitor.NO_ID, Method.POST));
}

Expand Down Expand Up @@ -471,7 +471,7 @@ public void onFailure(Exception e) {
Collectors.toList());

// Process doc level monitors
if (!docLevelRules.isEmpty()) {
if (!docLevelRules.isEmpty() || detector.getThreatIntelEnabled()) {
if (detector.getDocLevelMonitorId() == null) {
monitorsToBeAdded.add(createDocLevelMonitorRequest(docLevelRules, detector, refreshPolicy, Monitor.NO_ID, Method.POST));
} else {
Expand Down

0 comments on commit adbfdd5

Please sign in to comment.