Getting Data In

MetaData:Index and MetaData:Sourcetype overridding sourcetype

Abhay
Explorer

Hi Splunkers,

My greetings !! !!

I have data coming from the Syslog server for which sourcetype Is "syslog", now, I have split the data going to three diff indexers in transfroms.conf using MetaData:Index and using the regular expression like (abc* | xyz* ), and it is working fine.

Now, I need to hardcode the sourcetype for each of the data going to the different index, now the sourcetype is coming as "syslog" but I want for every separate index I need to have separate sourcetype name .

 

Can you plz help !! 

Tags (1)
0 Karma

PickleRick
SplunkTrust
SplunkTrust

Why don't you use an external syslog collector? SC4S or rsyslog? The configuration is more straightforward and you can have configuration working on network-level metadata. And is more efficient.

0 Karma

richgalloway
SplunkTrust
SplunkTrust

It seems like you're doing that the hard way.  I usually set up the syslog server to filter events based on source/content/whatever and put them into separate destination files.  Then the UF monitors those files and has inputs.conf settings for each one that specifies the target index and sourcetype.

---
If this reply helps you, Karma would be appreciated.
0 Karma

Abhay
Explorer

I could havd done the same thing, but the problem is somebody has already configured to have all the data to come  in one file itself.

 

Now, I need to use transforms.conf to set the new sourcetype instead of "syslog" sourcetype 

0 Karma

richgalloway
SplunkTrust
SplunkTrust

You inherited someone else's mistake, but that doesn't mean you have to live with it.  IMO, you'll be doing yourself and your successor a favor by re-configuring the syslog server.

If that's not possible then please describe how you've tried changing the sourcetype.

---
If this reply helps you, Karma would be appreciated.
0 Karma
Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.
Get Updates on the Splunk Community!

Tech Talk Recap | Mastering Threat Hunting

Mastering Threat HuntingDive into the world of threat hunting, exploring the key differences between ...

Observability for AI Applications: Troubleshooting Latency

If you’re working with proprietary company data, you’re probably going to have a locally hosted LLM or many ...

Splunk AI Assistant for SPL vs. ChatGPT: Which One is Better?

In the age of AI, every tool promises to make our lives easier. From summarizing content to writing code, ...