Skip to content

Commit f958832

Browse files
committed
Refactor where clause in plugins README for cleaner expression and improved maintainability.
Signed-off-by: Osmany Montero <osmontero@icloud.com>
1 parent 09228f0 commit f958832

1 file changed

Lines changed: 1 addition & 6 deletions

File tree

plugins/README.md

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -108,12 +108,7 @@ A rule is defined as a YAML object with the following fields:
108108
references: # External references
109109
- https://quantfall.com
110110
description: This is a testing rule. # Description of the rule
111-
where: # Conditions for when the rule applies
112-
variables: # Variables to extract from the event
113-
- get: origin.geolocation.country # Path to the value in the event
114-
as: country # Name of the variable
115-
ofType: "string" # Type of the variable (required)
116-
expression: country_ok && country == "United States" # Expression to evaluate
111+
where: has(origin.geolocation.country) && origin.geolocation.country == "United States" # Expression to evaluate
117112
afterEvents: # Additional events to search for
118113
- indexPattern: v11-log-* # Index pattern to search in
119114
with: # Conditions for the search

0 commit comments

Comments
 (0)