May 2018
Intermediate to advanced
256 pages
7h 6m
English
In the preceding sections, we walked through different methods for retrieving event data from an OpenStack cloud. This event data can then be used to track usage and generate billing information for end users of the system. The Ceilometer service was designed to do exactly that: track usage based on event data and generate billing information. Ceilometer makes this data available through a REST API.
The following example uses the Python requests library to request the duration of instances running within the user's tenant:
#!/usr/bin/env python import requests #http://docs.python-requests.org/en/latest import json KEYSTONE_URL = 'http://controller01:5000/v2.0/' ...
Read now
Unlock full access