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!

Get the T-shirt to Prove You Survived Splunk University Bootcamp

As if Splunk University, in Las Vegas, in-person, with three days of bootcamps and labs weren’t enough, now ...

Introducing the Splunk Community Dashboard Challenge!

Welcome to Splunk Community Dashboard Challenge! This is your chance to showcase your skills in creating ...

Wondering How to Build Resiliency in the Cloud?

IT leaders are choosing Splunk Cloud as an ideal cloud transformation platform to drive business resilience,  ...