Getting Data In

How can I spit event into multiple events

raynor
Explorer

I'm trying to spit event into multiple events,my raw event like below

<14>1 2022-09-14T12:49:12.620+08:00 TestServer mft 3491 SFTP Audit Log [gamft-sftp@46583 mftcommand="Connect" mftend_time="2022-09-14 12:49:12 PM" mftevent_type="Connection Successful" mftremote_ip="192.168.168.168" mftstart_time="2022-09-14 12:49:12 PM"]<14>1 2022-09-14T12:49:12.620+08:00 TestServer mft 3491 SFTP Audit Log [gamft-sftp@46583 mftcommand="Connect" mftend_time="2022-09-14 12:49:12 PM" mftevent_type="Connection Successful" mftremote_ip="192.168.168.168" mftstart_time="2022-09-14 12:49:12 PM"]<14>1 2022-09-14T12:49:12.727+08:00 TestServer mft 3491 SFTP Audit Log [gamft-sftp@46583 mftcommand="Login" mftend_time="2022-09-14 12:49:12 PM" mftevent_type="Login Successful" mftremote_ip="192.168.168.168" mftstart_time="2022-09-14 12:49:12 PM" mftuser_name="testuser"]


--------------------------------------------------------------------
I want to split it into three events, how can I do this?

<14>1 2022-09-14T12:49:12.620+08:00 TestServer mft 3491 SFTP Audit Log [gamft-sftp@46583 mftcommand="Connect" mftend_time="2022-09-14 12:49:12 PM" mftevent_type="Connection Successful" mftremote_ip="192.168.168.168" mftstart_time="2022-09-14 12:49:12 PM"]

<14>1 2022-09-14T12:49:12.620+08:00 TestServer mft 3491 SFTP Audit Log [gamft-sftp@46583 mftcommand="Connect" mftend_time="2022-09-14 12:49:12 PM" mftevent_type="Connection Successful" mftremote_ip="192.168.168.168" mftstart_time="2022-09-14 12:49:12 PM"]

<14>1 2022-09-14T12:49:12.727+08:00 TestServer mft 3491 SFTP Audit Log [gamft-sftp@46583 mftcommand="Login" mftend_time="2022-09-14 12:49:12 PM" mftevent_type="Login Successful" mftremote_ip="192.168.168.168" mftstart_time="2022-09-14 12:49:12 PM" mftuser_name="testuser"]
Labels (1)
Tags (1)
0 Karma

scelikok
SplunkTrust
SplunkTrust

Hi @raynor,

I tested it on my local instance and it works. Did you put this props.conf on your Indexers and are you checking for the new events right? 

If this reply helps you an upvote is appreciated.

scelikok
SplunkTrust
SplunkTrust

Hi @chaker,

You can use below setting. I used syslog tag at the beginning (<14>)

[mft]
LINE_BREAKER = ()<\d+>\d+
NO_BINARY_CHECK = true
SHOULD_LINEMERGE = false
category = Structured
pulldown_type = 1
disabled = false

 

If this reply helps you an upvote is appreciated.

raynor
Explorer

Dear @scelikok

Thanks for your reply. The content of the event is still not split

My props.conf

 

[mft]
BREAK_ONLY_BEFORE_DATE = 
DATETIME_CONFIG = 
LINE_BREAKER = ()<\d+>\d+
NO_BINARY_CHECK = true
SHOULD_LINEMERGE = false
category = Structured
pulldown_type = 1
disabled = false
description = mft Syslog
TIME_PREFIX = 
INDEXED_EXTRACTIONS = 

 

 

 

 

Tags (1)
0 Karma

chaker
Contributor

Do you mean, how do I make this event multiple events at search time, OR do you mean how do I onboard this data correctly into Splunk?

I can't see any reason for the raw event to be stored this way in Splunk. You could stich the events back together like this at search time using transaciton command or similar method.

Let us know which outcome you are looking for.

raynor
Explorer

Dear chaker:

Yes, I need onboard this data correctly into Splunk.

The raw event input from udp syslog,I try edit Source Type "Event Breaks" but not work

A single event ending with "]" ,how can I split it.

the props.conf
[mft]
BREAK_ONLY_BEFORE_DATE =
DATETIME_CONFIG =
LINE_BREAKER = ([]]+)
NO_BINARY_CHECK = true
SHOULD_LINEMERGE = false
category = Structured
pulldown_type = 1
disabled = false

0 Karma
Get Updates on the Splunk Community!

Dashboard Studio Challenge - Learn New Tricks, Showcase Your Skills, and Win Prizes!

Reimagine what you can do with your dashboards. Dashboard Studio is Splunk’s newest dashboard builder to ...

Introducing Edge Processor: Next Gen Data Transformation

We get it - not only can it take a lot of time, money and resources to get data into Splunk, but it also takes ...

Take the 2021 Splunk Career Survey for $50 in Amazon Cash

Help us learn about how Splunk has impacted your career by taking the 2021 Splunk Career Survey. Last year’s ...