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 12, 2023
1 parent 6dabe61 commit 528b978
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 @@ -474,7 +474,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 528b978

Please sign in to comment.