models.entity_schema_proto_granularity module

class models.entity_schema_proto_granularity.EntitySchemaProto_Granularity(rollup_interval_secs=None, time_to_live_secs=None)[source]

Bases: object

Implementation of the ‘EntitySchemaProto_Granularity’ model.

Rolling up or Down sampling is performed on timeseries data to reduce space usage by timeseries. Rollup Granularity is defined per entity schema but rollup function is not defined. Instead we create rolledup values for all the rollup functions.

Attributes:
rollup_interval_secs (int): Defines the rollup interval or a bucket

size. All data points within one time bucket are rolled up to one summary data point using the defined rollup function. For example, say, raw metric is published at ~30 secs granularity. To generate a hourly or a daily summary time series, client can define rolled up metrics having interval 3600 secs and 86400 secs respectively.

time_to_live_secs (int): Defines the duration for which the rolled up

data is to be stored. Once the lifespan has elapsed, expired data is garbage collected.

classmethod from_dictionary(dictionary)[source]

Creates an instance of this model from a dictionary

Args:

dictionary (dictionary): A dictionary representation of the object as obtained from the deserialization of the server’s response. The keys MUST match property names in the API description.

Returns:

object: An instance of this structure class.