The ceilometer.transformer.conversions Module

The ceilometer.transformer.conversions Module

class ceilometer.transformer.conversions.AggregatorTransformer(size=1, retention_time=None, project_id=None, user_id=None, resource_metadata='last', timestamp='first', **kwargs)[source]

Bases: ceilometer.transformer.conversions.ScalingTransformer

Transformer that aggregates samples.

Aggregation goes until a threshold or/and a retention_time, and then flushes them out into the wild.

Example:

To aggregate sample by resource_metadata and keep the resource_metadata of the latest received sample;

AggregatorTransformer(retention_time=60, resource_metadata=’last’)

To aggregate sample by user_id and resource_metadata and keep the user_id of the first received sample and drop the resource_metadata.

AggregatorTransformer(size=15, user_id=’first’,
resource_metadata=’drop’)

To keep the timestamp of the last received sample rather than the first:

AggregatorTransformer(timestamp=”last”)
flush()[source]
handle_sample(sample_)[source]
class ceilometer.transformer.conversions.BaseConversionTransformer(source=None, target=None, **kwargs)[source]

Bases: ceilometer.transformer.TransformerBase

Transformer to derive conversion.

grouping_keys = ['resource_id']
class ceilometer.transformer.conversions.DeltaTransformer(target=None, growth_only=False, **kwargs)[source]

Bases: ceilometer.transformer.conversions.BaseConversionTransformer

Transformer based on the delta of a sample volume.

handle_sample(s)[source]

Handle a sample, converting if necessary.

class ceilometer.transformer.conversions.RateOfChangeTransformer(**kwargs)[source]

Bases: ceilometer.transformer.conversions.ScalingTransformer

Transformer based on the rate of change of a sample volume.

For example, taking the current and previous volumes of a cumulative sample and producing a gauge value based on the proportion of some maximum used.

handle_sample(s)[source]

Handle a sample, converting if necessary.

class ceilometer.transformer.conversions.ScalingTransformer(source=None, target=None, **kwargs)[source]

Bases: ceilometer.transformer.conversions.BaseConversionTransformer

Transformer to apply a scaling conversion.

handle_sample(s)[source]

Handle a sample, converting if necessary.

Creative Commons Attribution 3.0 License

Except where otherwise noted, this document is licensed under Creative Commons Attribution 3.0 License. See all OpenStack Legal Documents.