Getting Data In

How to monitor same log file into different sourcetypes by ip ?

hketer
Path Finder

Hello,

I have logs from syslog server, my goal is to have events from the same log but these events will indexed with different sourcetype according to the IP in the log.
lets say I have a row in the log with IP X his sourcetype will be ST1
for IP Y the sourcetype will be ST2 and so on.

Here are my configurations

inputs.conf
[monitor://D:\Kiwi_DB]
disabled = false
index = db_it_syslog
sourcetype = transformsourcetype

props.conf
[transformsourcetype]
TRANSFORMS-transformsourcetype = change_st_by_IP1,change_st_by_IP2

transforms.conf
[change_st_by_IP1]
REGEX = "0.0.0.0"

FORMAT = sourcetype::cyberark:epv:cef
DEST_KEY = MetaData::Sourcetype

Thanks!
Hen

0 Karma
Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.

Can’t make it to .conf25? Join us online!

Get Updates on the Splunk Community!

Community Content Calendar, September edition

Welcome to another insightful post from our Community Content Calendar! We're thrilled to continue bringing ...

Splunkbase Unveils New App Listing Management Public Preview

Splunkbase Unveils New App Listing Management Public PreviewWe're thrilled to announce the public preview of ...

Leveraging Automated Threat Analysis Across the Splunk Ecosystem

Are you leveraging automation to its fullest potential in your threat detection strategy?Our upcoming Security ...