Splunk Search

IIS Status Field

rcovert
Path Finder

Hi,

I am having trouble getting Splunk to read the status field from my logs. I have put the following in my props.conf and restarted Splunk:

[iis]
TZ = GMT
CHECK_FOR_HEADER = true
FIELDALIAS-status = "sc-status" AS status

If I search for eventtype=web-traffic, I see results. But, when I search eventtype=web-traffic status=200, I get 0 results.

My indexer in on Linux, forwarder on Windows. Can anyone help me?

Tags (1)
0 Karma
1 Solution

rcovert
Path Finder

Well, I figured it out on my own. In case anyone else has the same problem, this is what I did. First, I put this in my props.conf:

[iis]
TZ = GMT
CHECK_FOR_HEADER = true
REPORT-AutoHeader = AutoHeader-1
FIELDALIAS-status = c_ip AS clientip cs_Referer_ AS referer_domain cs_User_Agent_ AS useragent cs_host AS host cs_method AS method cs_uri_query AS q cs_uri_stem AS uri sc_status AS status

and this in transforms.conf:
[AutoHeader-1]
DELIMS = " "
FIELDS = "date", "time", "s-ip", "cs-method", "cs-uri-stem", "cs-uri-query", "s-port", "cs-username", "c-ip", "cs(User-Agent)", "sc-status", "sc-substatus", "sc-win32-status", "time-taken"

I'm not sure why the field aliases use a "_" instead of "-", but it works!

View solution in original post

0 Karma

rcovert
Path Finder

Well, I figured it out on my own. In case anyone else has the same problem, this is what I did. First, I put this in my props.conf:

[iis]
TZ = GMT
CHECK_FOR_HEADER = true
REPORT-AutoHeader = AutoHeader-1
FIELDALIAS-status = c_ip AS clientip cs_Referer_ AS referer_domain cs_User_Agent_ AS useragent cs_host AS host cs_method AS method cs_uri_query AS q cs_uri_stem AS uri sc_status AS status

and this in transforms.conf:
[AutoHeader-1]
DELIMS = " "
FIELDS = "date", "time", "s-ip", "cs-method", "cs-uri-stem", "cs-uri-query", "s-port", "cs-username", "c-ip", "cs(User-Agent)", "sc-status", "sc-substatus", "sc-win32-status", "time-taken"

I'm not sure why the field aliases use a "_" instead of "-", but it works!

0 Karma
Get Updates on the Splunk Community!

Observability | Use Synthetic Monitoring for Website Metadata Verification

If you are on Splunk Observability Cloud, you may already have Synthetic Monitoringin your observability ...

More Ways To Control Your Costs With Archived Metrics | Register for Tech Talk

Tuesday, May 14, 2024  |  11AM PT / 2PM ET Register to Attend Join us for this Tech Talk and learn how to ...

.conf24 | Personalize your .conf experience with Learning Paths!

Personalize your .conf24 Experience Learning paths allow you to level up your skill sets and dive deeper ...