Getting Data In

fschange filters for windows

heterodyned
Path Finder

I tried searching for documentation on how to implement filters for directories ( in fschange)

Could someone let me know where could I find documentation on this? the documentation page has an example to blacklist all the contents within a directory, how about a particular directory?

Here is my windows fschange implementation

[filter:blacklist:pamping]
regex1=\*\ignore\* ( tried c:\pamping\ignore\* didnt work)

[fschange:c:\pamping]
index = _audit
sourcetype = fschange
signedaudit = false
sendEventMaxSize = -1
recurse = true
disabled = false
pollPeriod = 60
filesPerDelay = 10
delayInMills = 100
followLinks = false
fullEvent = false
filters=pamping

The above filter which was set wasnt filtering events within the ignore directory, am i applying the filter incorrectly?

Tags (1)
1 Solution

Lowell
Super Champion

Looks like your regex is incorrect. Try using the filter:

[filter:blacklist:pamping]
regex1 = .*ignore.*

Or, for your origional path:

[filter:blacklist:pamping]
regex1 = c:\\pamping\\ignore\\.*

Keep in mind that when you are writting a regex, you have to use "\\" to match a single "\". And you have to use ".*" to mean match any character 0 or more times.

Your origional regex of "\*\ignore\*" is literally interpreted as match a literal "*" followed by an "i" (I don't think that "\i" means anything in regex speak, so this is my best guess) followed by gnore followed by a literal "*"; which isn't at all what you want. For a general regex introduction and other helpful resources, check out: http://www.regular-expressions.info/

View solution in original post

Lowell
Super Champion

Looks like your regex is incorrect. Try using the filter:

[filter:blacklist:pamping]
regex1 = .*ignore.*

Or, for your origional path:

[filter:blacklist:pamping]
regex1 = c:\\pamping\\ignore\\.*

Keep in mind that when you are writting a regex, you have to use "\\" to match a single "\". And you have to use ".*" to mean match any character 0 or more times.

Your origional regex of "\*\ignore\*" is literally interpreted as match a literal "*" followed by an "i" (I don't think that "\i" means anything in regex speak, so this is my best guess) followed by gnore followed by a literal "*"; which isn't at all what you want. For a general regex introduction and other helpful resources, check out: http://www.regular-expressions.info/

Lowell
Super Champion

Yeah. You can use either a literal forward slash like "/", or if you are writing rules that can be used on either location, then I use [/\\] which will match a single forwarder slash for unix, or a backslash for windows. As far as the delete parent stuff, I don't full get how that works myself. If you keep getting them after your initial filter change, then I would suggest posting another question about it.

0 Karma

heterodyned
Path Finder

Thank you so much, is this format specifically for windowS? or would it apply for Linux as well? For Linux I generally use the format
/Folder/Subfolder/* format, and it generally filters the data, but does a strange delete-parent, delete etc...

0 Karma
Get Updates on the Splunk Community!

Data Management Digest – December 2025

Welcome to the December edition of Data Management Digest! As we continue our journey of data innovation, the ...

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