https://blueprints.launchpad.net/fuel/+spec/openstack-workload-statistics
We want to know how customers are using OpenStack, figure out behaviour templates of customers.
We should collect OpenStack Workload (OSWL) statistics from the installed environments, gather it and analyse. We should get not only the state of the cloud/environments but also the way they change. For example we should register adding, removing, modification of Virtual Machines, Images, Volumes, etc.
We shouldn’t collect any private customer info, like image names, volume names, IP addresses, user names, passwords, authentication and authorization keys.
We should be able to extract and analyse collected info.
OSWLs is split by the resource type:
For collecting OSWLs, we should introduce fetchers for getting statistics from the installed environment. Each fetcher gathers statistics for the specified resource type. The statistics is saved into Nailgun DB. Collected statistics is transmitted to the statistics collector only if sending of statistics is enabled. OSWLs older than 2 weeks will be removed from the Nailgun DB.
Fuel-stats servers perform receiving, saving and export to CSV of OSWLs.
Table ‘oswl_stats’ in the ‘collector’ database is used as OSWLs storage. Fields of ‘oswl_stats’ are:
id - identifier
cluster_id - id of cluster object in the Naligun DD
created_date - date of creation row in table
resource_type - type of resource (vm, flavor, e.t.c)
resource_data - JSON field for saving resource content:
- current - list of current resources data
- added - dict of added resources ids
- modified - dict of modified resources ids
- removed - dict of removed resources data
resource_checksum - checksum of resource_data[‘current’]
is_sent - is info sent to collector or not
for each environment (cluster_id) and resource type we have single row per day
on each fetch info from OpenStack we check if the resource is added, removed or modified:
- in case of adding, resource details are stored into JSON field resource_data[‘current’] and resource uid is added to resource_data[‘added’] with time of adding
- in case of deletion, resource should be moved from resource_data[‘current’] to resource_data[‘removed’] with time of removal
- in case of modification, new resource will be saved into the resource_data[‘current’], only diff of modified and old data, resource uid and modification time will be added into resource_data[‘modified’]
- resource_checksum - checksum of the serialized resource_data[‘current’]
- resource_checksum is changed on resource_data[‘current’] modification
- if resource_checksum for cluster_id, resource_type is not changed at the next day - new row is not added into DB table.
Resource | Data | Sync interval |
---|---|---|
Flavor |
|
15 min |
Virtual Machine |
|
15 min |
Image |
|
15 min |
Volume |
|
15 min |
Tenant | {“id”: “ge3”, “enabled_flag”: True} | 15 min |
Keystone User |
|
15 min |
None
DB tables for storing OSWLs should be added into Nailgun and fuel-stats. New tables shouldn’t affect already existing tables.
POST method for collecting OSWLs should be added into fuel-stats collector at /api/v1/oswl_stats address.
Input is validated by JSON schema. Normal http response codes: 200. Expected error http response code: 400 - on schema validation error.
CSV export urls mapping:
All CSV export urls handle filtering parameters from_date, to_date in format ‘YYYY-MM-DD’.
None
None
None
Nailgun:
Fuel-stats:
None
None
Primary assignee:
Other contributors:
None
Check items:
Performance testing:
None