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!

[Puzzles] Solve, Learn, Repeat: Dynamic formatting from XML events

This challenge was first posted on Slack #puzzles channelFor a previous puzzle, I needed a set of fixed-length ...

Enter the Agentic Era with Splunk AI Assistant for SPL 1.4

  🚀 Your data just got a serious AI upgrade — are you ready? Say hello to the Agentic Era with the ...

Stronger Security with Federated Search for S3, GCP SQL & Australian Threat ...

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