Getting Data In

different results searching json data depending on app

fdarrigo
Path Finder

alt textI am ingesting JSON data via the HEC on a HeavyForwarder, but when I query the data in SplunkCloud, I have different results depending on which app I am using to query the data.

For example, in the search and reporting app, the json data creates an event with fields "ping.jitter" and "ping.latency". However, when I query using a custom app, the event is not created and the fields "ping.jitter" and "ping.latency" are not created nor are they populated with data.
alt text
Any ideas why?

Tags (1)
0 Karma
1 Solution

MuS
Legend

Hi fdarrigo,

Two possible reasons:

  1. You run the search in your custom app in fast mode, see https://docs.splunk.com/Documentation/Splunk/latest/Search/Changethesearchmode#Using_the_Fast_mode for more details
  2. You need to add KV_MODE = json to your sourcetype under Setting - Source types in your custom app

Hope this helps ...

cheers, MuS

View solution in original post

0 Karma

fdarrigo
Path Finder

MuS- Changing from fast mode to verbose solved the problem
anthonymelita - thanks for the tip. I will keep it in mind.

0 Karma

MuS
Legend

Hi fdarrigo,

Two possible reasons:

  1. You run the search in your custom app in fast mode, see https://docs.splunk.com/Documentation/Splunk/latest/Search/Changethesearchmode#Using_the_Fast_mode for more details
  2. You need to add KV_MODE = json to your sourcetype under Setting - Source types in your custom app

Hope this helps ...

cheers, MuS

0 Karma

anthonymelita
Contributor

In my experience Splunk attempts to auto-extract json objects to fields and frequently fails. Try adding an |spath command as your first pipe after basic search criteria like index, source, etc...

0 Karma

fdarrigo
Path Finder

Thanks. I will keep it in mind.

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 ...