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!

Stay Connected: Your Guide to May Tech Talks, Office Hours, and Webinars!

Take a look below to explore our upcoming Community Office Hours, Tech Talks, and Webinars this month. This ...

They're back! Join the SplunkTrust and MVP at .conf24

With our highly anticipated annual conference, .conf, comes the fez-wearers you can trust! The SplunkTrust, as ...

Enterprise Security Content Update (ESCU) | New Releases

Last month, the Splunk Threat Research Team had two releases of new security content via the Enterprise ...