Deployment Architecture

Can we configure input.conf define port with multiple sourcetype?

ManojNegi
New Member

Can we configure input.conf define port with multiple sourcetype?

For ex.

[tcp://6134]
index = top
sourcetype = mac_log

sourcetype= tac_log
disabled = 0

Or 

Is there any way to segregate logs coming in one port with different sourcetypes?

Labels (1)
0 Karma

gcusello
SplunkTrust
SplunkTrust

Hi @ManojNegi,

you have two ways:

  1. if you have a list of the hosts for each sourcetype, you can create some stanzas for each of them, indicating the related sourcetype,
  2. if you can define a regex to identify the logs for each sourcetype, you can override your sourcetype.

1)

if the hosts with IP =10.10.10.x muste have sourcetype 1 and the ones with ip=10.10.20.* have sourcetype2 you could use:

[tcp://10.10.10.*:6134]
index = top
disabled = 0
sourcetype = mac_log

[tcp://10.10.20.*:6134]
index = top
sourcetype= tac_log
disabled = 0

2)

you can overryde sourcetype following the instructions at https://docs.splunk.com/Documentation/Splunk/latest/Data/Advancedsourcetypeoverrides

Ciao.

Giuseppe

 

0 Karma
Get Updates on the Splunk Community!

CX Day is Coming!

Customer Experience (CX) Day is on October 7th!! We're so excited to bring back another day full of wonderful ...

Strengthen Your Future: A Look Back at Splunk 10 Innovations and .conf25 Highlights!

The Big One: Splunk 10 is Here!  The moment many of you have been waiting for has arrived! We are thrilled to ...

Now Offering the AI Assistant Usage Dashboard in Cloud Monitoring Console

Today, we’re excited to announce the release of a brand new AI assistant usage dashboard in Cloud Monitoring ...