Getting Data In

one of my field is json, how can I extract corretly{

efrenette11
Path Finder

Maybe an easy one here.

Here's the log line that I have.

Splun extract by himself unkwnownProperties={

How can I extract the field to be = {"venue":{"unknownProties":true},"common":{"publicVisklklibility":{"startDateTime":"2015-10-29T15:00:00Z","dateTBD":false,"visible":true},"isTpppest":true},"start":{"unknownProties":true}}

2015-11-20T05:27:17.760429-08:00 app1.coco.jetdev2.syseng.tmcs coco: severity="INFO" host="" service_version="" client_host="" client_version="" Correlation-ID="20151120012721" client_rid="" rid="" sid="" thread="http-nio-8080-exec-7" category="com.ticketmaster.platform.bam.strategies.AuditBAMStrategy" datetime="2015-11-20T13:27:17.759Z" bam="audit" appCode="" activity="ingestion" seq="101" ingestion.entity="Event" status="SuccessWarning" code="" detail="Missing and/or unknown properties." missingProperties="{}" unkwnownProperties="{"venue":{"unknownProties":true},"common":{"publicVisklklibility":{"startDateTime":"2015-10-29T15:00:00Z","dateTBD":false,"visible":true},"isTpppest":true},"start":{"unknownProties":true}}"

Tags (1)
0 Karma

jkat54
SplunkTrust
SplunkTrust

I'm borrowing regex from the CEF app here. You should be able to use this in the field extractor app or within your props & transforms.

 (?<=unkwnownProperties=)(.*?(?=(?:\s[\w.:\[\]]+=|$)))

note that unkwnown is spelled wrong. It should be unknown but you provided incorrect spelling in your example.

0 Karma

somesoni2
Revered Legend

This is generally difficult to extract unless the position of the field is fixed. If the position of field unknownProperties field is fixed (as in the last element as shown in your example, try something like this

your base search | rex field=_raw "\sunknownProperties=(?<unknownProperties>.*)$"
0 Karma

jsven7
Communicator

It's not clear to me what you want to extract from the events.

0 Karma

woodcock
Esteemed Legend

Check your typos, fix/normalize your strings and explain in more detail.

0 Karma
Get Updates on the Splunk Community!

Observe and Secure All Apps with Splunk

  Join Us for Our Next Tech Talk: Observe and Secure All Apps with SplunkAs organizations continue to innovate ...

Splunk Decoded: Business Transactions vs Business IQ

It’s the morning of Black Friday, and your e-commerce site is handling 10x normal traffic. Orders are flowing, ...

Fastest way to demo Observability

I’ve been having a lot of fun learning about Kubernetes and Observability. I set myself an interesting ...