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!

Webinar Recap | Revolutionizing IT Operations: The Transformative Power of AI and ML ...

The Transformative Power of AI and ML in Enhancing Observability   In the realm of IT operations, the ...

.conf24 | Registration Open!

Hello, hello! I come bearing good news: Registration for .conf24 is now open!   conf is Splunk’s rad annual ...

ICYMI - Check out the latest releases of Splunk Edge Processor

Splunk is pleased to announce the latest enhancements to Splunk Edge Processor.  HEC Receiver authorization ...