Splunk Search

How to select only the procedure marked in bold through regex

JyotiP
Path Finder

Completed executing query test_proc_SelectLatest_PricesBySecurity which took 1 milliseconds.
Completed executing query test_proc_Select_ForCloseouts which took 42 milliseconds.
Completed executing query test_proc_Insert which took 12 milliseconds.
Completed executing query test_UnprocessedLot_Select which took 142 milliseconds.

Tags (1)
0 Karma

kmaron
Motivator

Try this:

| rex field=_raw "Completed executing query (?<Procedure>.*?) which took"
0 Karma

niketn
Legend

@JyotiP, can you please try the following? It extracts the procedure name and execution time(assuming time is always logged in milliseconds) .

<yourBaseSearch>
| rex "Completed executing query (?<procedure>[^\s]+)\swhich took (?<execution_time>[^\s]+)\smilliseconds."
____________________________________________
| makeresults | eval message= "Happy Splunking!!!"
0 Karma
Get Updates on the Splunk Community!

More Ways To Control Your Costs With Archived Metrics | Register for Tech Talk

Tuesday, May 14, 2024  |  11AM PT / 2PM ET Register to Attend Join us for this Tech Talk and learn how to ...

.conf24 | Personalize your .conf experience with Learning Paths!

Personalize your .conf24 Experience Learning paths allow you to level up your skill sets and dive deeper ...

Threat Hunting Unlocked: How to Uplevel Your Threat Hunting With the PEAK Framework ...

WATCH NOWAs AI starts tackling low level alerts, it's more critical than ever to uplevel your threat hunting ...