Quota Plugin
Before installing and configuring the quota service you need to make sure that the Usage Server has been installed. This requires extra steps beyond just installing the CloudStack software. See Installing the Usage Server (Optional) in the Advanced Installation Guide.
- enable.usage.server: Set to true to enable usage server.
The quota plugin is disabled by default. To enable it goto Global Settings and set the following global configuration to true:
- quota.enable.service
By default Quota service does not lock the accounts that have exceeded the quota usage. To enable quota service to lock accounts set the following global configuration to true:
- quota.enable.enforcement
The other configurations that are there for quota service are as:
- quota.currency.symbol : The symbol that is used before any currency figure in various quota forms and reports.
- quota.usage.smtp.port: Quota SMTP port.
- quota.usage.smtp.user: Quota SMTP user.
- quota.usage.smtp.password: Quota SMTP password.
- quota.usage.smtp.sender: Quota SMTP alert sender email address.
- quota.usage.smtp.useAuth: If true, use secure SMTP authentication when sending emails.
There are several configuration variables that are inherited from usage server, these are listed below:
- usage.aggregation.timezone
Restart the Management Server and the Usage Server to enable the set configuration values.
Once the quota service is running it will calculate the quota balance for each account. The quota usage is calculated as per the quota tariff provided by the site administrator.
Quota Tariff
The following table shows all quota types for which you can specify tariff.
The quota tariff can be listed using listQuotaTariff API.
quotaTariff: Lists all quota tariff plans
The quota credit (quotaCredit) API lets you add or remove quota currency credits to an account. With this API you can also control the quota enforcement policy at account level. This will enable you to have some accounts where the quota policy is not enforced. The overall quota enforcement is controlled by the quota.enable.enforcement global setting.
In addition to above the quota API lets you can fine tune the alert generation by specifying the quota threshold for each account. If not explictly stated, the threshold is taken as 80% of the last deposit.
Quota Balance
Quota balance API states the start balance and end balance(optional) from a start date to end date (optional).
Quota statement for a period consist of the quota usage under various quota types for the given period from a start date to an end date.
Quota Monthly Statement
Quota service emails the monthly quota statement for the last month at the beginning of each month. For this service to work properly you need to ensure that the usage server is running.
All the above functionality is also available via quota UI plugin.