Dashboards & Visualizations

Data missing from dashboard panel

terryloar
Path Finder

The input log using access_combined source type:

[12/28/2012 4:41:09 PM] [12/28/2012 4:41:10 PM] step_number="1220" step_return_code="0" step_elapsed_time="0 Days 0:0:01"

[12/28/2012 4:41:11 PM] [12/28/2012 4:41:12 PM] step_number="1230" step_return_code="0" step_elapsed_time="0 Days 0:0:01"

[12/28/2012 4:41:13 PM] [12/28/2012 4:41:27 PM] step_number="1500" step_return_code="0" step_elapsed_time="0 Days 0:0:14"

[12/28/2012 4:41:29 PM] [12/28/2012 4:41:44 PM] step_number="2000" step_return_code="0" step_elapsed_time="0 Days 0:0:15"

The search:

source="*_.log" | chart values(step_number) AS "Step Number" values(step_return_code) AS "Return Code" values(step_elapsed_time) AS "Elapsed Time"

The results from the dashboard panel:

_time Step Number Return Code Elapsed Time

12/28/12 4:40:34.000 PM 1220 0 0 Days 0:0:01

                              1230

12/28/12 4:41:12.000 PM 1500 0 0 Days 0:0:12

                              2000          0 Days 0:0:12

                              2010          0 Days 0:0:14

I can't figure out why the Return Code and Elapsed Time are missing from Step 1230, and why the Return Code is missing from Steps 2000 and 2010,

It should look like this:

_time Step Number Return Code Elapsed Time

12/28/12 4:40:34.000 PM 1220 0 0 Days 0:0:01

Tags (1)
0 Karma

Ayn
Legend

From the docs on stats functions:

values(X)   This function returns the list of all distinct values of the field X as a multi-value entry. The order of the values is lexicographical.

So, you're using values() to list all distinct values in your events, and that's what you get. The only distinct value for step_return_code is 0.

I'm not sure if you really should be using values here. Wouldn't it be a better idea to use a table instead? That way you get values per event instead of aggregated like it is now.

... | table step_number step_return_code step_elapsed_time
0 Karma
Get Updates on the Splunk Community!

Get Your Exclusive Splunk Certified Cybersecurity Defense Engineer at Splunk .conf24 ...

We’re excited to announce a new Splunk certification exam being released at .conf24! If you’re headed to Vegas ...

Share Your Ideas & Meet the Lantern team at .Conf! Plus All of This Month’s New ...

Splunk Lantern is Splunk’s customer success center that provides advice from Splunk experts on valuable data ...

Combine Multiline Logs into a Single Event with SOCK: a Step-by-Step Guide for ...

Combine multiline logs into a single event with SOCK - a step-by-step guide for newbies Olga Malita The ...