首页 > 代码库 > PaaS Event Format

PaaS Event Format

[
{

"Field": "event_type",
  "Type": "enumeration",
  "Description": "for event type records, this describes the actual event that occurred",
  "Compliance": "required for events",
  "Notes": "depends on service, defaults to create, exists, delete"

},
{

"Field": "timestamp",
  "Type": "UTC DateTime",
  "Description": "timestamp of when this event was generated at the resource",
  "Compliance": "required",
  "Notes": "ISO 8859 date YYYY-mm-ddThh:mm:ss"

},
{

"Field": "message_id",
  "Type": "String",
  "Description": "unique identifier for event",
  "Compliance": "required",
  "Notes": ""

},
{

"payload": [
  {
      "Field": "version",
      "Type": "String",
      "Description": "Version of event format",
      "Compliance": "required",
      "Notes": ""
  },
  {
      "Field": "audit_period_beginning",
      "Type": "UTC DateTime",
      "Description": "Represents start time for metrics reported",
      "Compliance": "required",
      "Notes": "Format ISO 8859 date YYYY-mm-ddThh:mm:ss"
  },
  {
      "Field": "audit_period_ending",
      "Type": "UTC DateTime",
      "Description": "Represents end time for metrics reported",
      "Compliance": "required",
      "Notes": "Format ISO 8859 date YYYY-mm-ddThh:mm:ss"
  },
  {
      "Field": "record_type",
      "Type": "enumeration ",
      "Values": {
          "event": "events describe some kind of state change in the service",
          "quantity": "quantity describes a usage metric value"
      },
      "Compliance": "required",
      "Notes": ""
  },
  {
      "Field": "project_id",
      "Type": "UUID",
      "Description": "Keystone project_id identifies the owner of
                      the service instance",
      "Compliance": "required",
      "Notes": ""
  },
  {
      "Field": "user_id",
      "Type": "UUID",
      "Description": "Keystone user_id identifies specific user",
      "Compliance": "optional",
      "Notes": ""
  },
  {
      "Field": "service_id",
      "Type": "UUID",
      "Description": "Keystone service_id uniquely identifies a service",
      "Compliance": "required",
      "Notes": ""
  },
  {
      "Field": "service_type",
      "Type": "String",
      "Description": "Keystone service_type uniquely identifies a service",
      "Compliance": "required",
      "Notes": ""
  },
  {
      "Field": "instance_id",
      "Type": "UUID",
      "Description": "uniquely identifies an instance of the service",
      "Compliance": "required",
      "Notes": "assuming instance level reporting"
  },
  {
      "Field": "display_name",
      "Type": "String",
      "Description": "text description of service",
      "Compliance": "optional",
      "Notes": "used if customer names instances"
  },
  {
      "Field": "instance_type_id",
      "Type": "enumeration",
      "Description": "used to describe variations of a service",
      "Compliance": "required",
      "Notes": "needed if variations of service have different prices or
                need to be broken out separately"
  },
  {
      "Field": "instance_type",
      "Type": "String",
      "Description": "text description of service variations",
      "Compliance": "optional",
      "Notes": ""
  },
  {
      "Field": "availability_zone",
      "Type": "String",
      "Description": "where the service is deployed",
      "Compliance": "optional",
      "Notes": "required if service is deployed at an AZ level"
  },
  {
      "Field": "region",
      "Type": "String",
      "Description": "data center that the service is deployed in",
      "Compliance": "optional",
      "Notes": "required if service is billed at a regional level"
  },
  {
      "Field": "state",
      "Type": "enumeration",
      "Description": "status of the service at the time of record generation",
      "Compliance": "optional",
      "Notes": "required for existence events"
  },
  {
      "Field": "state_description",
      "Type": "String",
      "Description": "text description of state of service",
      "Compliance": "",
      "Notes": ""
  },
  {
      "Field": "license_code",
      "Type": "enumeration",
      "Description": "value that describes a specific license model",
      "Compliance": "optional",
      "Notes": "this field is TBD depending on dev_pay design work"
  },
      {
          "metrics": [
              {
                  "Field": "metric_name",
                  "Type": "String",
                  "Description": "unique name for the metric that is represented
                   in this record",
                  "Compliance": "required",
                  "Notes": ""
              },
              {
                  "Field": "metric_type",
                  "Type": "enumeration",
                  "Description": "gauge, cumulative, delta",
                  "Compliance": "required",
                  "Notes": "describes the behavior of the metric, from Ceilometer"
              },
              {
                  "Field": "metric_value",
                  "Type": "Float",
                  "Description": "value of metric for quantity type records",
                  "Compliance": "required for quantities",
                  "Notes": ""
              },
              {
                  "Field": "metric_units",
                  "Type": "enumeration",
                  "Description": "describes the units for the quantity",
                  "Compliance": "optional",
                  "Notes": ""
              }
          ]
      }
  ]

}
]

PaaS Event Format