In timeseries monitoring temporal granularity refers to the frequency with which data points are emitted - in other words, individual data inputs are gathered for a certain period of time, and then they're summarized statistically and presented on the time series. This "certain period of time" describes the temporal granularity of the time series. For example, Amazon AWS CloudWatch metrics have their finest temporal granularity at 1 minute.
|A time series chart with an Amazon CloudWatch metric displayed with 1 minute granularity|
In monitoring computer systems granularities of between 1 minute and one hour are prevalent. The greater the amounts of data a system has to process, the finer the granularity is desired for precise monitoring. On many occasions 1-second granularity is necessary to reliably establish causal relationships between system components (such as what started a series of events?)
At other times, important trends can be missed precisely because the data are viewed at too fine a temporal granularity.
Suppose you're monitoring a computationally expensive batch job that runs every hour. The success of the computation is non-critical as long as it succeeds eventually, at least once every eight hours. On every successful run, a data point equal to 1 is reported, a failed job does not publish any data.
Viewing data points of the previous week at an hourly granularity looks roughly like this:
It's not immediately obvious, but at closer introspection the computational job was failing for too long twice, between Friday and Saturday. Now, the looking at a time interval of three months makes it even less obvious.
However, aggregating the same 90 days worth of data at a much coarser 8-hour granularity reveals a clear, regressive trend that started around the 24th of June:
In this case the very gradual regression is an indicative of hitting capacity and scale limits, and the trend could have been detected reliably detected a month before it developed into a serious problem.