Deployment Architecture

Input.conf issue monitoring same directory multiple times

Naa_Win
Path Finder

I have a inputs.conf where it will monitor all the files from a folder 

[monitor:///mydata/my_folder/ToSplunk/*.(mylogfile|edi.mylogfile|edi)]
index = xyz
_TCP_ROUTING = dev_indexers,qa_indexers
sourcetype = XYZ_SRCTYPE
crcSalt = <SOURCE>

Also, I wanted to monitor same directory with different files as a different sourcetype. Also these two stanza will have respective props. 

[monitor:///mydata/my_folder/ToSplunk/*.ABC.xml.ToSplunk.edi]
index = xyz
sourcetype = XYZ_SRCTYPE:ABC
_TCP_ROUTING = dev_indexers,qa_indexers
crcSalt = <SOURCE>

Tags (2)
0 Karma
1 Solution

Naa_Win
Path Finder

Hello @gcusello ,

Thanks for the reply. 

I had tried this way...
included blacklist to get rid of the (ABC.xml.ToSplunk.edi) file from falling under that sourcetype and made new stanza to take up other sourcetype, that worked !!

[monitor:///mydata/my_folder/ToSplunk/*.(mylogfile|edi.mylogfile|edi)]
index = xyz
_TCP_ROUTING = dev_indexers,qa_indexers
sourcetype = XYZ_SRCTYPE
blacklist= (ABC.xml.ToSplunk.edi)
crcSalt = <SOURCE>


[monitor:///mydata/my_folder/ToSplunk/*.ABC.xml.ToSplunk.edi]
index = xyz
sourcetype = XYZ_SRCTYPE:ABC
_TCP_ROUTING = dev_indexers,qa_indexers
crcSalt = <SOURCE>

I had similar issue with the source, can you help me how this works?
https://community.splunk.com/t5/Deployment-Architecture/stanza-for-inputs-conf-is-not-working/m-p/65... 

View solution in original post

0 Karma

Naa_Win
Path Finder

Hello @gcusello ,

Thanks for the reply. 

I had tried this way...
included blacklist to get rid of the (ABC.xml.ToSplunk.edi) file from falling under that sourcetype and made new stanza to take up other sourcetype, that worked !!

[monitor:///mydata/my_folder/ToSplunk/*.(mylogfile|edi.mylogfile|edi)]
index = xyz
_TCP_ROUTING = dev_indexers,qa_indexers
sourcetype = XYZ_SRCTYPE
blacklist= (ABC.xml.ToSplunk.edi)
crcSalt = <SOURCE>


[monitor:///mydata/my_folder/ToSplunk/*.ABC.xml.ToSplunk.edi]
index = xyz
sourcetype = XYZ_SRCTYPE:ABC
_TCP_ROUTING = dev_indexers,qa_indexers
crcSalt = <SOURCE>

I had similar issue with the source, can you help me how this works?
https://community.splunk.com/t5/Deployment-Architecture/stanza-for-inputs-conf-is-not-working/m-p/65... 

0 Karma

gcusello
SplunkTrust
SplunkTrust

Hi @Naa_Win,

good for you, see next time!

let me know if I can help you more, or, please, accept one answer for the other people of Community.

Ciao and happy splunking

Giuseppe

P.S.: Karma Points are appreciated 😉

0 Karma

gcusello
SplunkTrust
SplunkTrust

Hi @Naa_Win,

at first you cannot use the OR operator ("|") in the monitor header, you have to use whitelist option:

[monitor:///mydata/my_folder/ToSplunk/]
index = xyz
_TCP_ROUTING = dev_indexers,qa_indexers
sourcetype = XYZ_SRCTYPE
whitelist = *.(mylogfile|edi.mylogfile|edi)
crcSalt = <SOURCE>

thesecond problem is that the last condition in the first stanza also includes the second stanza condition, so you have to use two (or more) different conditions to avoid overlappings.

Ciao.

Giuseppe

Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.

Can’t make it to .conf25? Join us online!

Get Updates on the Splunk Community!

Splunk Lantern’s Guide to The Most Popular .conf25 Sessions

Splunk Lantern is a Splunk customer success center that provides advice from Splunk experts on valuable data ...

Unlock What’s Next: The Splunk Cloud Platform at .conf25

In just a few days, Boston will be buzzing as the Splunk team and thousands of community members come together ...

Index This | How many sevens are there between 1 and 100?

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