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
Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.
Get Updates on the Splunk Community!

Data Persistence in the OpenTelemetry Collector

This blog post is part of an ongoing series on OpenTelemetry. What happens if the OpenTelemetry collector ...

Introducing Splunk 10.0: Smarter, Faster, and More Powerful Than Ever

Now On Demand Whether you're managing complex deployments or looking to future-proof your data ...

Community Content Calendar, September edition

Welcome to another insightful post from our Community Content Calendar! We're thrilled to continue bringing ...