Splunk Search

How to prevent a space character from delimiting and truncating my filename field?

jravida
Communicator

Hi folks,

I have some new logs coming in, and I took a look at the fieldname that has a Windows filename in it, and it is being truncated after the space character (if there happens to be one).

The events are coming in via DB Connect, multiline, and I can see the whole filename in the _raw event:

event_guid=ABDC1234-EE33-43F3-ABCDEF
file_size=3432342
source_file=//home.local/home/caddev/usernameish/temp deck overview.pptx
target_path=

So the event is indexing fine, but when I search, and Splunk does it's generic field extraction, the source_file field turns into:

source_file=//home.local/home/caddev/usernameish/temp

Is there a quick way to fix this?

0 Karma

somesoni2
Revered Legend

The raw file is multiline events OR everything is coming in single line? Does the file name always contain extension of the file??

0 Karma

diogofgm
SplunkTrust
SplunkTrust

you need to build the extraction for that. A quick way is to use the extract fields in the event actions.
Check these splunk docs:
http://docs.splunk.com/Documentation/Splunk/6.2.5/Knowledge/ExtractfieldsinteractivelywithIFX

------------
Hope I was able to help you. If so, some karma would be appreciated.

jravida
Communicator

The extract fields utility is broken in my install. I'll have to investigate further, but for now it is erroring out.

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 ...