Hi, I want to use Timechart to track daily use, but sometimes the daily data won't arrive until 12 AM (time to compile the results). How can I shift the span=1d in timechart to start at a point other than 12AM?
E.g., :
index=usage | eval time=time/3600 | timechart span=1d sum(time) as total_time by user
Thanks
This is not a problem of the Splunk search - it is a problem of the timestamp of the data that you are putting into Splunk. If you write a script that tallies the number of jobs on a server, the timestamp of that event should be the date of the jobs not the time when you ran the tally.
So if if your script runs at midnight on Friday, December 5th, 2014, the output of the script should be
12-4-2014 11:59:59 number_of_jobs=2702
or something similar. Then when you index that data, the timestamp will be correct and the data will appear on the right day.
What is your requirement here, means what do you want to measure and how it's affected due to late data arrival?
I want to represent the daily usage of a computer farm, as well as weighted priority, and so on. To reduce strain on the farm, I tally up all the days jobs at the end of the day (rather than constantly polling for new jobs/status/runtime throughout the day). This process takes variable time based on the number of jobs run over the course of the day, so to get an accurate count from 12AM->12AM (1 day), the data won't arrive until the next day, meaning all my data will be offset by one day because of when it arrives.
Does the data comes daily once between 12:00 AM to 2:00 AM only? Means if that's the case you can just adjust _time value to adjust for the delay (reduce 7200).
In the general case, yes that's true.
To me, this seems an odd feature to be missing via option. For example, I might want the day's bucket to be based on the working day, or the year's bucket to be based on the school year, and so on.