Splunk Search

Get a Time Series in between The Event Times

linu1988
Champion

Hello Everyone,
I was doing some aggregation with stats, i had to show all the events between 15 minutes interval. The events available are having time according to the file modified date. When i do

"|bucket _time span=15m|Stats sum(FILESIZE)by _time"
i get the desired result and upon the value i get to know whether the file backup was done properly or not.

So My question was to "HOW CAN I GET THE INTERMEDIATE TIMES FOR THE EMPTY EVENTS FROM STARTING TO END TIME,SO THAT I CAN GET NULL FOR THOSE VALUES?

Tags (2)
0 Karma

jtrucks
Splunk Employee
Splunk Employee

Use timechart.

If you mean you want a result for every non-null 15 minute block, do:

search ... | timechart span=15m sum(FILESIZE)

If you need the minutes in between, you can get meta with something like:

search ... | timechart span=15m sum(FILESIZE) as filesum | timechart span=1m filesum

Or maybe:

search ... |bucket _time span=15m|Stats sum(FILESIZE)by _time as filesum| timechart span=1m filesum

You'll have to experiment to get the exact syntax for what you need, but I've used similar types of searches and timechart syntax before to accomplish this.

--
Jesse Trucks
Minister of Magic

linu1988
Champion

Timechart gives me the result but there are too many columns to consider. Any tweak that will only join the empty times between the missing time intervals

0 Karma

linu1988
Champion

I had thought of using Timechart but with many fields it doesn't give me the result. I want it in a tabular format with other relevant fields along with the sum value.

BTW thank you for the guidance ,but is there any other way by which I can get the whole _time range if the events doesn't have them?

0 Karma
Get Updates on the Splunk Community!

What the End of Support for Splunk Add-on Builder Means for You

Hello Splunk Community! We want to share an important update regarding the future of the Splunk Add-on Builder ...

Solve, Learn, Repeat: New Puzzle Channel Now Live

Welcome to the Splunk Puzzle PlaygroundIf you are anything like me, you love to solve problems, and what ...

Building Reliable Asset and Identity Frameworks in Splunk ES

 Accurate asset and identity resolution is the backbone of security operations. Without it, alerts are ...