Jump to: navigation, search

Difference between revisions of "SystemUsageData"

 
 
(59 intermediate revisions by 17 users not shown)
Line 1: Line 1:
__NOTOC__
+
'''NOTE: This page and it's notifications may be out of date.''' The full list of legacy notifications can be found in the [https://github.com/openstack/nova/blob/14.0.0/nova/rpc.py#L211 nova.rpc.LegacyValidatingNotifier code]. Nova has moved to sending versioned notifications which are described in the developer documentation here: http://docs.openstack.org/developer/nova/notifications.html#versioned-notifications
* '''Launchpad Entry''': [[NovaSpec]]: System Usage Data
 
* '''Created''': 3 February 2011
 
* '''Contributors''': Paul Voccio, Glen Campbell
 
  
 
== Summary ==
 
== Summary ==
 
 
Nova administrators want data on system usage for billing, chargeback, or monitoring purposes.
 
Nova administrators want data on system usage for billing, chargeback, or monitoring purposes.
  
 
== Release Note ==
 
== Release Note ==
 +
System usage data is emitted from Nova in the form of usage events from Nova's [[NotificationSystem]]. The notification system can be configured to emit events either through nova's logging facility, or send them to a series of AMQP queues (one per notification priority).  System usages are emitted as notification events with the INFO priority.  Different types of usage events are distinguished via the notifications' event_type, which is a hierarchical dotted string such as ''compute.instance.create'', which allows usages to be easily grouped for aggregation. Usage notifications can be immediate, created when a specific increment of usage occurs (such as creation of an instance) or periodic, generated by a periodic task, like a cron job, and covering usage for a certain period of time. Besides the standard Nova Notification priority, notification timestamp, and event_type, usage notifications contain a payload of data that will vary depending on the event_type. This is presented as a json-formatted hash of key-value pairs. Some of the keys, such as tenant_id will always be present in any usage notification, others will be data relevent to that event_type (For example, instance related notifications will contain data describing the instance.)
  
System usage data is collected by Nova and provided via a rich Atom API. Usage data includes utilization of bandwidth, hard disk, and RAM, along with other important events such as the creation or teardown of servers. If configured, usage data is provided via [[PubSubHubbub]] (PSH) for efficient distribution of data to subscribers.
+
For more indepth examples see [[NotificationEventExamples]].
 +
 
 +
An external application (https://github.com/rackerlabs/yagi) is available that can read notifications from AMQP queues and provide an Atom API. This application generates Atom feeds of the notifications, and can publish feeds via PubSubHubbub (PSH) for efficient distribution of data to subscribers.
  
 
== Rationale ==
 
== Rationale ==
 +
As a systems integrator, we need the ability for 3rd party systems to query usage information from Nova to determine how to charge customers for use of the platform.
  
As a systems integrator, we need the ability for 3rd party systems to query usage information from Nova to determine how to charge customers for use of the platform.  
+
Enterprise customers also need the ability to determine usage data, though for different reasons. For example, a cloud administrator may want to determine VMs that have not been used in several month so that they can be reclaimed and the resources reallocated. Some IT departments may implement a quota system for their users.
  
Enterprise customers also need the ability to determine usage data, though for different reasons. For example, a cloud administrator may want to determine VMs that have not been used in several month so that they can be reclaimed and the resources reallocated. Bandwidth statistics at the individual VM level could be used to optimize load balancing and deployment efficiency. And some IT departments may implement a quota system for their users.
+
Note that Nova itself should not be concerned with billing, but it needs to present a feed of usage data that an external application could use to aggregate the billing data for a requested time period.
 
 
Note that Nova itself should not be concerned with billing, but it needs to collect the usage data and aggregate it for a requested time period, as well as potentially reset any counters involved.  
 
  
 
== User stories ==
 
== User stories ==
 
+
# As a systems integrator, I need to retrieve usage data so that I can properly bill my customers.
As a systems integrator, I need to retrieve usage data so that I can properly bill my customers.
+
# As a systems integrator or enterprise cloud administrator, I want to monitor usage data over time so that I can optimize the utilization of my resources.
 
+
# As an business or agency that supports multiple projects, I need to account for the resources consumed by each project so that I can properly meet accounting and budget standards.
As a systems integrator or enterprise cloud administrator, I want to monitor usage data over time so that I can optimize the utilization of my resources.
+
# As a systems integrator, I need to provide usage data to multiple third-party systems without building custom interfaces to each one so that I can efficiently utilize my manpower.
 
 
As an business or agency that supports multiple projects, I need to account for the resources consumed by each project so that I can properly meet accounting and budget standards.
 
 
 
As a systems integrator, I need to provide usage data to multiple third-party systems without building custom interfaces to each one so that I can efficiently utilize my manpower.  
 
  
 
== Assumptions ==
 
== Assumptions ==
 +
Usage data can be aggregated by Tenant ID (as defined in the [[openstack-accounting]] blueprint).(i.e. Tenant ID is always present)
  
Usage data is retrieved by Account ID as defined in the [[openstack-accounting]] blueprint.
+
There is a billing system that is not a part of [[OpenStack]]. Invoicing, billing, and customer management are handled externally to [[OpenStack]]/Nova. Nova only has knowledge of an "tenant ID" (as per the [[openstack-accounting]] blueprint).
 
 
There is a billing system that is not a part of [[OpenStack]]. Invoicing, billing, and customer management are handled externally to [[OpenStack]]/Nova. Nova only has knowledge of an "account ID" as per the [[openstack-accounting]] blueprint.
 
 
 
The "account ID" is "not" the same as the (existing) project_id; there may be multiple projects under a single account ID.
 
 
 
If Nova is installed in multiple regions (aka "zones"), usage data will not span zones; even if the same account ID is used in multiple zones, that data must be aggregated external to Nova.
 
 
 
== Design ==
 
 
 
=== Event Data ===
 
 
 
We need to have a model for usages that record a usage every time an action ("event") happens on a vm. Events include creation, resizes, deletions, add/remove ips, etc. In theory, any event should be logged; in practice, it may be suitable to focus only on those events that are of significant interest to the [[OpenStack]] community.
 
 
 
Event data would include something similar, but not strict to the following:
 
 
 
{| border="1" cellpadding="2" cellspacing="0"
 
|  '''Data Type'''
 
|  '''Name'''
 
|-
 
| t.integer
 
| instance_id
 
|-
 
| t.integer
 
| ram_size
 
|-
 
| t.integer
 
| disk_size
 
|-
 
| t.integer
 
| account_id
 
|-
 
| t.integer
 
| used_tx
 
|-
 
| t.integer
 
| used_rx
 
|-
 
| t.integer
 
| has_backups
 
|-
 
| t.integer
 
| extra_ips
 
|-
 
| t.datetime
 
| started_at
 
|-
 
| t.datetime
 
| ended_at
 
|-
 
| t.datetime
 
| created_at
 
|-
 
| t.datetime
 
| updated_at
 
|-
 
| t.string
 
| options
 
|}
 
 
 
This could potentially be made generic by specifying the attributes to be tracked and recorded in a configuration file. Ideally, the usage tracking API should be extensible so that users may track specific usage data of interest to themselves without the need to modify the core Nova system.  
 
 
 
=== API ===
 
  
==== API RETURN FORMAT ====
+
The Tenant ID is the same as the tenant id concept in Keystone, and is known internally to Nova as the "Project ID".
  
The usage data API will return [http://www.ietf.org/rfc/rfc4287.txt Atom 1.0]-formatted data.
+
If Nova is installed in multiple regions (aka "zones"), usage data will not span zones; even if the same tenant ID is used in multiple zones, that data must be aggregated external to Nova.
  
The proposed method for returning structured data is by using the [http://www.odata.org/ Open Data Protocol] embedded within the Atom feed.  
+
== Design and Implementation ==
 +
There are two events generated for every activity. Previously, events were only generated on activity completion, but now there is an event when the activity starts and, as before, when the activity ends. These are marked as 'compute.instance.<activity>.start' and 'compute.instance.<activity>.end'. The '.end' event is the same as the event previously expected.
  
==== API CACHING ====
+
=== Event Types and Payload data: ===
  
GET requests MUST return a Cache-Control: header.
+
A sample of most Nova events (with scrubbed values) is available here: http://paste.openstack.org/show/54140/
  
The default cache time (in seconds) MUST be configurable by a system-wide setting. For example, if the system setting for cache time is 60 seconds, then an API GET request should return:
+
==== compute.instance.create.{start,error,end}: ====
 +
* Usage notification upon creation of a new instance.
 +
* '''tenant_id''':  Tenant ID that owns the this instance (string)
 +
* '''user_id''':  User ID that owns this instance (string)
 +
* '''instance_id''':  Nova instance ID of this instance (string)
 +
* '''instance_type''':  Name of the instance type ('flavor') of this instance. (string)
 +
* '''instance_type_id''': Nova ID for instance type ('flavor') of this instance. (string)
 +
* '''display_name''': User selected display name for instance.
 +
* '''created_at''': Timestamp for when this instance's record was created in Nova (string, formatted "YYYY-MM-DD hh:mm:ss.ssssss")
 +
* '''launched_at''': Timestamp for when this instance was last launched by hypervisor. (string, formatted "YYYY-MM-DD hh:mm:ss.ssssss")
 +
* '''image_ref_url''':  Image URL (from Glance) that this instance was created from. (string)
 +
* '''state''': Current state of instance. (string, such as 'active' or 'deleted')
 +
* '''state_description''': Additional human readable description of current state of instance.
 +
* '''fixed_ips''': list of ip addresses formatted like [{"floating_ips": [], "meta": {}, "type": "fixed", "version": 4, "address": "10.0.0.9", "label": "public"}] assigned to instance.
 +
* '''memory_mb''': memory allocation for this instance (in mb)
 +
* '''disk_gb''': disk allocation for this instance (in gb)
 +
* '''message''': High-level message describing the notification.  If the event type is "create.error", it will contain error details.
  
Cache-Control: max-age=60
+
==== compute.instance.delete.start/.end: ====
 +
* Usage notification upon deletion of an instance.
 +
* '''tenant_id''':  Tenant ID that  owns the this instance (string)
 +
* '''user_id''':  User ID that  owns this instance (string)
 +
* '''instance_id''':  Nova  instance ID of this instance (string)
 +
* '''instance_type''':  Name of  the instance type ('flavor') of this instance. (string)
 +
* '''instance_type_id''': Nova ID  for instance type ('flavor') of this instance. (string)
 +
* '''display_name''': User  selected display name for instance.
 +
* '''created_at''': Timestamp for  when this instance's record was created in Nova (string, formatted  "YYYY-MM-DD hh:mm:ss.ssssss")
 +
* '''launched_at''': Timestamp for  when this instance was last launched by hypervisor. (string, formatted  "YYYY-MM-DD hh:mm:ss.ssssss")
 +
* '''image_ref_url''':  Image URL (from Glance) that this instance was created from.  (string)
 +
* '''state''':  Current state of instance.  (string, such as 'active' or 'deleted')
 +
* '''state_description''': Additional human readable  description of current state of instance.
 +
* '''fixed_ips''': list of ip addresses formatted like [{"floating_ips": [], "meta": {}, "type": "fixed", "version": 4, "address": "10.0.0.9", "label": "public"}] assigned to instance.
 +
* '''memory_mb''': memory allocation for this instance (in mb)
 +
* '''disk_gb''': disk allocation for this instance (in gb)
  
If the user wishes to disable caching, use a cache setting of 0.
+
==== compute.instance.rebuild.start/.end: ====
 +
* Usage notification upon rebuild of instance.
 +
* '''tenant_id''':  Tenant ID that  owns the this instance (string)
 +
* '''user_id''':  User ID that  owns this instance (string)
 +
* '''instance_id''':  Nova  instance ID of this instance (string)
 +
* '''instance_type''':  Name of  the instance type ('flavor') of this instance. (string)
 +
* '''instance_type_id''': Nova ID  for instance type ('flavor') of this instance. (string)
 +
* '''display_name''': User  selected display name for instance.
 +
* '''created_at''': Timestamp for  when this instance's record was created in Nova (string, formatted  "YYYY-MM-DD hh:mm:ss.ssssss")
 +
* '''launched_at''': Timestamp for  when this instance was last launched by hypervisor. (string, formatted  "YYYY-MM-DD hh:mm:ss.ssssss")
 +
* '''image_ref_url''':  Image  URL (from Glance) that this instance <u>is being rebuilt</u> from.  (string)
 +
* '''state''':  Current state of instance.  (string, such as 'active' or 'deleted')
 +
* '''state_description''': Additional human readable  description of current state of instance.
 +
* '''fixed_ips''': list of ip addresses formatted like [{"floating_ips": [], "meta": {}, "type": "fixed", "version": 4, "address": "10.0.0.9", "label": "public"}] assigned to instance.
 +
* '''memory_mb''': memory allocation for this instance (in mb)
 +
* '''disk_gb''': disk allocation for this instance (in gb)
  
==== API METHODS ====
+
==== compute.instance.resize.prep.start/.end: ====
 +
* Usage notification when a resize/migrate of an instance is begun.
 +
* '''tenant_id''':  Tenant ID that  owns the this instance (string)
 +
* '''user_id''':  User ID that  owns this instance (string)
 +
* '''instance_id''':  Nova  instance ID of this instance (string)
 +
* '''instance_type''':  Name of  the <u>current</u> (before resize) instance type ('flavor') of this instance. (string)
 +
* '''instance_type_id''': Nova ID  for <u>current</u> (before resize) instance type ('flavor') of this instance. (string)
 +
* '''new_instance_type''':  Name of  the new (after  resize) instance type ('flavor') of this instance. (string)
 +
* '''new_instance_type_id''': Nova ID  for new (after  resize) instance type ('flavor') of this instance. (string)
 +
* '''display_name''': User  selected display name for instance.
 +
* '''created_at''': Timestamp for  when this instance's record was created in Nova (string, formatted  "YYYY-MM-DD hh:mm:ss.ssssss")
 +
* '''launched_at''': Timestamp for  when this instance was last launched by hypervisor. (string, formatted  "YYYY-MM-DD hh:mm:ss.ssssss")
 +
* '''image_ref_url''':  Image  URL (from Glance) that this instance was  created from.  (string)
 +
* '''state''':  Current state of instance.  (string, such as 'active' or 'deleted')
 +
* '''state_description''': Additional human readable  description of current state of instance.
 +
* '''fixed_ips''': list of ip addresses formatted like [{"floating_ips": [], "meta": {}, "type": "fixed", "version": 4, "address": "10.0.0.9", "label": "public"}] assigned to instance.
 +
* '''memory_mb''': memory allocation for this instance (in mb)
 +
* '''disk_gb''': disk allocation for this instance (in gb)
  
{| border="1" cellpadding="2" cellspacing="0"
+
==== compute.instance.resize.confirm.start/.end: ====
| '''URN'''  
+
* Usage notification when a resize/migration of an instance has been confirmed by the user.
'''Method'''  
+
* '''tenant_id''': Tenant ID that  owns the this instance (string)
'''Returns'''  
+
* '''user_id''':  User ID that  owns this instance (string)
|-
+
* '''instance_id''':  Nova  instance ID of this instance (string)
|rowspan="4" | /v1.0/usage
+
* '''instance_type''':  Name of  the current instance type ('flavor') of this instance. (i.e. the one it has been resized to.) (string)
| GET
+
* '''instance_type_id''': Nova ID for the current instance type ('flavor') of this instance. (i.e. the one it has been resized to.) (string)
| returns aggregated usage information for the entire Nova instance  
+
* '''display_name''': User selected display name for instance.
|-
+
* '''created_at''': Timestamp for when this instance's record was created in Nova (string, formatted "YYYY-MM-DD hh:mm:ss.ssssss")
| PUT
+
* '''launched_at''': Timestamp for when this instance was last launched by hypervisor. (string, formatted "YYYY-MM-DD hh:mm:ss.ssssss")
| 405 Method Not Allowed
+
* '''image_ref_url''': Image URL (from Glance) that this instance was created from. (string)
|-
+
* '''state''': Current state of instance. (string, such as 'active' or 'deleted')
| POST
+
* '''state_description''': Additional human readable description of current state of instance.
| 405 Method Not Allowed
+
* '''fixed_ips''': list of ip addresses formatted like [{"floating_ips": [], "meta": {}, "type": "fixed", "version": 4, "address": "10.0.0.9", "label": "public"}] assigned to instance.
|-
+
* '''memory_mb''': memory allocation for this instance (in mb)
|  DELETE
+
* '''disk_gb''': disk allocation for this instance (in gb)
|  405 Method Not Allowed
 
|-
 
|rowspan="4" | /v1.0/''accountID''/usage
 
| GET
 
| Returns aggregated usage data for the specified account. Strictly speaking, GET requests should be idempotent; however, because usage data may have some latency, a second GET request may return (slightly) different data
 
|-
 
| PUT
 
| 405 Method Not Allowed
 
|-
 
| POST
 
|  Returns aggregated usage data for the specified account as per GET; however, the POST request also resets ongoing counters to zero.  
 
|-
 
|  DELETE
 
|  Resets aggregated usage data for the specified account.
 
|}
 
  
==== API QUERY STRINGS ====
+
==== compute.instance.resize.revert.start/.end: ====
 +
* Usage notification when a resize/migration of an instance has been reverted by the user.
 +
* '''tenant_id''':  Tenant ID that  owns the this instance (string)
 +
* '''user_id''':  User ID that  owns this instance (string)
 +
* '''instance_id''':  Nova  instance ID of this instance (string)
 +
* '''instance_type''':  Name of  the current instance type ('flavor') of this instance. (i.e. the one it has been reverted back to.) (string)
 +
* '''instance_type_id''':  Nova ID  for the current instance type ('flavor') of this instance. (i.e. the one it has been reverted back to.) (string)
 +
* '''display_name''':  User  selected display name for instance.
 +
* '''created_at''': Timestamp for  when this instance's record was created in Nova (string, formatted  "YYYY-MM-DD hh:mm:ss.ssssss")
 +
* '''launched_at''': Timestamp for  when this instance was last launched by hypervisor. (string, formatted  "YYYY-MM-DD hh:mm:ss.ssssss")
 +
* '''image_ref_url''':  Image  URL (from Glance) that this instance was  created from.  (string)
 +
* '''state''':  Current state of instance.  (string, such as 'active' or 'deleted')
 +
* '''state_description''': Additional human readable  description of current state of instance.
 +
* '''fixed_ips''': list of ip addresses formatted like [{"floating_ips": [], "meta": {}, "type": "fixed", "version": 4, "address": "10.0.0.9", "label": "public"}] assigned to instance.
 +
* '''memory_mb''': memory allocation for this instance (in mb)
 +
* '''disk_gb''': disk allocation for this instance (in gb)
  
All queries must be able to be constrained by a timestamp:
+
==== compute.instance.exists: ====
 +
There is no .start/.end event for this activity ... just the 'compute.instance.exists' event.
  
/''version''/''accountID''/usage?begin=2011-01-01-00:00&end=2011-02-01-00:00
+
* Periodic usage notification generated by the instance-usage-audit cron job. These usages are generated for '''each''' instance that was active during the specified audit period.
 +
* '''tenant_id''':  Tenant ID that owns the this instance (string)
 +
* '''user_id''':  User ID that owns this instance  (string)
 +
* '''instance_id''':  Nova  instance ID of this instance (string)
 +
* '''instance_type''':  Name of the instance type ('flavor') of this instance. (string)
 +
* '''instance_type_id''': Nova ID for instance type  ('flavor') of this instance. (string)
 +
* '''display_name''':  User selected display name for instance.
 +
* '''created_at''': Timestamp for when this instance's  record was created in Nova (string, formatted "YYYY-MM-DD  hh:mm:ss.ssssss")
 +
* '''launched_at''':  Timestamp for when this instance was last launched by hypervisor.  (string, formatted "YYYY-MM-DD hh:mm:ss.ssssss")
 +
* '''image_ref_url''':  Image URL (from Glance) that this  instance was created from. (string)
 +
* '''image_meta''': Dictionary of key-value pairs representing metadata from the image the instance was built from.
 +
* '''audit_period_begining''':  Timestamp of beginning of audit period. (string, formatted "YYYY-MM-DD  hh:mm:ss.ssssss")
 +
* '''audit_period_ending''':  Timestamp of end of audit period. (string, formatted "YYYY-MM-DD  hh:mm:ss.ssssss")
 +
* '''bandwidth''': Hash listing bandwidth used for each network this instance is connected to.  Keys will be network labels, values will be hashes containing the keys ''''bw_in'''', and ''''bw_out'''', listing the incoming, and outgoing bandwith, respectively,  used by that instance, on that network, for that audit period.  Bandwith is reported in bytes.
 +
* '''state''':  Current state of instance.  (string, such as 'active' or 'deleted')
 +
* '''state_description''': Additional human readable  description of current state of instance.
 +
* '''fixed_ips''': list of ip addresses formatted like [{"floating_ips": [], "meta": {}, "type": "fixed", "version": 4, "address": "10.0.0.9", "label": "public"}] assigned to instance.
 +
* '''memory_mb''': memory allocation for this instance (in mb)
 +
* '''disk_gb''': disk allocation for this instance (in gb)
  
''It's probably best not to provide search functionality like this on the host node. We should do our best to keep the database on each host node as small as we reasonably can. The API would be useful with this capability, but it should search through a data store at a region level.''
+
==== compute.instance.update: ====
  
In these cases, the begin value is compare as being "greater than or equal to" and the end value as "less than." This allows for inclusive date/time ranges without, for example, the need to specify complex operators.
+
This event is generated whenever the VM or task state of the server changes; for example, when the server moves from BUILDING to either ACTIVE or ERROR.
  
This could get propagated to the regional level and then put into a log db for retrieval later or processing. The api to retrieve usages would look at this secondary db and not the configuration db.
+
This notification is disabled by default.
  
This paradigm works for event type data, but it's not optimal for accumulation of usage that happens out-of-band from the API. For example, you may create an instance, and it remains on through an entire billing cycle, consuming network bandwidth during that period. If bandwidth should be billable, there would need to be regular "bandwidth used" events in the event stream that get added up when it's time to bill for them. It might make more sense to have a separate solution for cumulative counters (like bandwidth) that can be externally retreived on regular intervals rather than having some sort of local scheduler that generates events on such intervals. This way the collection interval could vary on a per-instance basis and no complex scheduler logic would need to be tracked on the host node.
+
To enable notifications when the VM state changes, set configuration flag "notify_on_state_change" to "vm_state".
  
=== Notifications ===
+
To enable notifications when either VM state or task state changes, set configuration flag "notify_on_state_change" to "vm_and_task_state".
  
The event-tracking worker should provide the ability to perform [[PubSubHubbub]] (PSH) notifications based on configuration settings (i.e., this functionality can be disabled via a configuration flag).  
+
* '''tenant_id''':  Tenant ID that owns the this instance (string)
 +
* '''user_id''':  User ID that owns this instance  (string)
 +
* '''instance_id''':  Nova  instance ID of this instance (string)
 +
* '''instance_type''':  Name of the instance type ('flavor') of this instance. (string)
 +
* '''instance_type_id''': Nova ID for instance type  ('flavor') of this instance. (string)
 +
* '''display_name''':  User selected display name for instance.
 +
* '''created_at''': Timestamp for when this instance's  record was created in Nova (string, formatted "YYYY-MM-DD  hh:mm:ss.ssssss")
 +
* '''launched_at''':  Timestamp for when this instance was last launched by hypervisor.  (string, formatted "YYYY-MM-DD hh:mm:ss.ssssss")
 +
* '''image_ref_url''':  Image URL (from Glance) that this  instance was created from. (string)
 +
* '''image_metadata''': array of key-value pairs representing the metadata from the image from which the instance was built (array)
 +
* '''audit_period_begining''':  Timestamp of beginning of audit period. (string, formatted "YYYY-MM-DD  hh:mm:ss.ssssss")
 +
* '''audit_period_ending''':  Timestamp of end of audit period. (string, formatted "YYYY-MM-DD  hh:mm:ss.ssssss")
 +
* '''bandwidth''': Hash listing bandwidth used for each network this instance is connected to.  Keys will be network labels, values will be hashes containing the keys ''''bw_in'''', and ''''bw_out'''', listing the incoming, and outgoing bandwith, respectively,  used by that instance, on that network, for that audit period.  Bandwith is reported in bytes.
 +
* '''old_state''':  Prior state of instance.  (string, such as 'active' or 'deleted')
 +
* '''state''':  Current state of instance.  (string, such as 'active' or 'deleted')
 +
* '''state_description''': Additional human readable  description of current state of instance.
 +
* '''fixed_ips''': list of ip addresses formatted like [{"floating_ips": [], "meta": {}, "type": "fixed", "version": 4, "address": "10.0.0.9", "label": "public"}] assigned to instance.
 +
* '''memory_mb''': memory allocation for this instance (in mb)
 +
* '''disk_gb''': disk allocation for this instance (in gb)
  
The configuration must also allow zero or more PSH endpoints ("hubs") to be defined.
+
==== volume.create.start/.end: ====
 +
* Usage notification upon creation of a new volume.
 +
* '''tenant_id''':  Tenant ID that owns the this volume (string)
 +
* '''user_id''':  User ID that owns this volume  (string)
 +
* '''volume_id''':  Nova volume ID of this volume (string)
 +
* '''volume_type''':  Name of the volume type of this volume. (string)
 +
* '''display_name''':  User selected display name for volume.
 +
* '''created_at''': Timestamp for when this volume's  record was created in Nova (string, formatted "YYYY-MM-DD  hh:mm:ss.ssssss")
 +
* '''launched_at''':  Timestamp for when this instance was last launched by hypervisor.  (string, formatted "YYYY-MM-DD hh:mm:ss.ssssss")
 +
* '''status''':  Current status of volume.  (string, such as 'available' or 'attached')
 +
* '''size''': size of disk allocation for this volume.
 +
* '''snapshot_id''': Nova id of the volume snapshot.
  
When an events occurs and notifications are enabled, then the worker would issue [http://pubsubhubbub.googlecode.com/svn/trunk/pubsubhubbub-core-0.3.html#anchor9 a standard PSH "ping"].
+
==== volume.delete.start/.end: ====
 +
* Usage notification upon deletion of a volume.
 +
* '''tenant_id''':  Tenant ID that owns the this volume (string)
 +
* '''user_id''':  User ID that owns this volume  (string)
 +
* '''volume_id''':  Nova volume ID of this volume (string)
 +
* '''volume_type''':   Name of the volume type of this volume. (string)
 +
* '''display_name''':  User selected display name for volume.
 +
* '''created_at''': Timestamp for when this volume's  record was created in Nova (string, formatted "YYYY-MM-DD  hh:mm:ss.ssssss")
 +
* '''launched_at''':  Timestamp for when this instance was last launched by hypervisor. (string, formatted "YYYY-MM-DD hh:mm:ss.ssssss")
 +
* '''status''':  Current status of volume.  (string, such as 'available' or 'attached')
 +
* '''size''': size of disk allocation for this volume.
 +
* '''snapshot_id''': Nova id of the volume snapshot.
  
Specifically, it would issue a POST request to the hubs defined in the configuration; the POST would include the content-type and parameters as defined in the specification.
+
==== volume.usage: ====
 +
There is no .start/.end event for this activity ... just the 'volume.usage' event.
  
Note that [[PubSubHubbub]] is optional; the API may always be retrieved via a simple Atom 1.0 query.
+
* Periodic usage notification generated by the volume-usage-audit cron job. These usages are generated for '''each''' volume that was active during the specified audit period.
 +
* '''tenant_id''':  Tenant ID that owns the this volume (string)
 +
* '''user_id''':  User ID that owns this volume  (string)
 +
* '''volume_id''':  Nova volume ID of this volume (string)
 +
* '''volume_type''':  Name of the volume type of this volume. (string)
 +
* '''display_name''':  User selected display name for volume.
 +
* '''created_at''': Timestamp for when this volume's  record was created in Nova (string, formatted "YYYY-MM-DD  hh:mm:ss.ssssss")
 +
* '''launched_at''':  Timestamp for when this instance was last launched by hypervisor.  (string, formatted "YYYY-MM-DD hh:mm:ss.ssssss")
 +
* '''audit_period_begining''':  Timestamp of beginning of audit period. (string, formatted "YYYY-MM-DD  hh:mm:ss.ssssss")
 +
* '''audit_period_ending''':  Timestamp of end of audit period. (string, formatted "YYYY-MM-DD  hh:mm:ss.ssssss")
 +
* '''status''':  Current status of volume.  (string, such as 'available' or 'attached')
 +
* '''size''': size of disk allocation for this volume.
 +
* '''snapshot_id''': Nova id of the volume snapshot.
 +
==== servergroup.create: ====
 +
There is no .start/.end event for this activity ... just the 'servergroup.create' event.
  
== Implementation ==
+
* Create notification for server group.
 +
* '''server_group_id''':  ID of the server group which was just created  (string)
 +
* '''name''':  Name of the server group which was just created  (string)
  
This section should describe a plan of action (the "how") to implement the changes discussed. Could include subsections like:
+
==== servergroup.delete: ====
 +
There is no .start/.end event for this activity ... just the 'servergroup.delete' event.
  
=== UI Changes ===
+
* Delete notification for the server group
 +
* '''server_group_id''':  ID of the server group which was deleted (string)
  
Should cover changes required to the UI, or specific UI that is required to implement this
+
==== servergroup.update: ====
 +
There is no .start/.end event for this activity ... just the 'servergroup.update' event.
  
=== Code Changes ===
+
* Update notification for the server group.
 +
* '''server_group_id''':  ID of the server group which was just updated (string)
 +
* '''members''':  New members of the server group which was just updated  (string)
  
Code changes should include an overview of what needs to change, and in some cases even the specific details.
+
==== servergroup.addmember: ====
 +
There is no .start/.end event for this activity ... just the 'servergroup.addmember' event.
  
=== Migration ===
+
* Add member notification for the server group.
 +
* '''server_group_id''':  ID of the server group which was just added some new members (string)
 +
* '''instance_uuids''':  Instance UUIDs that were just added to the server group  (string)
  
Include:
+
==== orchestration.stack.{create,update,delete,suspend,resume}.{start,error,end}: ====
* data migration, if any
 
* redirects from old URLs to new ones, if any
 
* how users will be pointed to the new way of doing things, if necessary.
 
  
== Test/Demo Plan ==
+
Usage notification upon stack action and state changes.
  
This need not be added or completed until the specification is nearing beta.
+
* '''tenant_id''':  Tenant ID that owns the this stack (string)
 +
* '''user_id''': User name of the user that owns this instance (string) (DEPRECATED: please use  '''user_identity''' or '''username''')
 +
* '''user_identity''': User ID that owns this instance (string)
 +
* '''username''': user name of the user that owns this instance (string)
 +
* '''stack_identity''': Heat stack ID (arn) (string)
 +
* '''stack_name''': User selected display name for the stack.
 +
* '''created_at''': Timestamp for when this stack's record was created in Heat (string, formatted "YYYY-MM-DD hh:mm:ss.ssssss")
 +
* '''state''': Current state of stack. (string, such as 'CREATE_COMPLETE' or 'DELETE_COMPLETE')
 +
* '''state_reason''': The reason for the about status. (string)
 +
* '''outputs''': list of outputs from the template (list of dicts)
 +
* '''parameters''': list of user provided parameters (list of dicts)
  
== Unresolved issues ==
+
==== orchestration.autoscaling.{start,error,end}: ====
  
This should highlight any issues that should be addressed in further specifications, and not problems with the specification itself; since any specification with problems cannot be approved.
+
Notifications when auto-scaling occurs, in addition to the information above :
  
== BoF agenda and discussion ==
+
* '''adjustment_type''' :  ChangeInCapacity|ExactCapacity|PercentChangeInCapacity (String)
 +
* '''groupname''' : The unique name of the GroupInstance (ie as1-WebServerGroup-nsdsvnlxzmdk)  (String)
 +
* '''capacity''' : Number of member in the group (Integer)
 +
* '''adjustment''' : Size of adjustment, scale-down if negative  (Integer)
  
Use this section to take notes during the BoF; if you keep it in the approved spec, use it for summarising what was discussed and note any options that were rejected.
+
=== additional events ===
 +
These are generated for operations monitoring/profiling purposes and shouldn't directly affect usage/billing. They all follow the same signature as the above calls. Some of these notifications may be called from the above operations (for example, shutdown from delete).
  
----
+
==== compute.instance.shutdown.start/.end ====
[[Category:Spec]]
+
==== compute.instance.power_off.start/.end ====
 +
==== compute.instance.power_on.start/.end ====
 +
==== compute.instance.snapshot.start/.end ====
 +
==== compute.instance.resize.start/.end ====
 +
==== compute.instance.finish_resize.start/.end ====
 +
==== compute.instance.suspend.start/.end ====

Latest revision as of 20:47, 28 November 2016

NOTE: This page and it's notifications may be out of date. The full list of legacy notifications can be found in the nova.rpc.LegacyValidatingNotifier code. Nova has moved to sending versioned notifications which are described in the developer documentation here: http://docs.openstack.org/developer/nova/notifications.html#versioned-notifications

Summary

Nova administrators want data on system usage for billing, chargeback, or monitoring purposes.

Release Note

System usage data is emitted from Nova in the form of usage events from Nova's NotificationSystem. The notification system can be configured to emit events either through nova's logging facility, or send them to a series of AMQP queues (one per notification priority). System usages are emitted as notification events with the INFO priority. Different types of usage events are distinguished via the notifications' event_type, which is a hierarchical dotted string such as compute.instance.create, which allows usages to be easily grouped for aggregation. Usage notifications can be immediate, created when a specific increment of usage occurs (such as creation of an instance) or periodic, generated by a periodic task, like a cron job, and covering usage for a certain period of time. Besides the standard Nova Notification priority, notification timestamp, and event_type, usage notifications contain a payload of data that will vary depending on the event_type. This is presented as a json-formatted hash of key-value pairs. Some of the keys, such as tenant_id will always be present in any usage notification, others will be data relevent to that event_type (For example, instance related notifications will contain data describing the instance.)

For more indepth examples see NotificationEventExamples.

An external application (https://github.com/rackerlabs/yagi) is available that can read notifications from AMQP queues and provide an Atom API. This application generates Atom feeds of the notifications, and can publish feeds via PubSubHubbub (PSH) for efficient distribution of data to subscribers.

Rationale

As a systems integrator, we need the ability for 3rd party systems to query usage information from Nova to determine how to charge customers for use of the platform.

Enterprise customers also need the ability to determine usage data, though for different reasons. For example, a cloud administrator may want to determine VMs that have not been used in several month so that they can be reclaimed and the resources reallocated. Some IT departments may implement a quota system for their users.

Note that Nova itself should not be concerned with billing, but it needs to present a feed of usage data that an external application could use to aggregate the billing data for a requested time period.

User stories

  1. As a systems integrator, I need to retrieve usage data so that I can properly bill my customers.
  2. As a systems integrator or enterprise cloud administrator, I want to monitor usage data over time so that I can optimize the utilization of my resources.
  3. As an business or agency that supports multiple projects, I need to account for the resources consumed by each project so that I can properly meet accounting and budget standards.
  4. As a systems integrator, I need to provide usage data to multiple third-party systems without building custom interfaces to each one so that I can efficiently utilize my manpower.

Assumptions

Usage data can be aggregated by Tenant ID (as defined in the openstack-accounting blueprint).(i.e. Tenant ID is always present)

There is a billing system that is not a part of OpenStack. Invoicing, billing, and customer management are handled externally to OpenStack/Nova. Nova only has knowledge of an "tenant ID" (as per the openstack-accounting blueprint).

The Tenant ID is the same as the tenant id concept in Keystone, and is known internally to Nova as the "Project ID".

If Nova is installed in multiple regions (aka "zones"), usage data will not span zones; even if the same tenant ID is used in multiple zones, that data must be aggregated external to Nova.

Design and Implementation

There are two events generated for every activity. Previously, events were only generated on activity completion, but now there is an event when the activity starts and, as before, when the activity ends. These are marked as 'compute.instance.<activity>.start' and 'compute.instance.<activity>.end'. The '.end' event is the same as the event previously expected.

Event Types and Payload data:

A sample of most Nova events (with scrubbed values) is available here: http://paste.openstack.org/show/54140/

compute.instance.create.{start,error,end}:

  • Usage notification upon creation of a new instance.
  • tenant_id: Tenant ID that owns the this instance (string)
  • user_id: User ID that owns this instance (string)
  • instance_id: Nova instance ID of this instance (string)
  • instance_type: Name of the instance type ('flavor') of this instance. (string)
  • instance_type_id: Nova ID for instance type ('flavor') of this instance. (string)
  • display_name: User selected display name for instance.
  • created_at: Timestamp for when this instance's record was created in Nova (string, formatted "YYYY-MM-DD hh:mm:ss.ssssss")
  • launched_at: Timestamp for when this instance was last launched by hypervisor. (string, formatted "YYYY-MM-DD hh:mm:ss.ssssss")
  • image_ref_url: Image URL (from Glance) that this instance was created from. (string)
  • state: Current state of instance. (string, such as 'active' or 'deleted')
  • state_description: Additional human readable description of current state of instance.
  • fixed_ips: list of ip addresses formatted like [{"floating_ips": [], "meta": {}, "type": "fixed", "version": 4, "address": "10.0.0.9", "label": "public"}] assigned to instance.
  • memory_mb: memory allocation for this instance (in mb)
  • disk_gb: disk allocation for this instance (in gb)
  • message: High-level message describing the notification. If the event type is "create.error", it will contain error details.

compute.instance.delete.start/.end:

  • Usage notification upon deletion of an instance.
  • tenant_id: Tenant ID that owns the this instance (string)
  • user_id: User ID that owns this instance (string)
  • instance_id: Nova instance ID of this instance (string)
  • instance_type: Name of the instance type ('flavor') of this instance. (string)
  • instance_type_id: Nova ID for instance type ('flavor') of this instance. (string)
  • display_name: User selected display name for instance.
  • created_at: Timestamp for when this instance's record was created in Nova (string, formatted "YYYY-MM-DD hh:mm:ss.ssssss")
  • launched_at: Timestamp for when this instance was last launched by hypervisor. (string, formatted "YYYY-MM-DD hh:mm:ss.ssssss")
  • image_ref_url: Image URL (from Glance) that this instance was created from. (string)
  • state: Current state of instance. (string, such as 'active' or 'deleted')
  • state_description: Additional human readable description of current state of instance.
  • fixed_ips: list of ip addresses formatted like [{"floating_ips": [], "meta": {}, "type": "fixed", "version": 4, "address": "10.0.0.9", "label": "public"}] assigned to instance.
  • memory_mb: memory allocation for this instance (in mb)
  • disk_gb: disk allocation for this instance (in gb)

compute.instance.rebuild.start/.end:

  • Usage notification upon rebuild of instance.
  • tenant_id: Tenant ID that owns the this instance (string)
  • user_id: User ID that owns this instance (string)
  • instance_id: Nova instance ID of this instance (string)
  • instance_type: Name of the instance type ('flavor') of this instance. (string)
  • instance_type_id: Nova ID for instance type ('flavor') of this instance. (string)
  • display_name: User selected display name for instance.
  • created_at: Timestamp for when this instance's record was created in Nova (string, formatted "YYYY-MM-DD hh:mm:ss.ssssss")
  • launched_at: Timestamp for when this instance was last launched by hypervisor. (string, formatted "YYYY-MM-DD hh:mm:ss.ssssss")
  • image_ref_url: Image URL (from Glance) that this instance is being rebuilt from. (string)
  • state: Current state of instance. (string, such as 'active' or 'deleted')
  • state_description: Additional human readable description of current state of instance.
  • fixed_ips: list of ip addresses formatted like [{"floating_ips": [], "meta": {}, "type": "fixed", "version": 4, "address": "10.0.0.9", "label": "public"}] assigned to instance.
  • memory_mb: memory allocation for this instance (in mb)
  • disk_gb: disk allocation for this instance (in gb)

compute.instance.resize.prep.start/.end:

  • Usage notification when a resize/migrate of an instance is begun.
  • tenant_id: Tenant ID that owns the this instance (string)
  • user_id: User ID that owns this instance (string)
  • instance_id: Nova instance ID of this instance (string)
  • instance_type: Name of the current (before resize) instance type ('flavor') of this instance. (string)
  • instance_type_id: Nova ID for current (before resize) instance type ('flavor') of this instance. (string)
  • new_instance_type: Name of the new (after resize) instance type ('flavor') of this instance. (string)
  • new_instance_type_id: Nova ID for new (after resize) instance type ('flavor') of this instance. (string)
  • display_name: User selected display name for instance.
  • created_at: Timestamp for when this instance's record was created in Nova (string, formatted "YYYY-MM-DD hh:mm:ss.ssssss")
  • launched_at: Timestamp for when this instance was last launched by hypervisor. (string, formatted "YYYY-MM-DD hh:mm:ss.ssssss")
  • image_ref_url: Image URL (from Glance) that this instance was created from. (string)
  • state: Current state of instance. (string, such as 'active' or 'deleted')
  • state_description: Additional human readable description of current state of instance.
  • fixed_ips: list of ip addresses formatted like [{"floating_ips": [], "meta": {}, "type": "fixed", "version": 4, "address": "10.0.0.9", "label": "public"}] assigned to instance.
  • memory_mb: memory allocation for this instance (in mb)
  • disk_gb: disk allocation for this instance (in gb)

compute.instance.resize.confirm.start/.end:

  • Usage notification when a resize/migration of an instance has been confirmed by the user.
  • tenant_id: Tenant ID that owns the this instance (string)
  • user_id: User ID that owns this instance (string)
  • instance_id: Nova instance ID of this instance (string)
  • instance_type: Name of the current instance type ('flavor') of this instance. (i.e. the one it has been resized to.) (string)
  • instance_type_id: Nova ID for the current instance type ('flavor') of this instance. (i.e. the one it has been resized to.) (string)
  • display_name: User selected display name for instance.
  • created_at: Timestamp for when this instance's record was created in Nova (string, formatted "YYYY-MM-DD hh:mm:ss.ssssss")
  • launched_at: Timestamp for when this instance was last launched by hypervisor. (string, formatted "YYYY-MM-DD hh:mm:ss.ssssss")
  • image_ref_url: Image URL (from Glance) that this instance was created from. (string)
  • state: Current state of instance. (string, such as 'active' or 'deleted')
  • state_description: Additional human readable description of current state of instance.
  • fixed_ips: list of ip addresses formatted like [{"floating_ips": [], "meta": {}, "type": "fixed", "version": 4, "address": "10.0.0.9", "label": "public"}] assigned to instance.
  • memory_mb: memory allocation for this instance (in mb)
  • disk_gb: disk allocation for this instance (in gb)

compute.instance.resize.revert.start/.end:

  • Usage notification when a resize/migration of an instance has been reverted by the user.
  • tenant_id: Tenant ID that owns the this instance (string)
  • user_id: User ID that owns this instance (string)
  • instance_id: Nova instance ID of this instance (string)
  • instance_type: Name of the current instance type ('flavor') of this instance. (i.e. the one it has been reverted back to.) (string)
  • instance_type_id: Nova ID for the current instance type ('flavor') of this instance. (i.e. the one it has been reverted back to.) (string)
  • display_name: User selected display name for instance.
  • created_at: Timestamp for when this instance's record was created in Nova (string, formatted "YYYY-MM-DD hh:mm:ss.ssssss")
  • launched_at: Timestamp for when this instance was last launched by hypervisor. (string, formatted "YYYY-MM-DD hh:mm:ss.ssssss")
  • image_ref_url: Image URL (from Glance) that this instance was created from. (string)
  • state: Current state of instance. (string, such as 'active' or 'deleted')
  • state_description: Additional human readable description of current state of instance.
  • fixed_ips: list of ip addresses formatted like [{"floating_ips": [], "meta": {}, "type": "fixed", "version": 4, "address": "10.0.0.9", "label": "public"}] assigned to instance.
  • memory_mb: memory allocation for this instance (in mb)
  • disk_gb: disk allocation for this instance (in gb)

compute.instance.exists:

There is no .start/.end event for this activity ... just the 'compute.instance.exists' event.

  • Periodic usage notification generated by the instance-usage-audit cron job. These usages are generated for each instance that was active during the specified audit period.
  • tenant_id: Tenant ID that owns the this instance (string)
  • user_id: User ID that owns this instance (string)
  • instance_id: Nova instance ID of this instance (string)
  • instance_type: Name of the instance type ('flavor') of this instance. (string)
  • instance_type_id: Nova ID for instance type ('flavor') of this instance. (string)
  • display_name: User selected display name for instance.
  • created_at: Timestamp for when this instance's record was created in Nova (string, formatted "YYYY-MM-DD hh:mm:ss.ssssss")
  • launched_at: Timestamp for when this instance was last launched by hypervisor. (string, formatted "YYYY-MM-DD hh:mm:ss.ssssss")
  • image_ref_url: Image URL (from Glance) that this instance was created from. (string)
  • image_meta: Dictionary of key-value pairs representing metadata from the image the instance was built from.
  • audit_period_begining: Timestamp of beginning of audit period. (string, formatted "YYYY-MM-DD hh:mm:ss.ssssss")
  • audit_period_ending: Timestamp of end of audit period. (string, formatted "YYYY-MM-DD hh:mm:ss.ssssss")
  • bandwidth: Hash listing bandwidth used for each network this instance is connected to. Keys will be network labels, values will be hashes containing the keys 'bw_in', and 'bw_out', listing the incoming, and outgoing bandwith, respectively, used by that instance, on that network, for that audit period. Bandwith is reported in bytes.
  • state: Current state of instance. (string, such as 'active' or 'deleted')
  • state_description: Additional human readable description of current state of instance.
  • fixed_ips: list of ip addresses formatted like [{"floating_ips": [], "meta": {}, "type": "fixed", "version": 4, "address": "10.0.0.9", "label": "public"}] assigned to instance.
  • memory_mb: memory allocation for this instance (in mb)
  • disk_gb: disk allocation for this instance (in gb)

compute.instance.update:

This event is generated whenever the VM or task state of the server changes; for example, when the server moves from BUILDING to either ACTIVE or ERROR.

This notification is disabled by default.

To enable notifications when the VM state changes, set configuration flag "notify_on_state_change" to "vm_state".

To enable notifications when either VM state or task state changes, set configuration flag "notify_on_state_change" to "vm_and_task_state".

  • tenant_id: Tenant ID that owns the this instance (string)
  • user_id: User ID that owns this instance (string)
  • instance_id: Nova instance ID of this instance (string)
  • instance_type: Name of the instance type ('flavor') of this instance. (string)
  • instance_type_id: Nova ID for instance type ('flavor') of this instance. (string)
  • display_name: User selected display name for instance.
  • created_at: Timestamp for when this instance's record was created in Nova (string, formatted "YYYY-MM-DD hh:mm:ss.ssssss")
  • launched_at: Timestamp for when this instance was last launched by hypervisor. (string, formatted "YYYY-MM-DD hh:mm:ss.ssssss")
  • image_ref_url: Image URL (from Glance) that this instance was created from. (string)
  • image_metadata: array of key-value pairs representing the metadata from the image from which the instance was built (array)
  • audit_period_begining: Timestamp of beginning of audit period. (string, formatted "YYYY-MM-DD hh:mm:ss.ssssss")
  • audit_period_ending: Timestamp of end of audit period. (string, formatted "YYYY-MM-DD hh:mm:ss.ssssss")
  • bandwidth: Hash listing bandwidth used for each network this instance is connected to. Keys will be network labels, values will be hashes containing the keys 'bw_in', and 'bw_out', listing the incoming, and outgoing bandwith, respectively, used by that instance, on that network, for that audit period. Bandwith is reported in bytes.
  • old_state: Prior state of instance. (string, such as 'active' or 'deleted')
  • state: Current state of instance. (string, such as 'active' or 'deleted')
  • state_description: Additional human readable description of current state of instance.
  • fixed_ips: list of ip addresses formatted like [{"floating_ips": [], "meta": {}, "type": "fixed", "version": 4, "address": "10.0.0.9", "label": "public"}] assigned to instance.
  • memory_mb: memory allocation for this instance (in mb)
  • disk_gb: disk allocation for this instance (in gb)

volume.create.start/.end:

  • Usage notification upon creation of a new volume.
  • tenant_id: Tenant ID that owns the this volume (string)
  • user_id: User ID that owns this volume (string)
  • volume_id: Nova volume ID of this volume (string)
  • volume_type: Name of the volume type of this volume. (string)
  • display_name: User selected display name for volume.
  • created_at: Timestamp for when this volume's record was created in Nova (string, formatted "YYYY-MM-DD hh:mm:ss.ssssss")
  • launched_at: Timestamp for when this instance was last launched by hypervisor. (string, formatted "YYYY-MM-DD hh:mm:ss.ssssss")
  • status: Current status of volume. (string, such as 'available' or 'attached')
  • size: size of disk allocation for this volume.
  • snapshot_id: Nova id of the volume snapshot.

volume.delete.start/.end:

  • Usage notification upon deletion of a volume.
  • tenant_id: Tenant ID that owns the this volume (string)
  • user_id: User ID that owns this volume (string)
  • volume_id: Nova volume ID of this volume (string)
  • volume_type: Name of the volume type of this volume. (string)
  • display_name: User selected display name for volume.
  • created_at: Timestamp for when this volume's record was created in Nova (string, formatted "YYYY-MM-DD hh:mm:ss.ssssss")
  • launched_at: Timestamp for when this instance was last launched by hypervisor. (string, formatted "YYYY-MM-DD hh:mm:ss.ssssss")
  • status: Current status of volume. (string, such as 'available' or 'attached')
  • size: size of disk allocation for this volume.
  • snapshot_id: Nova id of the volume snapshot.

volume.usage:

There is no .start/.end event for this activity ... just the 'volume.usage' event.

  • Periodic usage notification generated by the volume-usage-audit cron job. These usages are generated for each volume that was active during the specified audit period.
  • tenant_id: Tenant ID that owns the this volume (string)
  • user_id: User ID that owns this volume (string)
  • volume_id: Nova volume ID of this volume (string)
  • volume_type: Name of the volume type of this volume. (string)
  • display_name: User selected display name for volume.
  • created_at: Timestamp for when this volume's record was created in Nova (string, formatted "YYYY-MM-DD hh:mm:ss.ssssss")
  • launched_at: Timestamp for when this instance was last launched by hypervisor. (string, formatted "YYYY-MM-DD hh:mm:ss.ssssss")
  • audit_period_begining: Timestamp of beginning of audit period. (string, formatted "YYYY-MM-DD hh:mm:ss.ssssss")
  • audit_period_ending: Timestamp of end of audit period. (string, formatted "YYYY-MM-DD hh:mm:ss.ssssss")
  • status: Current status of volume. (string, such as 'available' or 'attached')
  • size: size of disk allocation for this volume.
  • snapshot_id: Nova id of the volume snapshot.

servergroup.create:

There is no .start/.end event for this activity ... just the 'servergroup.create' event.

  • Create notification for server group.
  • server_group_id: ID of the server group which was just created (string)
  • name: Name of the server group which was just created (string)

servergroup.delete:

There is no .start/.end event for this activity ... just the 'servergroup.delete' event.

  • Delete notification for the server group
  • server_group_id: ID of the server group which was deleted (string)

servergroup.update:

There is no .start/.end event for this activity ... just the 'servergroup.update' event.

  • Update notification for the server group.
  • server_group_id: ID of the server group which was just updated (string)
  • members: New members of the server group which was just updated (string)

servergroup.addmember:

There is no .start/.end event for this activity ... just the 'servergroup.addmember' event.

  • Add member notification for the server group.
  • server_group_id: ID of the server group which was just added some new members (string)
  • instance_uuids: Instance UUIDs that were just added to the server group (string)

orchestration.stack.{create,update,delete,suspend,resume}.{start,error,end}:

Usage notification upon stack action and state changes.

  • tenant_id: Tenant ID that owns the this stack (string)
  • user_id: User name of the user that owns this instance (string) (DEPRECATED: please use user_identity or username)
  • user_identity: User ID that owns this instance (string)
  • username: user name of the user that owns this instance (string)
  • stack_identity: Heat stack ID (arn) (string)
  • stack_name: User selected display name for the stack.
  • created_at: Timestamp for when this stack's record was created in Heat (string, formatted "YYYY-MM-DD hh:mm:ss.ssssss")
  • state: Current state of stack. (string, such as 'CREATE_COMPLETE' or 'DELETE_COMPLETE')
  • state_reason: The reason for the about status. (string)
  • outputs: list of outputs from the template (list of dicts)
  • parameters: list of user provided parameters (list of dicts)

orchestration.autoscaling.{start,error,end}:

Notifications when auto-scaling occurs, in addition to the information above :

  • adjustment_type : ChangeInCapacity|ExactCapacity|PercentChangeInCapacity (String)
  • groupname : The unique name of the GroupInstance (ie as1-WebServerGroup-nsdsvnlxzmdk) (String)
  • capacity : Number of member in the group (Integer)
  • adjustment : Size of adjustment, scale-down if negative (Integer)

additional events

These are generated for operations monitoring/profiling purposes and shouldn't directly affect usage/billing. They all follow the same signature as the above calls. Some of these notifications may be called from the above operations (for example, shutdown from delete).

compute.instance.shutdown.start/.end

compute.instance.power_off.start/.end

compute.instance.power_on.start/.end

compute.instance.snapshot.start/.end

compute.instance.resize.start/.end

compute.instance.finish_resize.start/.end

compute.instance.suspend.start/.end