The ceilometer.storage.impl_db2 Module

DB2 storage backend

class ceilometer.storage.impl_db2.Connection(url)[source]

Bases: ceilometer.storage.pymongo_base.Connection

The db2 storage for Ceilometer

Collections:

- meter
  - the raw incoming data
- resource
  - the metadata for resources
  - { _id: uuid of resource,
      metadata: metadata dictionaries
      user_id: uuid
      project_id: uuid
      meter: [ array of {counter_name: string, counter_type: string,
                         counter_unit: string} ]
    }
clear()[source]
get_meter_statistics(sample_filter, period=None, groupby=None, aggregate=None)[source]

Return an iterable of models.Statistics instance.

Items are containing meter statistics described by the query parameters. The filter must have a meter value set.

get_resources(user=None, project=None, source=None, start_timestamp=None, start_timestamp_op=None, end_timestamp=None, end_timestamp_op=None, metaquery=None, resource=None, limit=None)[source]

Return an iterable of models.Resource instances

Parameters:
  • user – Optional ID for user that owns the resource.
  • project – Optional ID for project that owns the resource.
  • source – Optional source filter.
  • start_timestamp – Optional modified timestamp start range.
  • start_timestamp_op – Optional start time operator, like gt, ge.
  • end_timestamp – Optional modified timestamp end range.
  • end_timestamp_op – Optional end time operator, like lt, le.
  • metaquery – Optional dict with metadata to match on.
  • resource – Optional resource filter.
  • limit – Maximum number of results to return.
record_metering_data(data)[source]

Write the data to the backend storage system.

Parameters:data – a dictionary such as returned by ceilometer.meter.meter_message_from_counter
upgrade(version=None)[source]

Previous topic

The ceilometer.storage.hbase.utils Module

Next topic

The ceilometer.storage.impl_hbase Module

Project Source

This Page