Splunk Search

Extract fields from log message

parameshjava
Explorer

I used AOP concept to track few methods execution time and it will print the log as follows :

Execution Time : [method Name, time] : getProfiles, 1631
Execution Time : [method Name, time] : getAddress, 1500
Execution Time : [method Name, time] : getReports, 100

Is there any way to generate table/chart for each entry in log as follows:

Method Nane | Time
getProfile |1631
getAddress |1500
getReports | 100

0 Karma
1 Solution

cpetterborg
SplunkTrust
SplunkTrust

Try this:

_your_search_ | rex "] : (?P<MethodName>[^,]*),\s*(?P<Time>\d*)" | table MethodName, Time

Then you can select a visualization from the Visualization tab in the interface.

View solution in original post

cpetterborg
SplunkTrust
SplunkTrust

Try this:

_your_search_ | rex "] : (?P<MethodName>[^,]*),\s*(?P<Time>\d*)" | table MethodName, Time

Then you can select a visualization from the Visualization tab in the interface.

parameshjava
Explorer

Thanks a lot, its perfectly worked.

0 Karma
Get Updates on the Splunk Community!

Webinar Recap | Revolutionizing IT Operations: The Transformative Power of AI and ML ...

The Transformative Power of AI and ML in Enhancing Observability   In the realm of IT operations, the ...

.conf24 | Registration Open!

Hello, hello! I come bearing good news: Registration for .conf24 is now open!   conf is Splunk’s rad annual ...

ICYMI - Check out the latest releases of Splunk Edge Processor

Splunk is pleased to announce the latest enhancements to Splunk Edge Processor.  HEC Receiver authorization ...