Getting Data In

How come my unique JSON event returns duplicate values in a search string?

justins777
New Member

Hi All,

I have some logging that is ingested through a Splunk agent. A sample log looks like:

{
   "asctime" : "2018-11-30T02:29:19Z+0000",
   "name" : "sloth_start_stop",
   "processName" : "MainProcess",
   "filename" : "sloth_start_stop.py",
   "funcName" : "remove_pending_action_tag",
   "levelname" : "INFO",
   "lineno" : 174,
   "module" : "sloth_start_stop",
   "threadName" : "MainThread",
   "message" : "Removed pending action tag '{'SlothPendingAction': 'start'}' from resource 'i-xxxxxxxxxxxxx'",
   "current_status" : "running",
   "event_time" : "0001-01-01T12:29:00+10:00",
   "resource_id" : "i-xxxxxxxxxxxxxxxxxxxx",
   "event_action" : "SlothPendingAction",
   "lambda_current_time" : "2018-11-30T12:29:14.961459+10:00",
   "event_value" : "12:29+10:00",
   "aws_account_id" : "xxxxxxxxxxx",
   "ami_id" : "ami-xxxxxxxxxxxx",
   "time_zone" : "+10:00",
   "instance_type" : "m4.large",
   "context" :
      {
         "aws_request_id" : "bac8149b-f447-xxxxxxxxxxxxxx",
         "log_stream_name" : "2018/11/29/[$LATEST]e9234dbcfxxxxxxxxxxxxxxx",
         "invoked_function_arn" : "arn:aws:lambda:ap-southeast-2:xxxxxxxxx:function:aws-platform-sloth-start-stop",
         "client_context" : null,
         "log_group_name" : "/aws/lambda/aws-platform-sloth-start-stop",
         "function_name" : "aws-platform-sloth-start-stop",
         "function_version" : "$LATEST",
         "identity" : "<__main__.CognitoIdentity object at xxxxxxx",
         "memory_limit_in_mb" : "128"
      },
   "timestamp" : "2018-11-30T02:29:19Z+0000"
}

when I open the event, it shows duplicate values:

alt text

When i try and create a table:

| table aws_account_id, resource_id, lambda_current_time, levelname

I also get duplicates in my row:

alt text

No idea what is going on?

0 Karma

MuS
Legend

Hi justins777,

check the props.conf for the sourcetype and validate that you either use :
INDEXED_EXTRACTIONS = JSON on the parsing Splunk instance (eq indexer or heavy weight forwarder)

OR

KV_MODE = json on the search head.
Don't use both settings at the same time.

Hope this helps ...

cheers, MuS

Get Updates on the Splunk Community!

Join Us for Splunk University and Get Your Bootcamp Game On!

If you know, you know! Splunk University is the vibe this summer so register today for bootcamps galore ...

.conf24 | Learning Tracks for Security, Observability, Platform, and Developers!

.conf24 is taking place at The Venetian in Las Vegas from June 11 - 14. Continue reading to learn about the ...

Announcing Scheduled Export GA for Dashboard Studio

We're excited to announce the general availability of Scheduled Export for Dashboard Studio. Starting in ...