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
Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.

Can’t make it to .conf25? Join us online!

Get Updates on the Splunk Community!

Community Content Calendar, September edition

Welcome to another insightful post from our Community Content Calendar! We're thrilled to continue bringing ...

Splunkbase Unveils New App Listing Management Public Preview

Splunkbase Unveils New App Listing Management Public PreviewWe're thrilled to announce the public preview of ...

Leveraging Automated Threat Analysis Across the Splunk Ecosystem

Are you leveraging automation to its fullest potential in your threat detection strategy?Our upcoming Security ...