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

Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.

Can’t make it to .conf25? Join us online!

Get Updates on the Splunk Community!

Take Action Automatically on Splunk Alerts with Red Hat Ansible Automation Platform

 Are you ready to revolutionize your IT operations? As digital transformation accelerates, the demand for ...

Calling All Security Pros: Ready to Race Through Boston?

Hey Splunkers, .conf25 is heading to Boston and we’re kicking things off with something bold, competitive, and ...

Beyond Detection: How Splunk and Cisco Integrated Security Platforms Transform ...

Financial services organizations face an impossible equation: maintain 99.9% uptime for mission-critical ...