SQLAlchemy storage backend.
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 data from the backend storage system.
Clearing occurs according to the time-to-live. :param ttl: Number of seconds to keep records for.
Return all event types as an iterable of strings.
Return an iterable of model.Event objects.
Parameters: | event_filter – EventFilter instance |
---|
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.
Return an iterable of api_models.Meter instances
Parameters: |
|
---|
Return an iterable of api_models.Resource instances
Parameters: |
|
---|
Return an iterable of api_models.Samples.
Parameters: |
|
---|
Return a dictionary containing the name and data type of the trait.
Only trait types for the provided event_type are returned. :param event_type: the type of the Event
Return all trait instances associated with an event_type.
If trait_type is specified, only return instances of that trait type. :param event_type: the type of the Event to filter by :param trait_type: the name of the Trait to filter by
Write the events to SQL database via sqlalchemy.
Parameters: | event_models – a list of model.Event objects. |
---|
Returns a list of events that could not be saved in a (reason, event) tuple. Reasons are enumerated in storage.model.Event
Flush when they’re all added, unless new EventTypes or TraitTypes are added along the way.
Write the data to the backend storage system.
Parameters: | data – a dictionary such as returned by ceilometer.meter.meter_message_from_counter |
---|