Getting Data In

host name extraction for multiple types of logs

spatil
Path Finder

Hi ,

I have two different types of logs, performance logs and alert logs. for performance logs , I have a folder structure as follows, \Splunk\etc\apps\myApp\logs\log_sample\host1\gn1*.cvs \Splunk\etc\apps\myApp\logs\log_sample\host2\gn2*.cvs \Splunk\etc\apps\myApp\logs\log_sample\host3\gn3*.cvs

here, host1, host2, and host3 are my host names. I managed to extract above host names using "host_segment" in inputs.conf.

Now, for alert logs I have a below directory structure. \Splunk\etc\apps\myApp\logs\AlertLogs*.csv For all these alert logs I need a static hostname say "alert".

How can I configure Inputs.conf to handle above situation ?

Regards, S.

Tags (1)
0 Karma

jgauthier
Contributor

on the input stanza, i believe you can set it explicity:

host=alert

I am doing that with my firewall logs, so the host is set to be the city location.

jgauthier
Contributor

What is the host showing up as? You probably want to remove the host_segment here, it's not necessary.

0 Karma

spatil
Path Finder

I have already added below lines in inputs.conf, still it is not working host_segment=7 [source::...AlertLogs...] host=alert

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