Like most things in Splunk, there are many ways to achieve your desired outcomes. Generally "the best" way is the one that works in the time you have!
Personally I would recommend checking out the Machine Learning Toolkit. https://splunkbase.splunk.com/app/2890/
It contains a "Detect Numerical Outliers" assistant that will allow you to apply some common algorithms (std dev, abs mean dev, etc) which will let you experiment until you find one that works the best for your situation.
This will give you much more control over the definition of "outlier", will allow you validate, and also provide you with some awesome new vizualizations like that awesome outliers chart!
The greatest part is it will spit out the SPL used to identify the outliers, which you could then use eliminate the outliers (based on the isOutlier field) then timechart the values that remain.
Here is an example where I used absolute mean deviation to identify spikes in data ingest in one of my indexes....
Here is the SPL it spit out:
(you will mainly be interested in everything after the timechart. Just substitute your base search and field values accordingly.)
index=`meta_woot_summary` sourcetype=meta_woot orig_sourcetype!=stash orig_sourcetype=* orig_host=* orig_index=*
| timechart limit=20 span=30m sum(count) as totalEvents by orig_index
| eventstats median("n00blab") as median
| eval absDev=(abs('n00blab'-median))
| eventstats median(absDev) as medianAbsDev
| eval lowerBound=(median-medianAbsDev*2.500000), upperBound=(median+medianAbsDev*2.500000)
| eval isOutlier=if('n00blab' < lowerBound OR 'n00blab' > upperBound, 1, 0)
| table _time, "n00blab", lowerBound, upperBound, isOutlier
The idea is that you will look across all your data points (or a defined window) and settle in on a multiplier that accurately identifies your outliers...then you can add a where condition or subsearch to remove all outliers, then timechart them!
example you could just append
| where isOutlier=0
Give it a try! I am confident it will provide a great workbench for this and many more of your use cases and will show you some awesome SPL tricks to add to your Splunk superhero bag of tricks!
... View more