Splunk Search

Foward specifc log file types to one index

jbirchall1
New Member

Is it possible to forward one type of log file to one type of index on the index.

The situation is that we have log file from different hosts stored on one central server and we would like to forward different types of log files to different indexes on the index, and have this so that if new hosts were added we wouldn't have to create new input stanza's.

What I thought might work was create this in the local/input.conf on the universal forwarder
Values in () have been replaced.


[default]
host = (host)

[monitor]:///(path to logs)/*/*.(logfile type)
index=(index name)
host=(\w+)\.(logfile type)$
followSymlink=false


both of these globs should be the same and be a host name
[monitor:///(path to logs)//.(logfile type)]

Tags (1)
0 Karma

MuS
Legend

Hi jbirchall

your inputs.conf should just work fine. no need to do this the complicated way like in my first answer 😉

cheers,
MuS

0 Karma

jbirchall1
New Member

Unfortunaelty the way I was trying it doesn't seem to work.

It works fine if I specify the full directory structure.

0 Karma

MuS
Legend

sorry for 'confusing' yourself...just rewrote my answer

0 Karma

jbirchall1
New Member

so the application would be the path ?
(path to logs)//.(logfile type)

0 Karma
Get Updates on the Splunk Community!

Introducing the Splunk Community Dashboard Challenge!

Welcome to Splunk Community Dashboard Challenge! This is your chance to showcase your skills in creating ...

Built-in Service Level Objectives Management to Bridge the Gap Between Service & ...

Wednesday, May 29, 2024  |  11AM PST / 2PM ESTRegister now and join us to learn more about how you can ...

Get Your Exclusive Splunk Certified Cybersecurity Defense Engineer Certification at ...

We’re excited to announce a new Splunk certification exam being released at .conf24! If you’re headed to Vegas ...