Splunk Search

Creating a Tabular report

runiyal
Path Finder

I have following output in the logfile -

The service /app/service/upload succeeded in 1.264000 seconds, Request: {usertext=userText, date=2016-08-03, uploadedBy=appuser, usertext=userText, location=c:\store\abc.pdf, system=App1, envName=local, folderNumber=test12345, uploadedDate=2016-08-02}, Response: {UUID=5b626db2-1e9e-4a6b-b4a7-6f91e45111b4, MIMETYPE=application/pdf, SIZE=65.0615234375 KB, DBID=156251}

Need to have a report like this -

                Total   Response Time (Sec) Size of Document (KB)
Application Uploads Min Max Avg   Min   Max Avg
App1             1000    .5 11.5    1.5   20    2150    80  
App2             500       1     20   2    50   3750    100 
App3             5500    .2  7.5     1     10   1750    50  

Can you gurus help in creating a script for such outputs?

Tags (1)
0 Karma

runiyal
Path Finder

Thanks a lot Rich. Works like a charm!

0 Karma

richgalloway
SplunkTrust
SplunkTrust

This should get you started.

index=foo | rex "in (?<respTime>\d+\.\d+) seconds.*system=(?<Application>[^,]+).*SIZE=(?<sizeKB>\d+\.\d+)" | stats count as TotalUploads min(respTime) as MinRespTime max(respTime) as MaxRespTime avg(respTime) as AvgRespTime min(sizeKB) as MinSize max(sizeKB) as MaxSize avg(sizeKB) as AvgSize by Application
---
If this reply helps you, Karma would be appreciated.
0 Karma
Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.

Can’t make it to .conf25? Join us online!

Get Updates on the Splunk Community!

Can’t Make It to Boston? Stream .conf25 and Learn with Haya Husain

Boston may be buzzing this September with Splunk University and .conf25, but you don’t have to pack a bag to ...

Splunk Lantern’s Guide to The Most Popular .conf25 Sessions

Splunk Lantern is a Splunk customer success center that provides advice from Splunk experts on valuable data ...

Unlock What’s Next: The Splunk Cloud Platform at .conf25

In just a few days, Boston will be buzzing as the Splunk team and thousands of community members come together ...