Splunk Search

X-axis of chart skips over values.

CCoomber
Engager

Hi, after a search I have a table like this:

row VAL count
1   0   169 
2   1   3 
3   4   4 
4   9   1 
5   10  12 

I want to plot it as a column graph. However, on the x-axis I find that my VALs miss out values such as 2,3,5,6,7,8, etc. as in the table.

Ideally I want my table to look like:

row VAL count
1   0   169 
2   1   3 
3   2   0 
4   3   0 
5   4   4 
6   5   0 
7   6   0 
8   7   0 
9   8   0 
10  9   1 
11  10  12 

The there a way of telling splunk I want a row in the table for each integer between 0 and 11, and to fill empty ones with 0?

I've found bucketing by VAL works to an extent, as it makes buckets regularly even if they have nothing in, but I'd rather not have my x-axis reading 1-2,2-3,3-4 etc.

Thanks!

0 Karma
1 Solution

martin_mueller
SplunkTrust
SplunkTrust

Add this to your search pipeline:

... | makecontinuous VAL | fillnull count

View solution in original post

martin_mueller
SplunkTrust
SplunkTrust

Add this to your search pipeline:

... | makecontinuous VAL | fillnull count

martin_mueller
SplunkTrust
SplunkTrust

That's possible, considering that makecontinuous is adding new values to VAL that did not come from the original search, so drilling down on that may confuse Splunk's default behaviour.

One way that should always work would be to build your own drilldown using Advanced XML.

0 Karma

CCoomber
Engager

This is almost exactly perfect, however if this search is making a column graph on a view (in simple XML) clicking on a column will no longer drilldown and give me events with VAL equal to this column's value. It seems both makecontinuous and fillnull kill the ability to drilldown.

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