Chapter 15.
141
Working with Usage
The Usage Server is an optional, separately-installed part of CloudPlatform that provides aggregated
usage records which you can use to create billing integration for CloudPlatform. The Usage Server
works by taking data from the events log and creating summary usage records that you can access
using the listUsageRecords API call.
The usage records show the amount of resources, such as VM run time or template storage space,
consumed by guest instances.
The Usage Server runs at least once per day. It can be configured to run multiple times per day.

15.1. Configuring the Usage Server

To configure the usage server:
1. Be sure the Usage Server has been installed. This requires extra steps beyond just installing the
CloudPlatform software. See Installing the Usage Server (Optional) in the Advanced Installation
Guide.
2. Log in to the CloudPlatform UI as administrator.
3. Click Global Settings.
4. In Search, type usage. Find the configuration parameter that controls the behavior you want to set.
See the table below for a description of the available parameters.
5. In Actions, click the Edit icon.
6. Type the desired value and click the Save icon.
7. Restart the Management Server (as usual with any global configuration change) and also the
Usage Server:
# service cloud-management restart
# service cloud-usage restart
The following table shows the global configuration settings that control the behavior of the Usage
Server.
Parameter Name Description
enable.usage.server Whether the Usage Server is active.
usage.aggregation.timezone Time zone of usage records. Set this if the usage
records and daily job execution are in different
time zones. For example, with the following
settings, the usage job will run at PST 00:15 and
generate usage records for the 24 hours from
00:00:00 GMT to 23:59:59 GMT:
usage.stats.job.exec.time = 00:15
usage.execution.timezone = PST
usage.aggregation.timezone = GMT
Default: GMT
usage.execution.timezone The time zone of usage.stats.job.exec.time.