This section guides you on how to use Quota Manager for WHMCS. Please read the Getting Started document before continuing if you did not read it.
Quota Manager uses Disk & Bandwidth Usage Stats that, by default collected every day. If you need to set less than a day, you should create a cron job as follows to update the usage more frequently.
*/5 * * * * php -q /home/username/crons/cron.php do --UpdateServerUsage
If the above example, the cron update stat every 5 minutes. You can change the frequency based on your needs.
Create a New Rule #
Quota Manager use rules to perform the scenarios you need. Rules are flexible and can be assigned to different products or a single one. To create a new rule campaign:
- Click Create New Rule.
- Enter a Rule Name.
- Enter Check Interval; This option specifies how often this rule should be processed.
- Enter Priority; This option specifies the priority of processing these rules. If several rules have been assigned to a group of the same products, this option specifies the priority of rules processing for that group.
- Choose the rule Status. If you don’t want the rule to be active, select Inactive.
- Choose the Products that you want the rule applied to them.
- Check No overlap to prevent multiple rules triggered together for a product simultaneously. By checking this option, the Quota Manager checks for the applied rules to the product, and if they’re valid in their check interval, skip processing the rule. Checking this option is recommended if you define multi rules for a product group.
- Choose the Resource you define the criteria for it.
- Choose the Limit Type you define the criteria.
- Percentage, this option lets you define criteria in percent. The criteria value must be zero or more.
- Unit, this option allows you to specify a limitation (in Mb) more or less than the actual service limit. For example, if you enter +100 for disk resource, and the service’s actual limit is 1000 Mb, the rule will be triggered when the service exceeds the disk usage of more than 1100 Mb.
- Enter Limit Value for your criteria.
- Choose Notification Email Template to send an email to the client when the rule has detected a service that exceeds the limit. The templates are fetched from custom Product/Service Messages in the email templates section.
- Choose Action to do an action when the rule has detected a service that exceeds the limit.
- Add to Todo. Add an alert to the admin to-do list.
- Suspend. Suspend the service.
- Terminate. Terminate the service.
- (Optional) if you choose Suspend as Action, you can also set Suspend Reason. This option is used as suspending reason in the service tab of the admin panel.
- Enter Action Delay to create a delay between notification and action. This option is useful for actions like suspending. You can set this option to create a delay between notification and suspension. This option can be zero or more.
- Choose Action Email Template to send an email to the client when the rule has detected a service that exceeds the limit, and the Action Delay is passed. The templates are fetched from custom Product/Service Messages in the email templates section.
- Click Submit.
View Logs #
To view Quota Manager logs, go to the addon dashboard and click the Logs button. In this section, you can review and search the addon operation logs.
Merge Fields for Email Template #
You can enter merge field variables in email messages, which the system replaces with the user’s data when it sends the email. Quota Manager adds new merge fields to the email template that you can use to create your custom template.
Variable | Description |
{$disk_usage} | The service’s current disk usage |
{$disk_limit} | The service’s actual disk limit |
{$bandwith_usage} | The service’s current bandwidth usage |
{$bandwith_limit} | The service’s actual bandwidth limit |