Resource Event Format v0.6

The following JSON object is representative of the message to be sent:

 2  id: "<SHA-1>",
 3  clientID: "platform-wide-unique-ID",
 4  userID: "",
 5  occurredMillis: 1321020852,
 6  receivedMillis: 1321020852,
 7  resource: "vmtime",
 8  instanceID: "vmtime-01.02.123X.Z",
 9  eventVersion: "1.0", 
10  value: 0.3,
11  details: {
12    keyA: "value1",
13    keyB: "value2",
14  }

The JSON string must be encoded in UTF-8.

The meaning of the fields above is as follows:

  • id A client-wide unique string. This is needed in order to trace messages across the systems. Preferably a SHA-1.
  • clientID An Okeanos-wide unique string, naming the client that makes the request.
  • userID The ID of the user for which this event is relevant.
  • occurredMillis The timestamp at the event creation time. This is Unix epoch time.
  • receivedMillis As far as clients are concerned, set this equal to occurredMillis.
  • resource The type of the resource. Known resource types are:
    • vmtime for virtual machine time usage
    • diskspace for Pithos space usage
    • bandwidthup for bandwidth used when uploading
    • bandwidthdown for bandwidth used when downloading
  • instanceID the specific resource instance identifier (e.g. the exact VM when the resource is vmtime). The combination of (resource, instanceID) should uniquely identify a resource within okeanos.
  • eventVersion Set this to "1.0" for now.
  • value: Indicates resource usage. This is resource-dependent. The value is always a Double floating point type.
  • details: A map/dictionary indicating extra metadata for this resource event. A few requirements:
    • The dictionary must always be present, even if it is empty.
    • The keys must be made of the following class of characters: [_a-zA-Z ].
    • The values must always be strings even if semantically they are something else (e.g. numbers).
    • For dates, use Unix time in milliseconds.
    • All dictionary keys starting with __aquarium are reserved for Aquarium internal use and must not be present in events sent by other systems.