ceilometer.storage.impl_sqlalchemy
Module¶SQLAlchemy storage backend.
ceilometer.storage.impl_sqlalchemy.
Connection
(conf, url)[source]¶Bases: ceilometer.storage.base.Connection
Put the data into a SQLAlchemy database.
Tables:
- meter
- meter definition
- { id: meter id
name: meter name
type: meter type
unit: meter unit
}
- resource
- resource definition
- { internal_id: resource id
resource_id: resource uuid
user_id: user uuid
project_id: project uuid
source_id: source id
resource_metadata: metadata dictionary
metadata_hash: metadata dictionary hash
}
- sample
- the raw incoming data
- { id: sample id
meter_id: meter id (->meter.id)
resource_id: resource id (->resource.internal_id)
volume: sample volume
timestamp: datetime
recorded_at: datetime
message_signature: message signature
message_id: message uuid
}
clear_expired_metering_data
(ttl)[source]¶Clear expired data from the backend storage system.
Clearing occurs according to the time-to-live. :param ttl: Number of seconds to keep records for.
get_meter_statistics
(sample_filter, period=None, groupby=None, aggregate=None)[source]¶Return an iterable of api_models.Statistics instances.
Items are containing meter statistics described by the query parameters. The filter must have a meter value set.
get_meters
(user=None, project=None, resource=None, source=None, metaquery=None, limit=None, unique=False)[source]¶Return an iterable of api_models.Meter instances
Parameters: |
|
---|
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 api_models.Resource instances
Parameters: |
|
---|
get_samples
(sample_filter, limit=None)[source]¶Return an iterable of api_models.Samples.
Parameters: |
|
---|
Except where otherwise noted, this document is licensed under Creative Commons Attribution 3.0 License. See all OpenStack Legal Documents.