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!

Index This | I am a number, but when you add ‘G’ to me, I go away. What number am I?

March 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...

What’s New in Splunk App for PCI Compliance 5.3.1?

The Splunk App for PCI Compliance allows customers to extend the power of their existing Splunk solution with ...

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...