-
TLDR: How can I conditionally parse logs or event fields with regex, to assign "codes" to events (i.e. map certain strings to specific integers). BackgroundI am creating a SIEM tool loosely based on DSIEM and OSSIM. Coming up with a basic set of plugins (ingest) and directives (triggers for alarms) is non-trivial thus I have decided to adopt the base OSSIM plugins and directives. Events are ingested by Fluentbit (in this case, say logs), and then a "correlation engine" raises an alarm if say 10_000 requests hit the Apache server in 1s from the same IP address. This an example of a directive. The directives reference ProblemHow can I conditionally add keys to events based on regex? In pseudocode:
ExampleHere is an OSSIM plugin that reads
Solutions I have considered
ETA: on lua regex support |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Note you can add custom lua libraries for regular expressions though you need to build the package manually to consume |
Beta Was this translation helpful? Give feedback.
Note you can add custom lua libraries for regular expressions though you need to build the package manually to consume