Splunk Search

How to 'grep' multi-line event?

axelabs
Explorer

How would I perform a Unix grep on a multi-line event? Ex.:

_raw="one
two
three"
_raw="tree
bee
eleven"

I'd like to apply something like the following to my search | eval _raw=grep(_raw, "ee") and get:

_raw="three"
_raw="tree
bee"

* I only have access to searching existing logs with multi-line events.

Tags (2)
0 Karma

axelabs
Explorer

FYI: It is possible to split a multi-line event into a bunch of events and 'grep' the results with another | search. See: https://answers.splunk.com/comments/619554/view.html

0 Karma
Get Updates on the Splunk Community!

Stay Connected: Your Guide to May Tech Talks, Office Hours, and Webinars!

Take a look below to explore our upcoming Community Office Hours, Tech Talks, and Webinars this month. This ...

They're back! Join the SplunkTrust and MVP at .conf24

With our highly anticipated annual conference, .conf, comes the fez-wearers you can trust! The SplunkTrust, as ...

Enterprise Security Content Update (ESCU) | New Releases

Last month, the Splunk Threat Research Team had two releases of new security content via the Enterprise ...