Splunk Search

After saving my search as a report on the dashboard, why is the chart data incomplete?

kotig
Path Finder

We have data like this:

TestPath                   200  202  500  302
/test/v1                   51   0   0   0
/test/v1/p1/test1/test   0  1   0   0
/test/v1/p1/test1/test1 0   0   8   0
/test/v1/p1/test1/test2 1   0   0   0

My search shows the data correctly and I see the visualization displays the chart properly, but when I convert that to a report and save it on the dashboard, it shows only 1 record which has data for 500 which is 8 records.

What might be the issue? Attached the images of how the data is shown on search/visualization chart and on the dashboard.

I tried on all kinds of browsers and its the same issue. Any help on what might be the issue would be appreciated.

0 Karma
1 Solution

somesoni2
Revered Legend

Give this a try

index=logdatafile earliest=-3d | rex field=_raw "(?msi)(?\{.+\}$)" | spath input=json_field | table success.successcode,success.path,fault.errorcode,fault.path,fault.errorStatusCode | eval ResponseCode=coalesce('success.successcode', 'fault.errorcode' ,'fault.errorStatusCode') |where isnotnull(ResponseCode) | eval Path=coalesce('success.path','fault.path') | chart count by ResponseCode,Path

View solution in original post

0 Karma

somesoni2
Revered Legend

Give this a try

index=logdatafile earliest=-3d | rex field=_raw "(?msi)(?\{.+\}$)" | spath input=json_field | table success.successcode,success.path,fault.errorcode,fault.path,fault.errorStatusCode | eval ResponseCode=coalesce('success.successcode', 'fault.errorcode' ,'fault.errorStatusCode') |where isnotnull(ResponseCode) | eval Path=coalesce('success.path','fault.path') | chart count by ResponseCode,Path
0 Karma

kotig
Path Finder

This worked. Thank you for your inputs.

0 Karma

Richfez
SplunkTrust
SplunkTrust

How do you specify the time frame of the search?

0 Karma

kotig
Path Finder

i am specifying the time frame as earliest=-3d, below is how my query looks..

index=logdatafile earliest=-3d | rex field=_raw "(?msi)(?\{.+\}$)" | spath input=json_field | table success.successcode,success.path,fault.errorcode,fault.path,fault.errorStatusCode | rename success.successcode as ResponseCode | rename fault.errorcode as ResponseCode|rename fault.errorStatusCode as ResponseCode| rename success.path as Path | rename fault.path as Path|where isnotnull(ResponseCode)| chart count by ResponseCode,Path
0 Karma
Get Updates on the Splunk Community!

.conf24 | Registration Open!

Hello, hello! I come bearing good news: Registration for .conf24 is now open!   conf is Splunk’s rad annual ...

ICYMI - Check out the latest releases of Splunk Edge Processor

Splunk is pleased to announce the latest enhancements to Splunk Edge Processor.  HEC Receiver authorization ...

Introducing the 2024 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...