Splunk Search

## Need help for Predict command

Builder

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

Tags (3)
1 Solution
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\$ "

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\$ "

Get Updates on the Splunk Community!

#### Splunk Cloud | Empowering Splunk Administrators with Admin Config Service (ACS)

Greetings, Splunk Cloud Admins and Splunk enthusiasts! The Admin Configuration Service (ACS) team is excited ...

#### Tech Talk | One Log to Rule Them All

One log to rule them all: how you can centralize your troubleshooting with Splunk logs We know how important ...

#### Splunk Security Content for Threat Detection & Response, Q1 Roundup

Join Principal Threat Researcher, Michael Haag, as he walks through: An introduction to the Splunk Threat ...