Splunk Search

how do I pull in Tomcat logs, ie catalina.log' periodically

jchilovich
New Member

I've read many a post and either I'm just not getting it or it's just not the answer. I want to index the daily catalina log file (per each JVM)say every 5 minutes and of course only want those lines new in the last 5 minute time frame? I'm assuming I need to write a stanze in the inputs.conf but unsure on the format and how to capture the timestamp and save from the last run.

Thanks

Tags (1)
0 Karma

jchilovich
New Member

Thanks for the info. I'll work on setup.

0 Karma

jchilovich
New Member

Thanks for the info. I'll work on setup.

0 Karma

alacercogitatus
SplunkTrust
SplunkTrust

I think you are misunderstanding how Splunk works. Install the forwarder on your machine, configure the inputs.conf to look at your catalina.out file, and there you are! Splunk keeps track of where it is in the file, and will even let you rotate the file and start from the beginning. No need to check every 5 minutes, it will run continuously.

alacercogitatus
SplunkTrust
SplunkTrust

You don't want a heavy forwarder in this case. The Universal Forwarder will send the logs to the main instance, and then you can search for your logs there. Data retention is based on index, so if you don't need your data searchable after 7 days, a separate index would work. I combine them all into a generic "app" index and keep it around longer for trends and historical.

0 Karma

jchilovich
New Member

I'm somewhat new to Splunk so no, you're correct. So I would create an entry in each forwarder for each log (heavy forwarder so could also use the GUI interface? )then splunk keeps track. ok, makes sense. Do you suggest a seperate index for these type of logs so I can also add entry to 'delete' after say 7 days?

0 Karma
Get Updates on the Splunk Community!

Announcing Scheduled Export GA for Dashboard Studio

We're excited to announce the general availability of Scheduled Export for Dashboard Studio. Starting in ...

Extending Observability Content to Splunk Cloud

Watch Now!   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to leverage ...

More Control Over Your Monitoring Costs with Archived Metrics GA in US-AWS!

What if there was a way you could keep all the metrics data you need while saving on storage costs?This is now ...