Getting Data In

Windows universal forwarder localappdata

Niro
Explorer

Hello,

 

I need to monitor log files that are in the following directory('s'):

 

"c:\users\%username%\appdata\local\app\$randomnumber$\app.log"

%username% is whoever is currently logged on (but I suppose I'd be ok with "*", any user folder) and $randomnumber$ is a unique ID that's going to always be different for every desktop, possibly change over time, and possibly be more than one folder for a given user.

How would I make the file monitor stanza in inputs.conf do that?

 

Thanks!

Labels (3)
0 Karma
1 Solution

richgalloway
SplunkTrust
SplunkTrust

Use wildcards for the unknown parts.

[monitor://c:\users\*\appdata\local\app\*\app.log]
---
If this reply helps you, Karma would be appreciated.

View solution in original post

0 Karma

richgalloway
SplunkTrust
SplunkTrust

Use wildcards for the unknown parts.

[monitor://c:\users\*\appdata\local\app\*\app.log]
---
If this reply helps you, Karma would be appreciated.
0 Karma

Niro
Explorer

This ended up working - not sure what was wrong before, I think the timestamps were off. But it's all there, thanks!

Niro
Explorer

Thanks!

I just tried it - it doesn't SEEM to be working, I'm not getting any data in splunk even  though I know the files are being updated. Looking at the index (just searching index=someapp) returns no data (index does exist).

This is what I have:

[monitor://c:\users\*\appdata\local\someapp\apps\*\app.log]
index = someapp
sourcetype=someapp
disabled=0

 

0 Karma

richgalloway
SplunkTrust
SplunkTrust

Verify splunk has read access to the file.  Check splunkd.log for messages about reading the file.

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

Niro
Explorer

it SHOULD have access - I don't see any errors or anything. The only thing that comes up is 

"Parsing configuration stanza: monitor://c:\users\*\appdata\local\apps\*\app.log."

but no errors...

0 Karma
Got questions? Get answers!

Join the Splunk Community Slack to learn, troubleshoot, and make connections with fellow Splunk practitioners in real time!

Meet up IRL or virtually!

Join Splunk User Groups to connect and learn in-person by region or remotely by topic or industry.

Get Updates on the Splunk Community!

Index This | What travels the world but is also stuck in place?

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

Discover New Use Cases: Unlock Greater Value from Your Existing Splunk Data

Realizing the full potential of your Splunk investment requires more than just understanding current usage; it ...

Continue Your Journey: Join Session 2 of the Data Management and Federation Bootcamp ...

As data volumes continue to grow and environments become more distributed, managing and optimizing data ...