Splunk Search

Need help for Predict command

dhavamanis
Builder

Need your help,

We need to get the prediction for each business unit and sub business unit. But the below query giving the overall business unit prediction. Please provide the working example to get each business unit and sub business unit wise split-up for next 3 month prediction.

index="akamai-bill" |stats sum(BU_Total) as "cost($)" by _time, BU, SBU | predict "cost($)" algorithm=LLT future_timespan=3 | sort + SBU +BU

0 Karma
1 Solution

dhavamanis
Builder

using map command able to filter the results,

index="akamai-bill" |table BU, SBU| map search="search index="akamai-bill" SBU=$SBU$ |stats sum(BU_Total) as "cost" by _time, SBU | predict "cost" algorithm=LLT future_timespan=3 | table _time, SBU,lower95(prediction(cost)) ,prediction(cost),upper95(prediction(cost)) | eval SBU=if(SBU=$SBU$, $SBU$,$SBU$."1") | table _time, SBU,lower95(prediction(cost)) ,prediction(cost),upper95(prediction(cost)) | where SBU!=$SBU$ | table _time, SBU,lower95(prediction(cost)) ,prediction(cost),upper95(prediction(cost)) | eval SBU=$SBU$ "

View solution in original post

0 Karma

dhavamanis
Builder

using map command able to filter the results,

index="akamai-bill" |table BU, SBU| map search="search index="akamai-bill" SBU=$SBU$ |stats sum(BU_Total) as "cost" by _time, SBU | predict "cost" algorithm=LLT future_timespan=3 | table _time, SBU,lower95(prediction(cost)) ,prediction(cost),upper95(prediction(cost)) | eval SBU=if(SBU=$SBU$, $SBU$,$SBU$."1") | table _time, SBU,lower95(prediction(cost)) ,prediction(cost),upper95(prediction(cost)) | where SBU!=$SBU$ | table _time, SBU,lower95(prediction(cost)) ,prediction(cost),upper95(prediction(cost)) | eval SBU=$SBU$ "

0 Karma
Get Updates on the Splunk Community!

Stay Connected: Your Guide to May Tech Talks, Office Hours, and Webinars!

Take a look below to explore our upcoming Community Office Hours, Tech Talks, and Webinars this month. This ...

They're back! Join the SplunkTrust and MVP at .conf24

With our highly anticipated annual conference, .conf, comes the fez-wearers you can trust! The SplunkTrust, as ...

Enterprise Security Content Update (ESCU) | New Releases

Last month, the Splunk Threat Research Team had two releases of new security content via the Enterprise ...