Getting Data In

Json array data to spilted in new events during indexing

premranjithj
Builder

I am running python script and collecting array of Json data into single events. multiple events are clubbed into single events. i want to spilt each json data into new events.

i added below props.conf but its not spiltting the events.

@kamlesh_vaghela 

{"ErrorCode": 0, "ErrorMessage": null, "Name": "test", "Description": null, "EngineeringUnits": null, "Comment": null, "CollectorName": "BRnjbnTC-Mkjk8_Calculation", "CollectionType": 2}

{"ErrorCode": 0, "ErrorMessage": null, "Name": "BR-MSL68.Lmkmnjk26_MIP.P1.ond", "Description": "Lmnnkj26_MlknlkIP..knnlkC01.Second", "EngineeringUnits": null, "Comment": null, "CollectorName": "BRknk-MSLAnk8_OPC_Intelnkjklution_Intkjkellutionkjkjkver", "CollectionType": 2}

{"ErrorCode": 0, "ErrorMessage": null, "Name": "BC-MSLA;k;okpoB0168.L26_MnlkjIP.PLC0jnlk1.UDE_SlkjlkIM_TRIlklj;lkGGER", "Description": "L26_Mjklj", "EngineeringUnits": null, "Comment": null, "CollectorName": "BRjkjTC-kljkljlkjik", "CollectionType": 2}

 

 

[PsG_SddT_Tags]
DATETIME_CONFIG=CURRENT
SHOULD_LINEMERGE=true
NO_BINARY_CHECK=true
LINE_BREAKER=}(\,){
SEDCMD-break=s/({"ErrorCode": \[)//g
SEDCMD-b=s/]}$//g
TRUNCATE = 0

 

 

Labels (3)
Tags (2)
0 Karma

kamlesh_vaghela
SplunkTrust
SplunkTrust

@premranjithj 

Can you please share sample clubbed event?

0 Karma

premranjithj
Builder

@kamlesh_vaghela 

this is the event, the below output is 3 different events but indexed in splunk into single event.

{"ErrorCode": 0, "ErrorMessage": null, "Name": "test", "Description": null, "EngineeringUnits": null, "Comment": null, "CollectorName": "BRnjbnTC-Mkjk8_Calculation", "CollectionType": 2}
{"ErrorCode": 0, "ErrorMessage": null, "Name": "BR-MSL68.Lmkmnjk26_MIP.P1.ond", "Description": "Lmnnkj26_MlknlkIP..knnlkC01.Second", "EngineeringUnits": null, "Comment": null, "CollectorName": "BRknk-MSLAnk8_OPC_Intelnkjklution_Intkjkellutionkjkjkver", "CollectionType": 2}
{"ErrorCode": 0, "ErrorMessage": null, "Name": "BC-MSLA;k;okpoB0168.L26_MnlkjIP.PLC0jnlk1.UDE_SlkjlkIM_TRIlklj;lkGGER", "Description": "L26_Mjklj", "EngineeringUnits": null, "Comment": null, "CollectorName": "BRjkjTC-kljkljlkjik", "CollectionType": 2}

0 Karma

kamlesh_vaghela
SplunkTrust
SplunkTrust

@premranjithj 

if all 3 events are in New line then below conf should work.

SHOULD_LINEMERGE=false

 

KV

0 Karma
Did you miss .conf21 Virtual?

Good news! The event's keynotes and many of its breakout sessions are now available online, and still totally FREE!