Getting Data In

How to monitor similar log files in different directories on different servers

joshuapetitt
Path Finder

What is the recommended way to monitor log files that come from the same application (so will be set to the same sourcetype), but they are at different locations on different servers?

I'm using a deployment server, so would I have a separate app for each server with its specific location, or can I somehow combine these?

0 Karma

woodcock
Esteemed Legend

Unless you are certain that all servers will only write stuff to one or the other directory, I would have 2 different apps with different configurations in inputs.conf; otherwise you may end up indexing files you meant to ignore.

0 Karma

somesoni2
Revered Legend

You can have single app with multiple [monitor:// for different path. You can combine those as well as long as the path can be combine using wildcards OR regular expressions metacharacters, as specified here: https://docs.splunk.com/Documentation/Splunk/6.6.3/Data/Specifyinputpathswithwildcards

ddrillic
Ultra Champion

Please keep in mind @joshuapetitt, that multiple locations per one sourcetype, is completely "normal" and we end up with several [monitor:// stanzas.

0 Karma

saurabh_tek11
Communicator

@joshuapetitt - your monitor stanza with splunk's own wildcards ... or * can solve your purpose as suggested by @somesoni2.
This seems a brilliant approach provided your application log file name is uniquely identifiable to use with *

0 Karma
Get Updates on the Splunk Community!

.conf24 | Personalize your .conf experience with Learning Paths!

Personalize your .conf24 Experience Learning paths allow you to level up your skill sets and dive deeper ...

Threat Hunting Unlocked: How to Uplevel Your Threat Hunting With the PEAK Framework ...

WATCH NOWAs AI starts tackling low level alerts, it's more critical than ever to uplevel your threat hunting ...

Splunk APM: New Product Features + Community Office Hours Recap!

Howdy Splunk Community! Over the past few months, we’ve had a lot going on in the world of Splunk Application ...