watcher.datasource.ceilometer module

watcher.datasource.ceilometer module

service None

Bases: watcher.datasource.base.DataSourceBase

CeilometerHelper.build_query(user_id=None, tenant_id=None, resource_id=None, user_ids=None, tenant_ids=None, resource_ids=None, start_time=None, end_time=None)[source]

Returns query built from given parameters.

This query can be then used for querying resources, meters and statistics. :param user_id: user_id, has a priority over list of ids :param tenant_id: tenant_id, has a priority over list of ids :param resource_id: resource_id, has a priority over list of ids :param user_ids: list of user_ids :param tenant_ids: list of tenant_ids :param resource_ids: list of resource_ids :param start_time: datetime from which measurements should be collected :param end_time: datetime until which measurements should be collected

CeilometerHelper.check_availability()[source]
static CeilometerHelper.format_query(user_id, tenant_id, resource_id, user_ids, tenant_ids, resource_ids)[source]
CeilometerHelper.get_host_airflow(resource_id, period, aggregate, granularity=None)[source]
CeilometerHelper.get_host_cpu_usage(resource_id, period, aggregate, granularity=None)[source]
CeilometerHelper.get_host_inlet_temperature(resource_id, period, aggregate, granularity=None)[source]
CeilometerHelper.get_host_memory_usage(resource_id, period, aggregate, granularity=None)[source]
CeilometerHelper.get_host_outlet_temperature(resource_id, period, aggregate, granularity=None)[source]
CeilometerHelper.get_host_power(resource_id, period, aggregate, granularity=None)[source]
CeilometerHelper.get_instance_cpu_usage(resource_id, period, aggregate, granularity=None)[source]
CeilometerHelper.get_instance_l3_cache_usage(resource_id, period, aggregate, granularity=None)[source]
CeilometerHelper.get_instance_memory_usage(resource_id, period, aggregate, granularity=None)[source]
CeilometerHelper.get_instance_ram_allocated(resource_id, period, aggregate, granularity=None)[source]
CeilometerHelper.get_instance_root_disk_allocated(resource_id, period, aggregate, granularity=None)[source]
CeilometerHelper.get_last_sample_value(resource_id, meter_name)[source]
CeilometerHelper.get_last_sample_values(resource_id, meter_name, limit=1)[source]
CeilometerHelper.list_metrics()[source]

List the user’s meters.

CeilometerHelper.query_retry(f, *args, **kargs)[source]
CeilometerHelper.query_sample(meter_name, query, limit=1)[source]
CeilometerHelper.statistic_aggregation(resource_id=None, meter_name=None, period=300, granularity=300, dimensions=None, aggregation='avg', group_by='*')[source]

Representing a statistic aggregate by operators

Parameters:
  • resource_id – id of resource to list statistics for.
  • meter_name – Name of meter to list statistics for.
  • period – Period in seconds over which to group samples.
  • granularity – frequency of marking metric point, in seconds. This param isn’t used in Ceilometer datasource.
  • dimensions – dimensions (dict). This param isn’t used in Ceilometer datasource.
  • aggregation – Available aggregates are: count, cardinality, min, max, sum, stddev, avg. Defaults to avg.
  • group_by – list of columns to group the metrics to be returned. This param isn’t used in Ceilometer datasource.
Returns:

Return the latest statistical data, None if no data.

CeilometerHelper.statistic_list(meter_name, query=None, period=None)[source]

List of statistics.

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.