Splunk Search

Exclude a specific date/time of data from an overall average

DanielleM
Explorer

I am calculating monthly averages and have an issue where on a single day in October there was an error in the data. I would like to remove this single date and time range (Oct 12th 00:00-04:00) from the overall monthly average but don't want to impact future month calculations.

I run the following command for year to date to get monthly average -
index=xyz sourcetype=zyx | timechart span=1month avg(VALUE)

When I add NOT earliest="10/12/2019:00:00:00" latest="10/12/2019:04:00:00" to my base search it only provides that date. I tried adding brackets etc and it is not working.

Any suggestions would be appreciated!
Thanks!

0 Karma
1 Solution

nplamondon
SplunkTrust
SplunkTrust

You could try where with timestamp boundaries. For example, this excludes 10/31/2019 09:00 - 10:00:

... | where _time<1572537600 OR _time>1572541200

View solution in original post

nplamondon
SplunkTrust
SplunkTrust

You could try where with timestamp boundaries. For example, this excludes 10/31/2019 09:00 - 10:00:

... | where _time<1572537600 OR _time>1572541200

DanielleM
Explorer

That works, thank you !!!

0 Karma
Get Updates on the Splunk Community!

Enterprise Security Content Update (ESCU) | New Releases

In the last month, the Splunk Threat Research Team (STRT) has had 2 releases of new security content via the ...

Announcing the 1st Round Champion’s Tribute Winners of the Great Resilience Quest

We are happy to announce the 20 lucky questers who are selected to be the first round of Champion's Tribute ...

We’ve Got Education Validation!

Are you feeling it? All the career-boosting benefits of up-skilling with Splunk? It’s not just a feeling, it's ...