Splunk Search

How to display bucket/histogram data with zero count?

jbp4444
Path Finder

I'm trying to run a bucket/histogram of data but I want to display buckets that have zero count. By default, bucket seems to hide those entries.

Quick example -- histogram of CPU-load on a group of machines. Each machine logs cpu-load as 'x' every 15min, I pick the latest entry for each host and bucket that data:

(search command) |stats first(x) as ff by host |bucket ff bins=10 start=0 end=10 |chart count(ff) over ff

Is there a way to tell bucket (or chart) that it should display all bins, even if they are zero-count?

Tags (1)
1 Solution

gkanapathy
Splunk Employee
Splunk Employee

You should probably just not invoke bucket at all, and just use chart count(ff) over ff bins=10, or use makecontinuous instead of bucket.

View solution in original post

gkanapathy
Splunk Employee
Splunk Employee

You should probably just not invoke bucket at all, and just use chart count(ff) over ff bins=10, or use makecontinuous instead of bucket.

jbp4444
Path Finder

That works exactly how I wanted it -- thanks!

0 Karma

helge
Builder

Thanks for making me aware of the makecontinuous command

0 Karma
Get Updates on the Splunk Community!

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...

What's new in Splunk Cloud Platform 9.1.2312?

Hi Splunky people! We are excited to share the newest updates in Splunk Cloud Platform 9.1.2312! Analysts can ...

What’s New in Splunk Security Essentials 3.8.0?

Splunk Security Essentials (SSE) is an app that can amplify the power of your existing Splunk Cloud Platform, ...