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!

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