The watcher.decision_engine.cluster.history.base Module

The Cluster History contains all the previously collected timestamped data such as metrics and events associated to any managed resource of the Cluster.

Just like the Cluster Data Model, this history may be used by any Strategy in order to find the most optimal Solution during an Audit.

In the Watcher project, a generic Cluster History API is proposed with some helper classes in order to :

  • share a common measurement (events or metrics) naming based on what is defined in Ceilometer. See the full list of available measurements
  • share common meter types (Cumulative, Delta, Gauge) based on what is defined in Ceilometer. See the full list of meter types
  • simplify the development of a new Strategy
  • avoid duplicating the same code in several Strategies
  • have a better consistency between the different Strategies
  • avoid any strong coupling with any external metrics/events storage system (the proposed API and measurement naming system acts as a pivot format)

Note however that a developer can use his/her own history management system if the Ceilometer system does not fit his/her needs as long as the Strategy is able to produce a Solution for the requested Goal.

The Cluster History data may be persisted in any appropriate storage system (InfluxDB, OpenTSDB, MongoDB,...).

class watcher.decision_engine.cluster.history.base.BaseClusterHistory[source]

Bases: object

get_last_sample_values(resource_id, meter_name, limit=1)[source]
query_sample(meter_name, query, limit=1)[source]
statistic_aggregation(resource_id, meter_name, period, aggregate='avg')[source]
statistic_list(meter_name, query=None, period=None)[source]