Splunk Search

How to scan log files

cppandey80
New Member

I have log files which are in below format , I would like to scan them.
When one logs reached to its size limit then new log file is created.

console_Server1_1.log
console_Server1_2.log
console_Server1_3.log
console_Server1_4.log
console_Server1_n.log

On Other servers these files are like

console_Server2_1.log
console_Server2_2.log
console_Server2_3.log
console_Server2_4.log
console_Server2_n.log

but in the same folder, there are other files too, which I don't like to scan.
e.g.

console_server1_2016_08_19@23_11_32.log

Any leads?

Tags (1)
0 Karma

TStrauch
Communicator

Hi cppandey80,

in the monitor stanza of your inputs.conf you can use Regular Expressions and Wildcards, for defining file paths.

Just take a look at this and i think you will find your solution.

http://docs.splunk.com/Documentation/Splunk/6.4.3/Data/Specifyinputpathswithwildcards

regards

0 Karma
Get Updates on the Splunk Community!

More Ways To Control Your Costs With Archived Metrics | Register for Tech Talk

Tuesday, May 14, 2024  |  11AM PT / 2PM ET Register to Attend Join us for this Tech Talk and learn how to ...

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