Getting Data In

How to configure a universal forwarder to monitor a log file in a certain drive on a Windows machine?

sushmitha_mj
Communicator

Hi,

I have configured a Windows universal forwarder on one of my Windows server. I do not want any of the event logs or performance monitoring on this machine, so I did not select any of that while configuring the universal forwarder.

There is a log file in the c: drive of this Windows machine which I want Splunk to source for me to search. Which inputs.conf file should I edit to configure Splunk to pick the log files? and what changes should I make? This is the first time I am doing the config on a Windows machine.

Thanks

1 Solution

skoelpin
SplunkTrust
SplunkTrust

Hello @sushmitha_mj

You can go to splunk/etc/system/local and create an inputs.conf file if its not already there. You will then need to create a stanza to monitor whatever file you want. It will look like this

[default]
host = SERVERNAME

[monitor://C:\*server.log]
disabled = false
sourcetype = srvlog
index = main

You will put your remote servername for the host, put the path and file you want to monitor, define the sourcetype you want it to have an the index you want it to go to.. In the example above, it will monitor a file called *Server.log.. make sure to restart the Splunk service on the forwarder after making these changes for them to take affect

You will also need to add an outputs.conf (assuming you don't already have it) and make sure it points to the indexer

View solution in original post

skoelpin
SplunkTrust
SplunkTrust

Hello @sushmitha_mj

You can go to splunk/etc/system/local and create an inputs.conf file if its not already there. You will then need to create a stanza to monitor whatever file you want. It will look like this

[default]
host = SERVERNAME

[monitor://C:\*server.log]
disabled = false
sourcetype = srvlog
index = main

You will put your remote servername for the host, put the path and file you want to monitor, define the sourcetype you want it to have an the index you want it to go to.. In the example above, it will monitor a file called *Server.log.. make sure to restart the Splunk service on the forwarder after making these changes for them to take affect

You will also need to add an outputs.conf (assuming you don't already have it) and make sure it points to the indexer

sushmitha_mj
Communicator

It worked... Thank you

0 Karma
Get Updates on the Splunk Community!

Index This | I am a number, but when you add ‘G’ to me, I go away. What number am I?

March 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...

What’s New in Splunk App for PCI Compliance 5.3.1?

The Splunk App for PCI Compliance allows customers to extend the power of their existing Splunk solution with ...

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...