Skip to content
cp16net edited this page Apr 20, 2012 · 2 revisions

list of existing billing events in Nova

  • compute.instance.create.start/.end
  • compute.instance.delete.start/.end
  • compute.instance.rebuild.start/.end
  • compute.instance.resize.prep.start/.end
  • compute.instance.resize.confirm.start/.end
  • compute.instance.resize.revert.start/.end
  • compute.instance.exists

additional events (not for billing) in Nova

  • 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

events that we can bill on

  • compute.i* nstance.create.start/.end
  • compute.instance.delete.start/.end
  • compute.instance.resize.prep.start/.end
  • -- there is no confirm API call for a user to make so this either passes or fails.

--new billing events--

We will need to be able to bill for the volume that the user creates.

  • volume.create.start/.end
  • volume.resize.start/.end
  • -- there is no confirm API call for a user to make so this either passes or fails.
    
  • volume.delete.start/.end

details below on the data for these

compute.instance.exists

This can be sent via a periodic event every hour/day of the information needed to be recorded and charged.


EVENT DETAILS - payload messages that pertain to DBaas

compute.instance.create.start/.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 (as strings) assigned to instance.
  • memory_mb: memory allocation for this instance (in mb)
  • disk_gb: disk allocation for this instance (in gb)

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 (as strings) 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 (as strings) 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 (as strings) 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)
  • 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 (as strings) assigned to instance.
  • memory_mb: memory allocation for this instance (in mb)
  • disk_gb: disk allocation for this instance (in gb)

NEW BILLING EVENTS

volume.create.start/.end

--general--

Usage notification when a volume is created by the user.

--dbaas specific details--

Volume create notification will be at the same time compute.instance.create occurs because this is a singlec create action in the API.

--payload--
  • tenant_id: Tenant ID that owns the this volume (string)
  • user_id: User ID that owns this volume (string)
  • instance_id: Nova instance ID where the volume is attached (string)
  • volume_id: Nova volume ID of the volume (string)
  • volume_type_id: Nova ID for the current volume type of this volume. (string)
  • display_name: Display name for the volume. (string)
  • 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 volume was last launched by hypervisor. (string, formatted "YYYY-MM-DD hh:mm:ss.ssssss")
  • status: Current status of volume. (string, such as 'attached')
  • size_gb: size of disk allocation for this volume (in gb)

volume.resize.start/.end

--general--

Usage notification when a volume is resized by the user.

--dbaas specific details--

The volume is only allowed to be resized up via the API. We do a "hot" resize on the volume.

--payload--
  • tenant_id: Tenant ID that owns the this volume (string)
  • user_id: User ID that owns this volume (string)
  • instance_id: Nova instance ID where the volume is attached (string)
  • volume_id: Nova volume ID of the volume (string)
  • volume_type_id: Nova ID for the current volume type of this volume. (string)
  • display_name: Display name for the volume. (string)
  • 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 volume was last launched by hypervisor. (string, formatted "YYYY-MM-DD hh:mm:ss.ssssss")
  • status: Current status of volume. (string, such as 'attached')
  • size_gb: size of disk allocation (before resize) for this volume (in gb)
  • new_size_gb: size of disk allocation (after resize) for this volume (in gb)

volume.delete.start/.end

--general--

Usage notification when a volume is deleted by the user.

--dbaas specific details--

The volume will be deleted at the same time the instance(container) is deleted.

--payload--
  • tenant_id: Tenant ID that owns the this volume (string)
  • user_id: User ID that owns this volume (string)
  • instance_id: Nova instance ID where the volume is attached (string)
  • volume_id: Nova volume ID of the volume (string)
  • volume_type_id: Nova ID for the current volume type of this volume. (string)
  • display_name: Display name for the volume. (string)
  • 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 volume was last launched by the volume manager. (string, formatted "YYYY-MM-DD hh:mm:ss.ssssss")
  • launched_at: Timestamp for when this volume was deleted by the volume manager. (string, formatted "YYYY-MM-DD hh:mm:ss.ssssss")
  • status: Current status of volume. (string, such as 'attached')
  • size_gb: size of disk allocation (before resize) for this volume (in gb)

volume.exists

--general--

Usage notification when a volume is deleted by the user.

--dbaas specific details--

The volume will be deleted at the same time the instance(container) is deleted.

--payload--
  • tenant_id: Tenant ID that owns the this volume (string)
  • user_id: User ID that owns this volume (string)
  • instance_id: Nova instance ID where the volume is attached (string)
  • volume_id: Nova volume ID of the volume (string)
  • volume_type_id: Nova ID for the current volume type of this volume. (string)
  • display_name: Display name for the volume. (string)
  • 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")
  • 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 volume was last launched by the volume manager. (string, formatted "YYYY-MM-DD hh:mm:ss.ssssss")
  • launched_at: Timestamp for when this volume was deleted by the volume manager. (string, formatted "YYYY-MM-DD hh:mm:ss.ssssss")
  • status: Current status of volume. (string, such as 'attached')
  • size_gb: size of disk allocation (before resize) for this volume (in gb)

Notifications referenced from http://wiki.openstack.org/SystemUsageData Notifications referenced from http://wiki.openstack.org/SystemUsageDataEvol