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"]
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 and "Accept as Solution" 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 and "Accept as Solution" 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!

Updated Data Type Articles, Anniversary Celebrations, and More on Splunk Lantern

Splunk Lantern is a Splunk customer success center that provides advice from Splunk experts on valuable data ...

A Prelude to .conf25: Your Guide to Splunk University

Heading to Boston this September for .conf25? Get a jumpstart by arriving a few days early for Splunk ...

4 Ways the Splunk Community Helps You Prepare for .conf25

.conf25 is right around the corner, and whether you’re a first-time attendee or a seasoned Splunker, the ...