Splunk Search

Distribution function using bin

mtatulda
New Member

I am trying to create a PDF and CDF with limited amount of buckets:

... | bucket bins=10 fs as fsBinned
| stats count(fs) as pdf by fsBinned
| sort fsBinned
| accum pdf as cdf
| eventstats max(cdf) as totalMax
| eval fsPDF = 10*pdf/totalMax
| eval fsCDF = cdf/totalMax
| table fsBinned, fsPDF, fsCDF

However, the fsBinned variable does not chage if I decrease the number of bins. The table shows that the resulting buckets are mixed together with the input fs variable, like this:

0, 0-100, 14, 15...

Is this a normal behavior or is this a bug? I am using Splunk 7.2.10

Labels (1)
0 Karma
Get Updates on the Splunk Community!

Operationalizing TDIR: Building a More Resilient, Scalable SOC

Optimizing SOC workflows with a unified, risk-based approach to Threat Detection, Investigation, and Response ...

Pro Tips for First-Time .conf Attendees: Advice from SplunkTrust

Heading to your first .Conf? You’re in for an unforgettable ride — learning, networking, swag collecting, ...

Raise Your Skills at the .conf25 Builder Bar: Your Splunk Developer Destination

Calling all Splunk developers, custom SPL builders, dashboarders, and Splunkbase app creators – the Builder ...