Getting Data In

filter data problem with windows path

my_splunk
Path Finder

I have installed splunk on windows 2008 to analyze iis log file.
I want to avoid to index log entries with 401 http status code, so i have used props.conf and transforms.conf files.

In props.conf i have:

[source::C:\\Users\\Administrator\\Desktop\\MyLogFolder\\mylogfile.log]

TRANSFORMS-nullcode= setnullcode

In transforms.conf file i have

[setnullcode]

REGEX = 401( [0-9]+){5}

DEST_KEY = queue

FORMAT = nullQueue

However i index log entries with 401 status code.
I have verified reg ex and it is all right, infact if i use in props.conf file

[host::myhost]

TRANSFORMS-nullcode= setnullcode

entries with 401 are correctly discarded.
Problem is with windows path....

Tags (1)
0 Karma

my_splunk
Path Finder

I have solved

In my first answer i wanted to write:

[source::C:\\Users\\Administrator\\Desktop\\MyLogFolder\\mylogfile.log]

i.e with a double \ but for my typing error i wrote with a single \

So my problem is with double \ in path.

I have solved typing path with a single \, i.e

[source::C:\Users\Administrator\Desktop\MyLogFolder\mylogfile.log]

At this point i think there is a problem in http://docs.splunk.com/Documentation/Splunk/latest/admin/propsconf doc, whete it is recommended to escape any backslashes contained within the specified file path in windows.

0 Karma

my_splunk
Path Finder

i don't understand.....in preview there are double \ and in published answer a single . However i hope it is clear my solution.

0 Karma

araitz
Splunk Employee
Splunk Employee

Not sure, are there any errors or related messages in $SPLUNK_HOME/var/log/splunk/splunkd.log?

0 Karma
Get Updates on the Splunk Community!

Stay Connected: Your Guide to May Tech Talks, Office Hours, and Webinars!

Take a look below to explore our upcoming Community Office Hours, Tech Talks, and Webinars this month. This ...

They're back! Join the SplunkTrust and MVP at .conf24

With our highly anticipated annual conference, .conf, comes the fez-wearers you can trust! The SplunkTrust, as ...

Enterprise Security Content Update (ESCU) | New Releases

Last month, the Splunk Threat Research Team had two releases of new security content via the Enterprise ...