Splunk Search

How to extract time-taken from IIS logs

yennaciri
New Member

We are trying to build an alert based on the 'time-taken' IIS field;
the query we have is:
sourcetype=iis_logs host="hostname" AND "POST /request/request" | rex "(?w*)$"

the restuls being returned include the entire IIS Log line:

2014-03-23 13:11:12 10.250.80.250 POST /request/request - 4301 Customer 10.250.80.11 - 200 0 0 951

What we'd like is to have the query returns the results as follows:
Host , Request URL , Time-taken

Thanks

Tags (1)
0 Karma

martin_mueller
SplunkTrust
SplunkTrust

Assuming the field names exist like this in your search, you can append this

... | table host request_url time_taken

to get your three-column table.

0 Karma
Get Updates on the Splunk Community!

Join Us for Splunk University and Get Your Bootcamp Game On!

If you know, you know! Splunk University is the vibe this summer so register today for bootcamps galore ...

.conf24 | Learning Tracks for Security, Observability, Platform, and Developers!

.conf24 is taking place at The Venetian in Las Vegas from June 11 - 14. Continue reading to learn about the ...

Announcing Scheduled Export GA for Dashboard Studio

We're excited to announce the general availability of Scheduled Export for Dashboard Studio. Starting in ...