Getting Data In

How do you monitor a directory in a client server

lew
New Member

I'm new to splunk. I am trying to monitor a directory that exists on a different server other than the main splunk server. I have accessed the gui and have gone to settings>data inputs>files & directories>new, but I only get a directory listing for the main splunk server, not the clients. The directory in question also has rotating log files if that matters. thanks

Tags (2)
0 Karma
1 Solution

dineshraj9
Builder

If you want to monitor /home/user1/logs/ -

/home/user1/logs/log_type1.log
/home/user1/logs/log_type2.log

You can try putting this in inputs.conf -

[monitor:///home/user1/logs/]
sourcetype = user1_log
index = user
followSymlink=false
blacklist = (.(tar|gz|bz2|tar.gz|tgz|tbz|tbz2|zip|z)$)
whitelist=log_type.+.log$

View solution in original post

0 Karma

dineshraj9
Builder

If you want to monitor /home/user1/logs/ -

/home/user1/logs/log_type1.log
/home/user1/logs/log_type2.log

You can try putting this in inputs.conf -

[monitor:///home/user1/logs/]
sourcetype = user1_log
index = user
followSymlink=false
blacklist = (.(tar|gz|bz2|tar.gz|tgz|tbz|tbz2|zip|z)$)
whitelist=log_type.+.log$

0 Karma

lew
New Member

thank you. This answers my question.

0 Karma

lew
New Member

I have that installed already in the client server

0 Karma

MuS
SplunkTrust
SplunkTrust

Hi lew,

to do this, it is recommended to install an universal forwarder on the remote server, read the docs about it here http://docs.splunk.com/Documentation/Splunk/6.2.3/Forwarding/Introducingtheuniversalforwarder

If you are not able to install it on the remote server, think of any other option to access the file like network share, FTP upload to the Splunk server. But remember, when ever possible use the universal forwarder to get remote logs.

Hope this helps ...

cheers, MuS

0 Karma

lew
New Member

lol, ok. Thanks anyway

0 Karma

lew
New Member

Thank you for the reply. Can you be more specific? The only file I found that matches the contents of that webpage is /splunk/etc/system/README/inputs.conf.spec. So far I have gathered that the scheme is going to look like this.

[monitor: ///path.../logs]

But what I don't understand is how is the indexer server going to know what client server this is going to be for (like hostname yyy.com, for example). Thank you.

0 Karma

MuS
SplunkTrust
SplunkTrust
0 Karma

lew
New Member

I have universal fowarder installed in the client server already

0 Karma

MuS
SplunkTrust
SplunkTrust

take a look at the inputs.conf docs http://docs.splunk.com/Documentation/Splunk/6.2.3/admin/inputsconf you must specify your input on the remote server and save the file at $SPLUNK_HOME\etc\system\local\ and for safety restart the universal forwarder once

0 Karma
Get Updates on the Splunk Community!

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

Stay Connected: Your Guide to October Tech Talks, Office Hours, and Webinars!

What are Community Office Hours? Community Office Hours is an interactive 60-minute Zoom series where ...