These docs are for v0.8.3. Click to read the latest docs for v0.9.3.

Accounting

With v0.7.0 FiFo introduces the last A in it's AAA solution Snarl, accounting. We follow the same basic principles that Telco providers use with CDRs in telephone exchanges. For certain events immutable metadata records are written, the sum of these records will explain the lifetime of an entity.

The following things are part of an accounting record:

  • The organisation the entity belongs to
  • The type of the record, create, update, destroy
  • The identifier for the accounted element usually the UUID
  • The timestamp of the record
  • Metadata associated with the event, for example, which package and dataset were used for the VM creation

A record retrieved from the accounting api and translated to JSON looks like the following:

{
    "action": "create",
    "metadata": {
        "package": "f33d78b0-423b-11e5-9408-4b0bc2b37a43",
        "dataset": "008497c4-423c-11e5-a926-077d74874de7"
    },
    "resource": "f3121497-23ee-467c-bb3f-8b37cc41a9f6",
    "timestamp": 1442322467
}

Please look at the accounting api to see how to query the data. Usually a time slice query is performed where the all records belonging to an element are returned for the time slice in question, even if some of the events are outside of the slice itself. This allows the reconstruction of the exact usage during the time period in question.