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!

Splunk Mobile: Your Brand-New Home Screen

Meet Your New Mobile Hub  Hello Splunk Community!  Staying connected to your data—no matter where you are—is ...

Introducing Value Insights (Beta): Understand the Business Impact your organization ...

Real progress on your strategic priorities starts with knowing the business outcomes your teams are delivering ...

Enterprise Security (ES) Essentials 8.3 is Now GA — Smarter Detections, Faster ...

As of today, Enterprise Security (ES) Essentials 8.3 is now generally available, helping SOC teams simplify ...