Monitoring Splunk

collect data from a folder, but it is a disk

Alex_Rus
Loves-to-Learn Lots

I need to collect data from a folder on a Windows machine, the problem is that this folder is mounted as a disk and the host sends data to it. The classic inputs.conf for the folder source does not work. How can I fix this problem?

Labels (2)
0 Karma

gcusello
SplunkTrust
SplunkTrust

Hi @Alex_Rus ,

if the disk is always mounted with the same name, you can put it in your inputs.conf:

[monitor://E:\my_foler\my_files.log]

Ciao.

Giuseppe

0 Karma

Alex_Rus
Loves-to-Learn Lots

Hi, Giuseppe! Thank you for your answer.

Let me explain the situation. The application is configured to collect logs from four hosts, on two of which the data is collected in the internal storage C:\Program Files\Microsoft\Exchange Server\... and the data comes from these hosts correctly. On the other two hosts the data is collected in a folder that is moved to a separate disk C:\MyFolder\MyFolder1\*.

My stanza looks like:

[monitor://C:/MyFolder\MyFolder1/*]

disabled = 0

index = MyIndex1

sourcetype = MySourcetype1

 

[monitor://C:/Program Files/Microsoft/Exchange Server/.../*]

disabled = 0

index = MyIndex1

sourcetype = MySourcetype1#

0 Karma

gcusello
SplunkTrust
SplunkTrust

Hi @Alex_Rus ,

I don't know if it's a mistyping, but you have to use backslashes in windows paths:

[monitor://C:\MyFolder\MyFolder1\*]
disabled = 0
index = MyIndex1
sourcetype = MySourcetype1

[monitor://C:\Program Files\Microsoft\Exchange Server\...\*]
disabled = 0
index = MyIndex1
sourcetype = MySourcetype1#

Ciao.

Giuseppe

0 Karma

Alex_Rus
Loves-to-Learn Lots

Yes, it is a mistyping, in my inputs.conf i got it right.

0 Karma

gcusello
SplunkTrust
SplunkTrust

Hi @Alex_Rus ,

What's the problem?

you can have two different stanzas for your two different inputs with the same other parameters.

Ciao.

Giuseppe

 

0 Karma

Alex_Rus
Loves-to-Learn Lots

the problem is that data from hosts where data is coming to a mounted disk does not come to Splunk

0 Karma

gcusello
SplunkTrust
SplunkTrust

Hi @Alex_Rus ,

what's the resul runnung from cmd:

dir C:\MyFolder\MyFolder1\*

?

if you haven't results, maybe the path isn't correct

or maybe there's another issue:

could data be equal to the ones from another input?

if they are the same, even if from a differen file, Splunk by default doesn't index a log twice.

Ciao.

Giuseppe

0 Karma

richgalloway
SplunkTrust
SplunkTrust

Tell us more.  What exactly do you mean by "does not work"?  What results/errors do you get?  What is the inputs.conf stanza for that input?

---
If this reply helps you, Karma would be appreciated.
0 Karma

Alex_Rus
Loves-to-Learn Lots

Hi, richgalloway! Thank you for your answer. 

I wrote this information in response to the previous question from Giuseppe.

0 Karma
Get Updates on the Splunk Community!

CX Day is Coming!

Customer Experience (CX) Day is on October 7th!! We're so excited to bring back another day full of wonderful ...

Strengthen Your Future: A Look Back at Splunk 10 Innovations and .conf25 Highlights!

The Big One: Splunk 10 is Here!  The moment many of you have been waiting for has arrived! We are thrilled to ...

Now Offering the AI Assistant Usage Dashboard in Cloud Monitoring Console

Today, we’re excited to announce the release of a brand new AI assistant usage dashboard in Cloud Monitoring ...