Splunk Enterprise

Monitor only name of the file ignoring the content of the file

Ashwini008
Builder

Hi, I want to index only name of the file generated and not the content of the file.

EX: FILE1

I am ABCD.

So i want to monitorand  index only FILE1 in splunk and ignore the content "i am ABCD".

can this be done in splunk? If so how?

Thanks!

0 Karma
1 Solution

to4kawa
Ultra Champion

props.conf

SEDCMD-trim= s/(?ms).*/./

 

How about this?

View solution in original post

0 Karma

to4kawa
Ultra Champion

props.conf

SEDCMD-trim= s/(?ms).*/./

 

How about this?

0 Karma

Ashwini008
Builder

I tried the above props.conf but it does not capture anything.It just give blank

I want to capture the filename.any other way to do this?

 

Tags (1)
0 Karma

to4kawa
Ultra Champion

your filename is contained in source field?

0 Karma

Ashwini008
Builder

Yes but with whole file directory

EX :opt/app/splunk/myapps/filename

 

Should i extract it from there?

0 Karma

to4kawa
Ultra Champion

yes, INGEST_eval can make new field.

0 Karma

Ashwini008
Builder

Thank you props.conf is working as expected.

Could you please let me know if INGEST_eval can be used during search time?

How to extract file name with this splunk command?

0 Karma
Get Updates on the Splunk Community!

Index This | What is broken 80% of the time by February?

December 2025 Edition   Hayyy Splunk Education Enthusiasts and the Eternally Curious!    We’re back with this ...

Unlock Faster Time-to-Value on Edge and Ingest Processor with New SPL2 Pipeline ...

Hello Splunk Community,   We're thrilled to share an exciting update that will help you manage your data more ...

Splunk MCP & Agentic AI: Machine Data Without Limits

Discover how the Splunk Model Context Protocol (MCP) Server can revolutionize the way your organization uses ...