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!

Troubleshooting the OpenTelemetry Collector

  In this tech talk, you’ll learn how to troubleshoot the OpenTelemetry collector - from checking the ...

Adoption of Infrastructure Monitoring at Splunk

  Splunk's Growth Engineering team showcases one of their first Splunk product adoption-Splunk Infrastructure ...

Modern way of developing distributed application using OTel

Recently, I had the opportunity to work on a complex microservice using Spring boot and Quarkus to develop a ...