Personal tools
Namespaces

Variants
Actions

Hosting Quota Notifications For WHMCS

From ModulesGarden Wiki
(Difference between revisions)
Jump to: navigation, search
(About Hosting Quota Notifications For WHMCS)
(About Hosting Quota Notifications For WHMCS)
 
(134 intermediate revisions by 10 users not shown)
Line 2: Line 2:
 
<meta name="description" content="ModulesGarden Wiki Contains All The Information You Need About The Hosting Quota Notifications For WHMCS Module."></meta>
 
<meta name="description" content="ModulesGarden Wiki Contains All The Information You Need About The Hosting Quota Notifications For WHMCS Module."></meta>
  
=About [http://www.modulesgarden.com/products/whmcs/hosting_quota_notifications/features Hosting Quota Notifications For WHMCS]=
+
=About [https://www.modulesgarden.com/products/whmcs/hosting-quota-notifications Hosting Quota Notifications For WHMCS]=
 
{|
 
{|
|style="padding: 10px 0px 10px 0px;"|'''Hosting Quota Notifications For WHMCS''' allows you to send automatic notifications to your clients whenever they exceed previously set bandwidth and/or disk usage.
+
|style="padding: 10px 0px 10px 0px;"|'''Hosting Quota Notifications For WHMCS''' allows to define rules on clients' services bandwidth and disk usage limits according to which automatic email notifications can be sent and tickets opened <br/>to let the clients know they have exceed the previously set service usage.<br />
Notifications can be sent in two ways: upon exceeding given resource tier or after exceeding given resource limit in a specified time period.<br />
+
Prepare ticket templates and their translations, use default email template or prepare your custom ones.
You can also define email templates and view details of each sent notification owing to logs.
+
 
|}
 
|}
 
<!--a comment maybe? -->
 
<!--a comment maybe? -->
*'''Admin Area Features:'''
+
*'''Module:'''
 
{|
 
{|
|style="padding: 10px 0px 0px 30px;"|✔ Automatically Notify Your Clients Upon Exceeding Defined Limits Of Bandwidth And Disk Usage
+
|style="padding: 10px 0px 0px 30px;"|✔ Send Automated Notifications To Clients When They Exceed Defined Bandwidth And Disk Usage:
 
|}
 
|}
 
{|
 
{|
|style="padding: 0px 0px 0px 30px;"|✔ Configure Notification Groups
+
|style="padding: 0px 0px 0px 45px;"|✔ By Email
 
|}
 
|}
 
{|
 
{|
|style="padding: 0px 0px 0px 30px;"|✔ Choose Between Two Types Of Group Counting:
+
|style="padding: 0px 0px 0px 45px;"|✔ By Ticket
 
|}
 
|}
 
{|
 
{|
|style="padding: 0px 0px 0px 45px;"|✔ Tiered - Define Tiers Of Usage
+
|style="padding: 0px 0px 0px 30px;"|✔ Display Daily Service Bandwidth And Disk Usage In Client Area
 
|}
 
|}
 
{|
 
{|
|style="padding: 0px 0px 0px 45px;"|✔ Fixed - Define Usage Grow Over Time
+
|style="padding: 0px 0px 0px 30px;"|✔ Configure Notification Rules:
 
|}
 
|}
 
{|
 
{|
|style="padding: 0px 0px 0px 30px;"|✔ Assign Multiple Products To Single Notification Group
+
|style="padding: 0px 0px 0px 45px;"|✔ Enable/Disable Notification Rules
 
|}
 
|}
 
{|
 
{|
|style="padding: 0px 0px 0px 30px;"|✔ Assign Email Templates Per Notification Group
+
|style="padding: 0px 0px 0px 45px;"|✔ Choose Between Three Types Of Overages Calculation:
 
|}
 
|}
 
{|
 
{|
|style="padding: 0px 0px 0px 30px;"|✔ Enable/Disable Notification Groups
+
|style="padding: 0px 0px 0px 60px;"|✔ Tiered - Define Tiers Of Resource Usage
 
|}
 
|}
 
{|
 
{|
|style="padding: 0px 0px 10px 30px;"|✔ View Logs Of Sent Notifications
+
|style="padding: 0px 0px 0px 60px;"|✔ Fixed - Define Resource Usage In Specific Time Periods
 +
|}
 +
{|
 +
|style="padding: 0px 0px 0px 60px;"|✔ Basic - Use Built-In WHMCS Overage Resource Usage
 +
|}
 +
{|
 +
|style="padding: 0px 0px 0px 45px;"|✔ Assign Multiple Products To Single Notification Rule
 +
|}
 +
{|
 +
|style="padding: 0px 0px 0px 45px;"|✔ Assign Default Email Template
 +
|}
 +
{|
 +
|style="padding: 0px 0px 0px 45px;"|✔ Define Hours Interval Of Notification
 +
|}
 +
{|
 +
|style="padding: 0px 0px 0px 45px;"|✔ Show Resource Usage In Client Area
 +
|}
 +
{|
 +
|style="padding: 0px 0px 0px 30px;"|✔ Configure Steps Per Disk And Bandwidth Rule:
 +
|}
 +
{|
 +
|style="padding: 0px 0px 0px 45px;"|✔ Define Resource Overage Values:
 +
|}
 +
{|
 +
|style="padding: 0px 0px 0px 60px;"|✔ In Specific Unit (MB, GB, TB)
 +
|}
 +
{|
 +
|style="padding: 0px 0px 0px 60px;"|✔ Based On Percentage Value Of WHMCS Soft Limit
 +
|}
 +
{|
 +
|style="padding: 0px 0px 0px 45px;"|✔ Assign Email And Ticket Templates Per Notification Rule Step
 +
|}
 +
{|
 +
|style="padding: 0px 0px 0px 45px;"|✔ Define Time Period Of Overage Calculation For Fixed Rule Step
 +
|}
 +
{|
 +
|style="padding: 0px 0px 0px 45px;"|✔ Define Action Taken Upon Resource Usage Exceeding:
 +
|}
 +
{|
 +
|style="padding: 0px 0px 0px 60px;"|✔ None
 +
|}
 +
{|
 +
|style="padding: 0px 0px 0px 60px;"|✔ Auto-Suspend Product
 +
|}
 +
{|
 +
|style="padding: 0px 0px 0px 60px;"|✔ Auto-Terminate Product
 +
|}
 +
{|
 +
|style="padding: 0px 0px 0px 30px;"|✔ Configure Ticket Templates In Multiple Languages
 +
|}
 +
{|
 +
|style="padding: 0px 0px 0px 30px;"|✔ View Daily Usage Of Specific Service
 +
|}
 +
{|
 +
|style="padding: 0px 0px 0px 30px;"|✔ View Today, Last Week And Last Month Statistics Of:
 +
|}
 +
{|
 +
|style="padding: 0px 0px 0px 45px;"|✔ Sent Email Notifications
 +
|}
 +
{|
 +
|style="padding: 0px 0px 0px 45px;"|✔ Opened Tickets
 +
|}
 +
{|
 +
|style="padding: 0px 0px 0px 45px;"|✔ Suspended Services
 +
|}
 +
{|
 +
|style="padding: 0px 0px 0px 45px;"|✔ Terminated Services
 +
|}
 +
{|
 +
|style="padding: 0px 0px 10px 30px;"|✔ View Logs Of Sent Notifications, Opened Tickets And Performed Actions
 
|}
 
|}
 
*'''General Info:'''
 
*'''General Info:'''
Line 42: Line 110:
 
|}
 
|}
 
{|
 
{|
|style="padding: 0px 0px 0px 30px;"|✔ Supports PHP 5.3 Up To PHP 7
+
|style="padding: 0px 0px 0px 30px;"|✔ Supports PHP 8.2 Back To PHP 7.4
 +
|}
 +
{|
 +
|style="padding: 0px 0px 0px 30px;"|✔ Supports WHMCS V8.11 Back To WHMCS V8.8
 +
|}
 +
{|
 +
|style="padding: 0px 0px 0px 30px;"|✔ Requires ionCube Loader V13 Or Later
 
|}
 
|}
 
{|
 
{|
|style="padding: 0px 0px 30px 30px;"|✔ Supports WHMCS V6 and V7
+
|style="padding: 0px 0px 30px 30px;"|✔ Easy [https://www.docs.modulesgarden.com/How_To_Upgrade_WHMCS_Module Module Upgrade] To [https://www.modulesgarden.com/products/whmcs/hosting-quota-notifications#open-source-version Open Source Version]
 
|}
 
|}
  
 
=Installation=
 
=Installation=
 
{|
 
{|
|style="padding: 10px 0px 30px 15px;"|'''This tutorial will show you how to successfully install and configure Hosting Quota Notifications For WHMCS.''' <br />
+
|style="padding: 10px 0px 30px 15px;"|'''This tutorial will show you how to successfully install and configure [https://www.modulesgarden.com/products/whmcs/hosting-quota-notifications Hosting Quota Notifications For WHMCS.]''' <br />
We will guide you step by step through the whole installation and configuration process.
+
We will guide you step by step through the whole installation and configuration process.<br /><br />
 +
'' '''Note:''' If you are still using any versions of Hosting Quota Notifications For WHMCS '''prior to v2.x''', [https://www.docs.modulesgarden.com/Hosting_Quota_Notifications_1.X_For_WHMCS read about it here].''
 
|}
 
|}
 
==Installation==
 
==Installation==
 
{|
 
{|
|style="padding: 10px 0px 20px 15px;"|'''1. Log in to your client area and download Hosting Quota Notifications For WHMCS.'''
+
|style="padding: 10px 0px 20px 15px;"|'''1. Log in to our client area and download the module.'''
 
|}
 
|}
 
{|
 
{|
|style="padding: 0px 0px 20px 25px;"|[[File:HQN_1.png]]
+
|style="padding: 0px 0px 20px 25px;"|[[File:HQN2_1.png]]
 
|}
 
|}
 
{|
 
{|
|style="padding: 0px 0px 15px 15px;"|'''2. Upload and extract the module into the main WHMCS directory.'''<br />
+
|style="padding: 0px 0px 15px 15px;"|'''2. In the downloaded file you might find one or two packages that support different PHP versions.'''<br/>
Files in your WHMCS directory should look like this.
+
In the most recent versions of the module, you will find only one package that supports PHP 7.4 and later.<br/> <!-- If you need a package for the previous versions of PHP, please [https://www.modulesgarden.com/support/ticket/general-support contact our support]. -->
 
|}
 
|}
 
{|
 
{|
|style="padding: 0px 0px 20px 25px;"|[[File:HQN_2.png]]
+
|style="padding: 0px 0px 20px 25px;"|[[File:PHP74_81.png]]
 
|}
 
|}
 
{|
 
{|
|style="padding: 0px 0px 15px 15px;"|'''3. When you install Hosting Quota Notifications for the first time you have to rename '' 'license_RENAME.php' '' file.'''<br />
+
|style="padding: 0px 0px 15px 15px;"|'''Previous updates of the module may contain two packages dedicated to various PHP versions.'''<br/>
File is located in '' 'modules/addons/hosting_quota_notifications/license_RENAME.php' '' . Rename it from '' 'license_RENAME.php' '' to '' 'license.php' '' .
+
The first one that supports PHP 5.6 up to PHP 7.0, and the second one addressed to PHP 7.1 up to PHP 7.2.<br/>
 +
'''''Note:''' Keep in mind that PHP versions 5.6 up to 7.3 are no longer officially supported and their security issues are not fixed or released any more. Find more info [http://php.net/supported-versions.php here].''<br/>
 +
'''''Note 2:''' You can check the current PHP version in your WHMCS. To do so, proceed to ''' 'Utilities' → 'System' → 'PHP Info'.''
 +
|}
 +
{|
 +
|style="padding: 0px 0px 15px 15px;"|'''3. Extract the package and upload its content into the main WHMCS directory.<br/>
 +
The content of the package to upload should look like this.
 +
|}
 +
{|
 +
|style="padding: 0px 0px 20px 25px;"|[[File:HQN2_2_1.png]]
 +
|}
 +
{|
 +
|style="padding: 0px 0px 15px 15px;"|'''4. When you install Hosting Quota Notifications For WHMCS for the first time you have to rename the '' 'license_RENAME.php' '' file.'''<br />
 +
The file is located in '' 'modules/addons/hosting_quota_notifications/license_RENAME.php' '' . Rename it from '' 'license_RENAME.php' '' to '' 'license.php' '' .
 
|}
 
|}
 
{|
 
{|
Line 75: Line 163:
 
|}
 
|}
 
{|
 
{|
|style="padding: 0px 0px 15px 15px;"|'''4. In order to configure your license key, you have to edit a previously renamed '' 'license.php' '' file.'''<br />
+
|style="padding: 0px 0px 15px 15px;"|'''5. In order to configure your license key, you have to edit the previously renamed '' 'license.php' '' file.'''<br />
Enter your license key between quotation marks as presented on the following screen. You can find your license key in your client area'' → 'My Products' ''.  
+
Enter your license key between quotation marks as presented on the following screen. You can find your license key in our client area'' → 'My Products' ''.  
 
|}
 
|}
 
{|
 
{|
 
|style="padding: 0px 0px 30px 25px;"|[[File:HQN_4.png]]
 
|style="padding: 0px 0px 30px 25px;"|[[File:HQN_4.png]]
 +
|}
 +
{|
 +
|style="padding: 0px 0px 15px 15px;"|'''6. In the next step, set up the  '' 'storage' '' folder as recursively writable.'''<br />
 +
This folder is available at '' 'yourWHMCS/modules/addons/hosting_quota_notifications/'. ''
 +
|}
 +
{|
 +
|style="padding: 0px 0px 30px 25px;"|[[File:HQN2_4_1.png]]
 
|}
 
|}
  
 
==Configuration of Addon==
 
==Configuration of Addon==
 
{|
 
{|
|style="padding: 10px 0px 15px 15px;"|'''5. Now you have to activate the module in your WHMCS system.'''<br />
+
|style="padding: 10px 0px 15px 15px;"|'''7. Now you have to activate the module in your WHMCS system.'''<br />
Log in to your WHMCS admin area. Go to '' 'Setup' '' → '' 'Addon Modules' ''. Afterwards, find '' 'Hosting Quota Notifications' '' and press '' 'Activate' '' button.
+
Log in to your WHMCS admin area. Go to '' 'Setup' '' → '' 'Addon Modules' ''. Afterwards, find '' 'Hosting Quota Notifications' '' and press the '' 'Activate' '' button.
 
|}
 
|}
 
{|
 
{|
|style="padding: 0px 0px 20px 25px;"|[[File:HQN_5.png]]
+
|style="padding: 0px 0px 20px 25px;"|[[File:HQN2_5.png]]
 
|}
 
|}
 
{|
 
{|
|style="padding: 0px 0px 15px 15px;"|'''6. In the next step you need to permit access to this module.'''<br />
+
|style="padding: 0px 0px 15px 15px;"|'''8. In the next step you need to permit access to this module.'''<br />
To do so click on '' 'Configure' '' button, tick '' 'Access Control' '' near required admin role groups and press '' 'Save Changes' ''.
+
To do so click the '' 'Configure' '' button, tick '' 'Access Control' '' near required admin role groups and press '' 'Save Changes'. ''
 
|}
 
|}
 
{|
 
{|
|style="padding: 0px 0px 30px 25px;"|[[File:HQN_6.png]]
+
|style="padding: 0px 0px 20px 25px;"|[[File:HQN2_6.png]]
 +
|}
 +
{|
 +
|style="padding: 0px 0px 15px 15px;"|'''9. You have just successfully installed Hosting Quota Notifications For WHMCS!'''<br />
 +
You can access your module at '' 'Addons' '' → '' 'Hosting Quota Notifications'. ''
 +
|}
 +
{|
 +
|style="padding: 0px 0px 20px 25px;"|[[File:HQN2_7.png]]
 +
|}
 +
{|
 +
|style="padding: 0px 0px 15px 15px;"|'''10. The last thing you still need to do before starting to use the module with its full potential is setting up a cron command line.'''<br/> You will find the cron line in the addon '' 'Home' '' page.
 +
One hour interval is suggested (due to hourly sent notifications).
 
|}
 
|}
 
 
{|
 
{|
|style="padding: 0px 0px 15px 15px;"|'''7. You have just successfully installed Hosting Quota Notifications For WHMCS!'''<br />
+
|style="padding: 0px 0px 20px 25px;"|[[File:HQN2_8.png]]
You can access your module in '' 'Addons' '' → '' 'Hosting Quota Notifications' ''.
+
 
|}
 
|}
 
{|
 
{|
|style="padding: 0px 0px 30px 25px;"|[[File:HQN_7.png]]
+
|style="padding: 0px 0px 30px 15px;"|'''11. Apart from the described above module cron you may also wish to configure two extra cron jobs related to collecting usage data and sending notifications.'''<br/> Here are the details:
 +
* Usage Update cron job ''(30 minutes interval is suggested):'' 
 +
php -q public_html/modules/addons/hosting_quota_notifications/cron/cron.php UsageUpdate 
 +
* Sending Notifications cron job ''(5 minutes interval is suggested):'' 
 +
  php -q public_html/modules/addons/hosting_quota_notifications/cron/cron.php NotificationSend 
 
|}
 
|}
  
 
=Configuration and Management=
 
=Configuration and Management=
 
{|
 
{|
|style="padding: 10px 0px 30px 15px;"|'''In this section we will show you how to properly set up and use Hosting Quota Notifications For WHMCS.'''
+
|style="padding: 10px 0px 30px 15px;"|'''In this section we will show you how to properly set up and use Hosting Quota Notifications For WHMCS to its full potential.'''
 
|}
 
|}
==Configuration==
+
 
 +
==Home==
 
{|
 
{|
|style="padding: 10px 0px 15px 15px;"|In '' 'Configuration' '' page you can find the list of configured notification groups.<br />
+
|style="padding: 10px 0px 15px 15px;"|Dashboard of the addon includes statistics on the module actions attempts, either successful or failed.  
You can enable/disable any of them, as well as alter or completely remove them.<br />
+
*Successful actions - marked in green - take a look at the number of emails sent, tickets opened and products suspended or terminated in the provided time periods.
Press '' 'Create New Group' '' to proceed.
+
*Failed actions - marked in red - the module could not perform enumerated here actions due to external issues, for example: server errors (cannot suspend account), SMTP errors (cannot deliver email), etc.<br/> For more details on failed actions please refer to the [[#Logs|logs]] section.
 
|}
 
|}
 
{|
 
{|
|style="padding: 0px 0px 20px 25px;"|[[File:HQN_9.png]]
+
|style="padding: 0px 0px 30px 25px;"|[[File:HQN2_29.png]]
 
|}
 
|}
 +
 +
==Rules==
 
{|
 
{|
|style="padding: 0px 0px 15px 15px;"|Now, you can define all products related to this configuration and email template which will be used to notify your clients.<br />
+
|style="padding: 10px 0px 20px 15px;"|This is a primary section which allows to create numerous rules according to which the services resource usage will be monitored and calculated and then adequate notifications sent.
You can choose between two types of resource usage counting:<br />
+
*Fixed - define amount of resources over specific time period. If client usage growth has exceeded the given limit in specified time, a notification will be sent.
+
*Tiered - defines amount of resources. If client exceeds given limit, a notification will be sent.
+
 
|}
 
|}
 
{|
 
{|
|style="padding: 0px 0px 20px 25px;"|[[File:HQN_10.png]]
+
|style="padding: 0px 0px 20px 25px;"|[[File:HQN2_9.png]]
 
|}
 
|}
 +
===Rule Configuration===
 
{|
 
{|
|style="padding: 0px 0px 15px 15px;"|For example, shown below module uses fixed counting type.<br />
+
|style="padding: 10px 0px 15px 15px;"|Let us begin with creating an exemplary rule according to which disk usage of the selected service will be checked.<br/> Press '' 'Add Rule'. ''
As you can see, we have defined limits for both bandwidth and disk.<br />
+
Settings shown below result in sending notification to client upon:
+
*bandwidth usage growth by 5GB during 21 days.
+
*disk usage growth by 100GB over period of 14 days.
+
 
|}
 
|}
 
{|
 
{|
|style="padding: 0px 0px 30px 25px;"|[[File:HQN_11.png]]
+
|style="padding: 0px 0px 20px 25px;"|[[File:HQN2_10.png]]
 
|}
 
|}
 +
{|
 +
|style="padding: 0px 0px 15px 15px;"|Start with typing a custom name, selecting the usage calculating type: '' 'Tiered', 'Fixed' '' or '' 'Basic' '' (read more about these two methods [[#Calculation Methods|here]]).<br/> Choose your products that this rule will cover.
 +
|}
 +
{|
 +
|style="padding: 0px 0px 20px 25px;"|[[File:HQN2_11.png]]
 +
|}
 +
{|
 +
|style="padding: 0px 0px 15px 15px;"|Once you have saved the changes, you will be moved to the rule configuration page.<br/>
 +
Here you may:
 +
*Set the status of the rule to '' 'enabled' '' or '' 'disabled'.''
 +
*Change the name of the rule.
 +
*Manage the types: '' 'Tiered','' 'Fixed' '' and '' 'Basic': ''
 +
**'''Tiered''' - Clean resource usage.
 +
**'''Fixed''' - Resource usage within a timeframe.
 +
**'''Basic''' - Standard WHMCS usage billing data <br/> Check the [[#Calculation_Methods|Calculation Methods]] section to see the differences between the three types.
 +
*Assign products from available.
 +
*Select a default email template that will be sent to a client with a notification. Set to '' 'None' '' to disable the option.<br/> You may use the predefined custom template ''('Service Usage Limits Notification')'' implemented in the module or prepare your custom one. Find out more in [[#Tips|this section]].
 +
*Set notification hourly intervals to send the notifications.<br/>
 +
Save the changes when ready.
 +
|}
 +
{|
 +
|style="padding: 0px 0px 30px 25px;"|[[File:HQN2_12.png]]
 +
|}
 +
 +
====Steps Configuration====
 +
{|
 +
|style="padding: 10px 0px 15px 15px;"|Move to the next tab - '' 'Disk' '' to define steps conforming to which the usage will be verified.<br/>
 +
Press '' 'Add Step' '' to begin.
 +
|}
 +
{|
 +
|style="padding: 0px 0px 20px 25px;"|[[File:HQN2_13.png]]
 +
|}
 +
{|
 +
|style="padding: 0px 0px 15px 15px;"|
 +
*Start with selecting a '''Unit''' type: '' 'MB', 'GB', 'TB' '' or '' 'Percentage' ''.
 +
*Provide numerical value, e.g.: 20 (depending on the unit selected it will be: 20MB, 20% etc.)
 +
*Period - enter a number of days when the service usage will be counted.
 +
*Email Template - select one per single step, if you choose '' 'default' '' then the one selected at the rule configuration will be used. Choose '' 'None' '' to disable the option.
 +
*[[#Ticket Templates|Ticket Template]] - if you want to notify a client in form of an opened ticket, select the template here or set to '' 'None' '' to disable.
 +
*Ticket Status - select a ticket status that will be set after opening a ticket.
 +
*Action - you may automatically '' 'Terminate' '' or '' 'Suspend' '' a service once selected limit has been reached.<br/> Set to '' 'None' '' if you do not want to trigger any action on the service.
 +
|}
 +
{|
 +
|style="padding: 0px 0px 20px 25px;"|[[File:HQN2_14.png]]
 +
|}
 +
{|
 +
|style="padding: 0px 0px 15px 15px;"|Surely, you may add more steps for the same rule and force different actions on the services.<br/>
 +
You may edit the steps if needed or delete them.
 +
|}
 +
{|
 +
|style="padding: 0px 0px 20px 25px;"|[[File:HQN2_15.png]]
 +
|}
 +
{|
 +
|style="padding: 0px 0px 20px 15px;"|Configure the steps for '' 'Bandwidth' '' usage limits in the very same way as in case of the described above '' 'Disk'. ''
 +
|}
 +
{|
 +
|style="padding: 0px 0px 30px 25px;"|[[File:HQN2_16.png]]
 +
|}
 +
 +
====Calculation Methods====
 +
{|
 +
|style="padding: 10px 0px 5px 15px;"|As mentioned above, there are three calculation types available: '' 'Fixed', 'Tiered' '' and '' 'Basic'.'' We will try to explain the main differences between them and show an example of a full calculation.
 +
*'''Fixed''' type - resource usage calculated within a selected time period defined in the '' 'Period (Days)' '' field.
 +
*'''Tiered''' type - full amount of resource usage.
 +
*'''Basic''' type - calculating resource overages, based on the current data from the WHMCS disk space and bandwidth overage billing.
 +
|}
 +
{|
 +
|style="padding: 0px 0px 5px 15px;"|Look at the table below to see the differences between these three types.
 +
|}
 +
{|class="wikitable"  style="margin-left: 25px; width: 15%;"
 +
! Day
 +
! Total Usage
 +
! Daily Usage
 +
|-
 +
|Day 1
 +
|10 MB
 +
|10 MB
 +
|-
 +
|Day 2
 +
|30 MB
 +
|20 MB
 +
|-
 +
|Day 3
 +
|40 MB
 +
|10 MB
 +
|-
 +
|Day 4
 +
|45 MB
 +
|5 MB
 +
|-
 +
|}
 +
{|
 +
|style="padding: 0px 0px 10px 15px;"|Where:
 +
* '''Daily Usage''' - Refers to the total usage recorded within a single day, it is the difference between the total usage of the current day and the total usage of the previous day.
 +
* '''Total Usage''' -  Represents the aggregated data usage up to the present moment, displayed on the product page or in the billing summary ("Overage Billing").
 +
|}
 +
{|
 +
|style="padding: 0px 0px 10px 15px;"|
 +
*For '''Fixed''' type:<br/>Period: Last 3 days<br/>Value: 30 MB<br/> Take the three last values from the ''Daily Usage'' column, the sum of 20, 10 and 5 gives 35.<br/> 30 MB limit has been exceeded during 3 days, therefore a notification is sent.
 +
|}
 +
{|
 +
|style="padding: 0px 0px 10px 15px;"|
 +
*For '''Tiered''' type:<br/>Value: 40 MB<br/>Take the sum of values from the entire ''Daily Usage'' column, 45 MB in this case.<br/> 40 MB limit has been exceeded, therefore a notification is sent.
 +
|}
 +
{|
 +
|style="padding: 0px 0px 10px 15px;"|
 +
*For '''Basic''' type:<br/>Period: 4th day<br/>Value: 45MB<br/> The administrator will see the same data as displayed on the product page, based on the WHMCS disk space and bandwidth overage billing feature  ''(the module fetches the value from the '''tblhosting''' usage database table)''.<br/> On the fourth day, the displayed usage value will equal, in this example, to: '''45 MB''' from the '''Total Usage''' column.
 +
|}
 +
{|
 +
|style="padding: 0px 0px 30px 15px;"|Apart from the calculation type, you must also select a unit - ''MB, GB, TB'' or ''percentage''.<br/>
 +
*If you select any of  ''MB, GB, TB'' and 20 as value, such amount of resource usage will be taken into consideration for every assigned product.<br/>
 +
*If you select '' 'Percentage' '' and 20 as value, then 20% of the set in WHMCS soft limit will be taken into consideration for every assigned product.<br/> For example, if in WHMCS the service limit is set to 100 MB, then 20% calculated from 100 gives 20 MB - this amount of resource will be considered for this single product.
 +
|}
 +
 +
==Ticket Templates==
 +
{|
 +
|style="padding: 10px 0px 15px 15px;"|The '' 'Ticket Templates' '' section gives you the opportunity to create as many templates that will be used to open informative tickets as needed.<br/> Press '' 'Add Ticket Template' '' to create one.
 +
|}
 +
{|
 +
|style="padding: 0px 0px 20px 25px;"|[[File:HQN2_17.png]]
 +
|}
 +
{|
 +
|style="padding: 0px 0px 15px 15px;"|Type in the ticket template name, select a support department and support administrator to which the ticket will be automatically assigned.<br/>
 +
When ready, save changes.
 +
|}
 +
{|
 +
|style="padding: 0px 0px 20px 25px;"|[[File:HQN2_18.png]]
 +
|}
 +
{|
 +
|style="padding: 0px 0px 15px 15px;"|You will be immediately moved to the template configuration page where you can again rename it as well as change the department.
 +
|}
 +
{|
 +
|style="padding: 0px 0px 30px 25px;"|[[File:HQN2_19.png]]
 +
|}
 +
 +
===Ticket Template Translations===
 +
{|
 +
|style="padding: 10px 0px 15px 15px;"|Next, you need to proceed to the '' 'Template Translation' '' section. There you can provide the content of the template.<br/>
 +
Press '' 'Add Template Translation'. ''
 +
|}
 +
{|
 +
|style="padding: 0px 0px 20px 25px;"|[[File:HQN2_21.png]]
 +
|}
 +
{|
 +
|style="padding: 0px 0px 20px 15px;"|Enter a template name, select language and type in the text in the '' 'Message' '' text field.<br/> If you select default language, then this template will be used in case there is no translation in the client's language.
 +
|}
 +
{|
 +
|style="padding: 0px 0px 20px 25px;"|[[File:HQN2_22.png]]
 +
|}
 +
{|
 +
|style="padding: 0px 0px 15px 15px;"|There are numerous merge fields that you may use in the message to make it full and most informative.<br/> As you can see at the bottom, there is a list of special merge fields particularly designated for notifications. These are:<br/>
 +
*Notification Limit - displays the allowed resource usage limit.
 +
*Notification Usage - stands for the current resource usage of the client service.
 +
*Notification Kind - returned as ''Bandwidth'' or ''Usage''.
 +
*Notification Unit - returned as ''MB, GB'' or ''TB''.
 +
*Notification DifferenceUsageAndLimit - amount by which the limit has been exceeded.
 +
*Notification PeriodDays - period of days when the usage is verified defined for '' 'Fixed' '' type.
 +
|}
 +
{|
 +
|style="padding: 0px 0px 20px 25px;"|[[File:HQN2_23.png]]
 +
|}
 +
{|
 +
|style="padding: 0px 0px 15px 15px;"|Use action buttons to edit or delete the template translations.
 +
|}
 +
{|
 +
|style="padding: 0px 0px 20px 25px;"|[[File:HQN2_24.png]]
 +
|}
 +
{|
 +
|style="padding: 0px 0px 15px 15px;"|That is what such an automatically opened ticket may look like in your client area.
 +
|}
 +
{|
 +
|style="padding: 0px 0px 30px 25px;"|[[File:HQN2_24_1.png]]
 +
|}
 +
 +
==Services==
 +
{|
 +
|style="padding: 10px 0px 15px 15px;"|Another section that we need to draw your attention to is called '' 'Services'. '' <br/>You will find there products which are included in any of your configured rules with disk or bandwidth usage. <br/>
 +
Press the icon marked on the screen below and you will get details on the current resource usage of the service per each day.
 +
|}
 +
{|
 +
|style="padding: 0px 0px 20px 25px;"|[[File:HQN2_25.png]]
 +
|}
 +
{|
 +
|style="padding: 0px 0px 15px 15px;"|Check out the statistics on the disk and bandwidth usage per single product.<br/>
 +
Please note that WHMCS updates the quote and traffic load once a day only.
 +
|}
 +
{|
 +
|style="padding: 0px 0px 30px 25px;"|[[File:HQN2_26.png]]
 +
|}
 +
 
==Logs==
 
==Logs==
 
{|
 
{|
|style="padding: 10px 0px 15px 15px;"|Under '' 'Logs' '' page you can view information about sent notifications.
+
|style="padding: 10px 0px 20px 15px;"|Under the '' 'Logs' '' page you can view information about sent notifications via email, opened tickets, errors, performed actions etc.
 
|}
 
|}
 
{|
 
{|
|style="padding: 0px 0px 30px 25px;"|[[File:HQN_12.png]]
+
|style="padding: 0px 0px 30px 25px;"|[[File:HQN2_27.png]]
 
|}
 
|}
==Notifications==
+
 
 +
=Use Cases=
 
{|
 
{|
|style="padding: 10px 0px 15px 15px;"|You can create as many notifications as you wish.<br />
+
|style="padding: 10px 0px 30px 15px;"|'''In this section, you will find real-world examples of how to use the module's features.'''<br/>
The only requirement is their type being set to '' 'Product/Service' ''.<br />
+
Check out the scenarios below to see the module in action.
Additionally, you can use {if} statement, as shown below:
+
{if $bw_over} Your bandwidth usage is over {$bw_over}MB{if $bw_current} (current: {$bw_current}MB){/if}.{/if}
+
{if $disk_over}Your disks usage is over {$disk_over}MB{if $disk_current} (current: {$disk_current}MB){/if}.{/if}
+
It will allow you to use this email template for bandwidth and disk notifications at the same time.
+
 
|}
 
|}
 +
==Monitor Resource Usage==
 
{|
 
{|
|style="padding: 0px 0px 30px 25px;"|[[File:HQN_13.png]]
+
|style="padding: 10px 0px 5px 15px;"|Hosting Quota Notifications For WHMCS can be used to help your clients monitor their resource usage.<br/>
 +
Follow this example to set up special notifications, that will be sent out whenever a client rapidly depletes a large amount of bandwidth or disk space.
 +
|}
 +
{|
 +
|style="padding: 0px 0px 20px 15px;"|Start by creating a rule. Open the addon and navigate to '' 'Rules' '' → '' 'Add Rule'.''
 +
|}
 +
{|
 +
|style="padding: 0px 0px 20px 25px;"|[[File:HQN2_30_1.png]]
 +
|}
 +
{|
 +
|style="padding: 0px 0px 20px 15px;"|Name the rule, select the ''''' 'Fixed' ''''' rule type, and pick the products you want to include.
 +
|}
 +
{|
 +
|style="padding: 0px 0px 20px 25px;"|[[File:HQN2_30_1_1.png]]
 +
|}
 +
{|
 +
|style="padding: 0px 0px 20px 15px;"|Use the '' 'Edit Rule' '' button to specify the details.
 +
|}
 +
{|
 +
|style="padding: 0px 0px 20px 25px;"|[[File:HQN2_30_2.png]]
 +
|}
 +
{|
 +
|style="padding: 0px 0px 15px 15px;"|Move to the '' 'Disk' '' or '' 'Bandwidth' '' tab, depending on what you want the notification to be on and '' 'Add Step'.''<br/> You can also do both, simply repeat the process for the other tab.
 +
|}
 +
{|
 +
|style="padding: 0px 0px 20px 25px;"|[[File:HQN2_30_3.png]]
 +
|}
 +
{|
 +
|style="padding: 0px 0px 15px 15px;"|Focus on '' 'Value','' '' 'Unit' '' and '' 'Period' '' first.<br/>
 +
With the settings shown on the following screen, the notification will be sent every time the usage exceeds 10 GB in a day.<br/>
 +
Change those three fields to fit the needs of your client, for example, you could use the '' 'Percentage' '' type, the value of '' '50' '' and the period of '' '3' '' to have the clients notified whenever half of their disk gets filled within three days, etc.
 +
|}
 +
{|
 +
|style="padding: 0px 0px 20px 25px;"|[[File:HQN2_30_4.png]]
 +
|}
 +
{|
 +
|style="padding: 0px 0px 15px 15px;"|Next, select an email template or a [[#Ticket_Templates|ticket template]] to be used for this rule.<br/>If you included a ticket template, select a ticket status as well.<br/>'''''Note:''' If you have not already, take a look at the default email template described in the [[#Tips|'Tips']] section. The included merge fields can be of use when composing custom email templates.<br/>
 +
You can include multiple steps to the rule in both the disk and bandwidth tab, to create a tiered notification system.<br/>
 +
'''If the '' 'Period' '' value is relatively low the notifications will help your clients react to sudden peaks in resource usage.'''<br/>
 +
Remember to enable the rules when ready.
 +
|}
 +
{|
 +
|style="padding: 0px 0px 30px 25px;"|[[File:HQN2_30_5.png]]
 +
|}
 +
 
 +
==Exceeded Bandwidth Usage==
 +
{|
 +
|style="padding: 10px 0px 5px 15px;"|When clients get close to their usage bandwidth limit. It is crucial to make them aware of the fact. Hosting Quota Notifications For WHMCS can help you do just that.<br/>
 +
See the use case below, on how to set up example rules for this scenario.
 +
|}
 +
{|
 +
|style="padding: 0px 0px 20px 15px;"|Start by creating a rule. Open the addon and navigate to '' 'Rules' '' → '' 'Add Rule'.''
 +
|}
 +
{|
 +
|style="padding: 0px 0px 20px 25px;"|[[File:HQN2_30_1.png]]
 +
|}
 +
{|
 +
|style="padding: 0px 0px 20px 15px;"|Name the rule, select the ''''' 'Basic' ''''' rule type, and pick the products you want to include.
 +
|}
 +
{|
 +
|style="padding: 0px 0px 20px 25px;"|[[File:HQN2_30_6.png]]
 +
|}
 +
{|
 +
|style="padding: 0px 0px 20px 15px;"|Use the '' 'Edit Rule' '' button to specify the details.
 +
|}
 +
{|
 +
|style="padding: 0px 0px 20px 25px;"|[[File:HQN2_30_7.png]]
 +
|}
 +
{|
 +
|style="padding: 0px 0px 20px 15px;"|Move to the '' 'Bandwidth' '' tab and '' 'Add Step'.''
 +
|}
 +
{|
 +
|style="padding: 0px 0px 20px 25px;"|[[File:HQN2_30_8.png]]
 +
|}
 +
{|
 +
|style="padding: 0px 0px 15px 15px;"|Select the '' 'Percentage' '' unit, and '' 'Value' '' close to 100.<br/>
 +
We recommend setting three steps at 80, 90, and 99 percent.
 +
|}
 +
{|
 +
|style="padding: 0px 0px 20px 25px;"|[[File:HQN2_30_9.png]]
 +
|}
 +
{|
 +
|style="padding: 0px 0px 15px 15px;"|Next, select an email template or a [[#Ticket_Templates|ticket template]] to be used for this rule.<br/>If you included a ticket template, select a ticket status as well.<br/>'''''Note:''' If you have not already, take a look at the default email template described in the [[#Tips|'Tips']] section. The included merge fields can be of use when composing custom email templates.<br/>
 +
'''The notifications will help your clients make sure they have enough bandwidth for their needs.'''
 +
|}
 +
{|
 +
|style="padding: 0px 0px 20px 25px;"|[[File:HQN2_30_10.png]]
 +
|}
 +
{|
 +
|style="padding: 0px 0px 20px 15px;"|Remember to enable the rules when ready.
 +
|}
 +
{|
 +
|style="padding: 0px 0px 30px 25px;"|[[File:HQN2_30_11.png]]
 +
|}
 +
 
 +
==Automatic Suspension==
 +
{|
 +
|style="padding: 10px 0px 5px 15px;"|Hosting Quota Notifications For WHMCS can automatically suspend or terminate the service of clients that used up all of their resources.<br/>
 +
Follow this example to set up an additional rule to perform the suspension automatically.
 +
|}
 +
{|
 +
|style="padding: 0px 0px 20px 15px;"|Start by creating a rule. Open the addon and navigate to '' 'Rules' '' → '' 'Add Rule'.''<br/>
 +
|}
 +
{|
 +
|style="padding: 0px 0px 20px 25px;"|[[File:HQN2_30_1.png]]
 +
|}
 +
{|
 +
|style="padding: 0px 0px 20px 15px;"|Name the rule, select the '' 'Basic' '' rule type, and pick the products you want to include.
 +
|}
 +
{|
 +
|style="padding: 0px 0px 20px 25px;"|[[File:HQN2_30_13.png]]
 +
|}
 +
{|
 +
|style="padding: 0px 0px 20px 15px;"|Move to the '' 'Bandwidth' '' tab and press '' 'Add Step' '' button.
 +
|}
 +
{|
 +
|style="padding: 0px 0px 20px 25px;"|[[File:HQN2_30_8.png]]
 +
|}
 +
{|
 +
|style="padding: 0px 0px 15px 15px;"|Focus on '' 'Value','' '' 'Unit' '' and '' 'Action' '' first.<br/>
 +
Set '' 'Unit' '' to '' 'Percentage','' '' 'Value' '' to '' '100','' and '' 'Action' '' to '' 'Auto-Suspend' '' or '' 'Auto-Terminate'.''
 +
|}
 +
{|
 +
|style="padding: 0px 0px 20px 25px;"|[[File:HQN2_30_15.png]]
 +
|}
 +
{|
 +
|style="padding: 0px 0px 15px 15px;"|Next, select an email template or a [[#Ticket_Templates|ticket template]] to be used for this rule.<br/>If you included a ticket template, select ticket status as well.<br/>'''''Note:''' If you have not already, take a look at the default email template described in the [[#Tips|'Tips']] section. The included merge fields can be of use when composing custom email templates.<br/>
 +
Here is an example email for this situation.
 +
|}
 +
{|
 +
|style="padding: 0px 0px 20px 25px;"|[[File:HQN2_30_15_1.png]]
 +
|}
 +
{|
 +
|style="padding: 0px 0px 20px 15px;"|Remember to enable the rule when ready.
 +
|}
 +
{|
 +
|style="padding: 0px 0px 30px 25px;"|[[File:HQN2_30_16.png]]
 
|}
 
|}
  
 
=Tips=
 
=Tips=
 
{|
 
{|
|style="padding: 10px 0px 30px 15px;"|
+
|style="padding: 10px 0px 10px 15px;"|1. There is one default email template that may be used to send email notifications. Find '' 'Service Usage Limits Notification' '' at ''WHMCS → Setup → Email Templates → Product/Service Messages''.<br/>
 +
You may edit the template freely, using special merge fields and create new ones on its basis. Allowed module special merge fields:
 +
*{$kind} - stands for bandwidth or usage.
 +
*{$limit} - allowed resource usage limit.
 +
*{$unit} - MB,GB or TB.
 +
*{$usage} - current resource usage of the client.
 +
*{$differenceUsageAndLimit} - amount by which the limit has been exceeded.
 +
*{$periodDays} - period of days defined for '' 'Fixed' '' type.
 +
|}
 +
{|
 +
|style="padding: 0px 0px 20px 25px;"|[[File:HQN2_30.png]]
 +
|}
 +
{|
 +
|style="padding: 0px 0px 10px 15px;"|That is what the email message may look like when delivered:
 +
|}
 +
{|
 +
|style="padding: 0px 0px 20px 25px;"|[[File:HQN2_28.png]]
 +
|}
 +
{|
 +
|style="padding: 0px 0px 10px 15px;"|2. When configuring a ticket template you need to select an admin to which it will be assigned. However, the ticket will be automatically opened by a randomly selected administrator.
 +
|}
 +
{|
 +
|style="padding: 0px 0px 30px 15px;"|3. There is the possibility to limit '' 'Logs' '' to a particular number of days. With the following cron command, you can delete '' 'Logs' '' older than X days. <br/> As an example, we want to remove '' 'Logs' '' older than '''2''' days. Of course, you can provide any number of days.
 +
<pre>php -q /yourWHMCS/modules/addons/hosting_quota_notifications/cron/cron.php DeleteLogs --older-than 2 </pre>
 +
Please remember that if you do not define a number of days, the cron task will automatically set the default number of days which is 1. It means that '' 'Logs' '' older than 1 day will be removed.
 +
|}
 +
 
 +
=Update Instructions=
 +
{|
 +
|style="padding: 10px 0px 10px 15px;"|An essential guidance through the process of updating the module is offered '''[https://www.docs.modulesgarden.com/How_To_Update_WHMCS_Module here]'''.
 +
|}
 +
{|
 +
|style="padding: 0px 0px 30px 15px;"|'''''Important:''' If you are updating your Hosting Quota Notifications module form version 1.0.0 to 1.1.0 please be noted that '''all data except logs will be migrated'''.<br/>
 +
Keep in mind that '' 'Groups' '' used in version 1.0.0 have now been renamed to '' 'Rules'. ''
 +
|}
 +
=Upgrade Guide=
 +
{|
 +
|style="padding: 10px 0px 30px 15px;"|Seeking a solution that offers greater flexibility, customization tailored to your precise needs, and unrestricted availability?<br/> There is an option that not only proves to be cost-effective in the long run but also includes prioritized support services, making it a truly valuable investment.<br/>
 +
 
 +
Opt for the [https://www.modulesgarden.com/products/whmcs/hosting-quota-notifications#open-source-version Open Source version] of your Hosting Quota Notifications For WHMCS module to unlock these benefits.<br/> Simply click on either the '''Get Source Code''' or '''Upgrade To Lifetime''' button found on the product's page in our client area to complete the one-step upgrade process, with a '''dedicated discount''' already applied.<br/>
 +
 
 +
Follow a [https://www.docs.modulesgarden.com/How_To_Upgrade_WHMCS_Module comprehensive guide] covering the transition process, the advantages it brings, and step-by-step instructions on what to do next after the order has been successfully finalized.
 
|}
 
|}
  
 
=Common Problems=
 
=Common Problems=
 
{|
 
{|
|style="padding: 10px 0px 30px 15px;"|'''1. When you have problems with connection, check whether your SELinux or firewall does not block ports.'''
+
|style="padding: 10px 0px 10px 15px;"|'''1. When you have problems with connection, check whether your SELinux or firewall does not block ports.'''
 +
|}
 +
{|
 +
|style="padding: 0px 0px 30px 15px;"|2. We do not recommend using Hosting Quota Notifications For WHMCS module either with Multibrand For WHMCS or with Resellers Center For WHMCS.<br/>
 +
Integration between these modules is hampered due to specific features of each one of them and their individual work flow.
 
|}
 
|}

Latest revision as of 08:39, 1 October 2024

Contents

[edit] About Hosting Quota Notifications For WHMCS

Hosting Quota Notifications For WHMCS allows to define rules on clients' services bandwidth and disk usage limits according to which automatic email notifications can be sent and tickets opened
to let the clients know they have exceed the previously set service usage.

Prepare ticket templates and their translations, use default email template or prepare your custom ones.

  • Module:
✔ Send Automated Notifications To Clients When They Exceed Defined Bandwidth And Disk Usage:
✔ By Email
✔ By Ticket
✔ Display Daily Service Bandwidth And Disk Usage In Client Area
✔ Configure Notification Rules:
✔ Enable/Disable Notification Rules
✔ Choose Between Three Types Of Overages Calculation:
✔ Tiered - Define Tiers Of Resource Usage
✔ Fixed - Define Resource Usage In Specific Time Periods
✔ Basic - Use Built-In WHMCS Overage Resource Usage
✔ Assign Multiple Products To Single Notification Rule
✔ Assign Default Email Template
✔ Define Hours Interval Of Notification
✔ Show Resource Usage In Client Area
✔ Configure Steps Per Disk And Bandwidth Rule:
✔ Define Resource Overage Values:
✔ In Specific Unit (MB, GB, TB)
✔ Based On Percentage Value Of WHMCS Soft Limit
✔ Assign Email And Ticket Templates Per Notification Rule Step
✔ Define Time Period Of Overage Calculation For Fixed Rule Step
✔ Define Action Taken Upon Resource Usage Exceeding:
✔ None
✔ Auto-Suspend Product
✔ Auto-Terminate Product
✔ Configure Ticket Templates In Multiple Languages
✔ View Daily Usage Of Specific Service
✔ View Today, Last Week And Last Month Statistics Of:
✔ Sent Email Notifications
✔ Opened Tickets
✔ Suspended Services
✔ Terminated Services
✔ View Logs Of Sent Notifications, Opened Tickets And Performed Actions
  • General Info:
✔ Multi-Language Support
✔ Supports PHP 8.2 Back To PHP 7.4
✔ Supports WHMCS V8.11 Back To WHMCS V8.8
✔ Requires ionCube Loader V13 Or Later
✔ Easy Module Upgrade To Open Source Version

[edit] Installation

This tutorial will show you how to successfully install and configure Hosting Quota Notifications For WHMCS.

We will guide you step by step through the whole installation and configuration process.

Note: If you are still using any versions of Hosting Quota Notifications For WHMCS prior to v2.x, read about it here.

[edit] Installation

1. Log in to our client area and download the module.
HQN2 1.png
2. In the downloaded file you might find one or two packages that support different PHP versions.

In the most recent versions of the module, you will find only one package that supports PHP 7.4 and later.

PHP74 81.png
Previous updates of the module may contain two packages dedicated to various PHP versions.

The first one that supports PHP 5.6 up to PHP 7.0, and the second one addressed to PHP 7.1 up to PHP 7.2.
Note: Keep in mind that PHP versions 5.6 up to 7.3 are no longer officially supported and their security issues are not fixed or released any more. Find more info here.
Note 2: You can check the current PHP version in your WHMCS. To do so, proceed to 'Utilities' → 'System' → 'PHP Info'.

3. Extract the package and upload its content into the main WHMCS directory.

The content of the package to upload should look like this.

HQN2 2 1.png
4. When you install Hosting Quota Notifications For WHMCS for the first time you have to rename the 'license_RENAME.php' file.

The file is located in 'modules/addons/hosting_quota_notifications/license_RENAME.php' . Rename it from 'license_RENAME.php' to 'license.php' .

HQN 3.png
5. In order to configure your license key, you have to edit the previously renamed 'license.php' file.

Enter your license key between quotation marks as presented on the following screen. You can find your license key in our client area → 'My Products' .

HQN 4.png
6. In the next step, set up the 'storage' folder as recursively writable.

This folder is available at 'yourWHMCS/modules/addons/hosting_quota_notifications/'.

HQN2 4 1.png

[edit] Configuration of Addon

7. Now you have to activate the module in your WHMCS system.

Log in to your WHMCS admin area. Go to 'Setup' 'Addon Modules' . Afterwards, find 'Hosting Quota Notifications' and press the 'Activate' button.

HQN2 5.png
8. In the next step you need to permit access to this module.

To do so click the 'Configure' button, tick 'Access Control' near required admin role groups and press 'Save Changes'.

HQN2 6.png
9. You have just successfully installed Hosting Quota Notifications For WHMCS!

You can access your module at 'Addons' 'Hosting Quota Notifications'.

HQN2 7.png
10. The last thing you still need to do before starting to use the module with its full potential is setting up a cron command line.
You will find the cron line in the addon 'Home' page.

One hour interval is suggested (due to hourly sent notifications).

HQN2 8.png
11. Apart from the described above module cron you may also wish to configure two extra cron jobs related to collecting usage data and sending notifications.
Here are the details:
  • Usage Update cron job (30 minutes interval is suggested):
php -q public_html/modules/addons/hosting_quota_notifications/cron/cron.php UsageUpdate   
  • Sending Notifications cron job (5 minutes interval is suggested):
 php -q public_html/modules/addons/hosting_quota_notifications/cron/cron.php NotificationSend  

[edit] Configuration and Management

In this section we will show you how to properly set up and use Hosting Quota Notifications For WHMCS to its full potential.

[edit] Home

Dashboard of the addon includes statistics on the module actions attempts, either successful or failed.
  • Successful actions - marked in green - take a look at the number of emails sent, tickets opened and products suspended or terminated in the provided time periods.
  • Failed actions - marked in red - the module could not perform enumerated here actions due to external issues, for example: server errors (cannot suspend account), SMTP errors (cannot deliver email), etc.
    For more details on failed actions please refer to the logs section.
HQN2 29.png

[edit] Rules

This is a primary section which allows to create numerous rules according to which the services resource usage will be monitored and calculated and then adequate notifications sent.
HQN2 9.png

[edit] Rule Configuration

Let us begin with creating an exemplary rule according to which disk usage of the selected service will be checked.
Press 'Add Rule'.
HQN2 10.png
Start with typing a custom name, selecting the usage calculating type: 'Tiered', 'Fixed' or 'Basic' (read more about these two methods here).
Choose your products that this rule will cover.
HQN2 11.png
Once you have saved the changes, you will be moved to the rule configuration page.

Here you may:

  • Set the status of the rule to 'enabled' or 'disabled'.
  • Change the name of the rule.
  • Manage the types: 'Tiered', 'Fixed' and 'Basic':
    • Tiered - Clean resource usage.
    • Fixed - Resource usage within a timeframe.
    • Basic - Standard WHMCS usage billing data
      Check the Calculation Methods section to see the differences between the three types.
  • Assign products from available.
  • Select a default email template that will be sent to a client with a notification. Set to 'None' to disable the option.
    You may use the predefined custom template ('Service Usage Limits Notification') implemented in the module or prepare your custom one. Find out more in this section.
  • Set notification hourly intervals to send the notifications.

Save the changes when ready.

HQN2 12.png

[edit] Steps Configuration

Move to the next tab - 'Disk' to define steps conforming to which the usage will be verified.

Press 'Add Step' to begin.

HQN2 13.png
  • Start with selecting a Unit type: 'MB', 'GB', 'TB' or 'Percentage' .
  • Provide numerical value, e.g.: 20 (depending on the unit selected it will be: 20MB, 20% etc.)
  • Period - enter a number of days when the service usage will be counted.
  • Email Template - select one per single step, if you choose 'default' then the one selected at the rule configuration will be used. Choose 'None' to disable the option.
  • Ticket Template - if you want to notify a client in form of an opened ticket, select the template here or set to 'None' to disable.
  • Ticket Status - select a ticket status that will be set after opening a ticket.
  • Action - you may automatically 'Terminate' or 'Suspend' a service once selected limit has been reached.
    Set to 'None' if you do not want to trigger any action on the service.
HQN2 14.png
Surely, you may add more steps for the same rule and force different actions on the services.

You may edit the steps if needed or delete them.

HQN2 15.png
Configure the steps for 'Bandwidth' usage limits in the very same way as in case of the described above 'Disk'.
HQN2 16.png

[edit] Calculation Methods

As mentioned above, there are three calculation types available: 'Fixed', 'Tiered' and 'Basic'. We will try to explain the main differences between them and show an example of a full calculation.
  • Fixed type - resource usage calculated within a selected time period defined in the 'Period (Days)' field.
  • Tiered type - full amount of resource usage.
  • Basic type - calculating resource overages, based on the current data from the WHMCS disk space and bandwidth overage billing.
Look at the table below to see the differences between these three types.
Day Total Usage Daily Usage
Day 1 10 MB 10 MB
Day 2 30 MB 20 MB
Day 3 40 MB 10 MB
Day 4 45 MB 5 MB
Where:
  • Daily Usage - Refers to the total usage recorded within a single day, it is the difference between the total usage of the current day and the total usage of the previous day.
  • Total Usage - Represents the aggregated data usage up to the present moment, displayed on the product page or in the billing summary ("Overage Billing").
  • For Fixed type:
    Period: Last 3 days
    Value: 30 MB
    Take the three last values from the Daily Usage column, the sum of 20, 10 and 5 gives 35.
    30 MB limit has been exceeded during 3 days, therefore a notification is sent.
  • For Tiered type:
    Value: 40 MB
    Take the sum of values from the entire Daily Usage column, 45 MB in this case.
    40 MB limit has been exceeded, therefore a notification is sent.
  • For Basic type:
    Period: 4th day
    Value: 45MB
    The administrator will see the same data as displayed on the product page, based on the WHMCS disk space and bandwidth overage billing feature (the module fetches the value from the tblhosting usage database table).
    On the fourth day, the displayed usage value will equal, in this example, to: 45 MB from the Total Usage column.
Apart from the calculation type, you must also select a unit - MB, GB, TB or percentage.
  • If you select any of MB, GB, TB and 20 as value, such amount of resource usage will be taken into consideration for every assigned product.
  • If you select 'Percentage' and 20 as value, then 20% of the set in WHMCS soft limit will be taken into consideration for every assigned product.
    For example, if in WHMCS the service limit is set to 100 MB, then 20% calculated from 100 gives 20 MB - this amount of resource will be considered for this single product.

[edit] Ticket Templates

The 'Ticket Templates' section gives you the opportunity to create as many templates that will be used to open informative tickets as needed.
Press 'Add Ticket Template' to create one.
HQN2 17.png
Type in the ticket template name, select a support department and support administrator to which the ticket will be automatically assigned.

When ready, save changes.

HQN2 18.png
You will be immediately moved to the template configuration page where you can again rename it as well as change the department.
HQN2 19.png

[edit] Ticket Template Translations

Next, you need to proceed to the 'Template Translation' section. There you can provide the content of the template.

Press 'Add Template Translation'.

HQN2 21.png
Enter a template name, select language and type in the text in the 'Message' text field.
If you select default language, then this template will be used in case there is no translation in the client's language.
HQN2 22.png
There are numerous merge fields that you may use in the message to make it full and most informative.
As you can see at the bottom, there is a list of special merge fields particularly designated for notifications. These are:
  • Notification Limit - displays the allowed resource usage limit.
  • Notification Usage - stands for the current resource usage of the client service.
  • Notification Kind - returned as Bandwidth or Usage.
  • Notification Unit - returned as MB, GB or TB.
  • Notification DifferenceUsageAndLimit - amount by which the limit has been exceeded.
  • Notification PeriodDays - period of days when the usage is verified defined for 'Fixed' type.
HQN2 23.png
Use action buttons to edit or delete the template translations.
HQN2 24.png
That is what such an automatically opened ticket may look like in your client area.
HQN2 24 1.png

[edit] Services

Another section that we need to draw your attention to is called 'Services'.
You will find there products which are included in any of your configured rules with disk or bandwidth usage.

Press the icon marked on the screen below and you will get details on the current resource usage of the service per each day.

HQN2 25.png
Check out the statistics on the disk and bandwidth usage per single product.

Please note that WHMCS updates the quote and traffic load once a day only.

HQN2 26.png

[edit] Logs

Under the 'Logs' page you can view information about sent notifications via email, opened tickets, errors, performed actions etc.
HQN2 27.png

[edit] Use Cases

In this section, you will find real-world examples of how to use the module's features.

Check out the scenarios below to see the module in action.

[edit] Monitor Resource Usage

Hosting Quota Notifications For WHMCS can be used to help your clients monitor their resource usage.

Follow this example to set up special notifications, that will be sent out whenever a client rapidly depletes a large amount of bandwidth or disk space.

Start by creating a rule. Open the addon and navigate to 'Rules' 'Add Rule'.
HQN2 30 1.png
Name the rule, select the 'Fixed' rule type, and pick the products you want to include.
HQN2 30 1 1.png
Use the 'Edit Rule' button to specify the details.
HQN2 30 2.png
Move to the 'Disk' or 'Bandwidth' tab, depending on what you want the notification to be on and 'Add Step'.
You can also do both, simply repeat the process for the other tab.
HQN2 30 3.png
Focus on 'Value', 'Unit' and 'Period' first.

With the settings shown on the following screen, the notification will be sent every time the usage exceeds 10 GB in a day.
Change those three fields to fit the needs of your client, for example, you could use the 'Percentage' type, the value of '50' and the period of '3' to have the clients notified whenever half of their disk gets filled within three days, etc.

HQN2 30 4.png
Next, select an email template or a ticket template to be used for this rule.
If you included a ticket template, select a ticket status as well.
Note: If you have not already, take a look at the default email template described in the 'Tips' section. The included merge fields can be of use when composing custom email templates.

You can include multiple steps to the rule in both the disk and bandwidth tab, to create a tiered notification system.
If the 'Period' value is relatively low the notifications will help your clients react to sudden peaks in resource usage.
Remember to enable the rules when ready.

HQN2 30 5.png

[edit] Exceeded Bandwidth Usage

When clients get close to their usage bandwidth limit. It is crucial to make them aware of the fact. Hosting Quota Notifications For WHMCS can help you do just that.

See the use case below, on how to set up example rules for this scenario.

Start by creating a rule. Open the addon and navigate to 'Rules' 'Add Rule'.
HQN2 30 1.png
Name the rule, select the 'Basic' rule type, and pick the products you want to include.
HQN2 30 6.png
Use the 'Edit Rule' button to specify the details.
HQN2 30 7.png
Move to the 'Bandwidth' tab and 'Add Step'.
HQN2 30 8.png
Select the 'Percentage' unit, and 'Value' close to 100.

We recommend setting three steps at 80, 90, and 99 percent.

HQN2 30 9.png
Next, select an email template or a ticket template to be used for this rule.
If you included a ticket template, select a ticket status as well.
Note: If you have not already, take a look at the default email template described in the 'Tips' section. The included merge fields can be of use when composing custom email templates.

The notifications will help your clients make sure they have enough bandwidth for their needs.

HQN2 30 10.png
Remember to enable the rules when ready.
HQN2 30 11.png

[edit] Automatic Suspension

Hosting Quota Notifications For WHMCS can automatically suspend or terminate the service of clients that used up all of their resources.

Follow this example to set up an additional rule to perform the suspension automatically.

Start by creating a rule. Open the addon and navigate to 'Rules' 'Add Rule'.
HQN2 30 1.png
Name the rule, select the 'Basic' rule type, and pick the products you want to include.
HQN2 30 13.png
Move to the 'Bandwidth' tab and press 'Add Step' button.
HQN2 30 8.png
Focus on 'Value', 'Unit' and 'Action' first.

Set 'Unit' to 'Percentage', 'Value' to '100', and 'Action' to 'Auto-Suspend' or 'Auto-Terminate'.

HQN2 30 15.png
Next, select an email template or a ticket template to be used for this rule.
If you included a ticket template, select ticket status as well.
Note: If you have not already, take a look at the default email template described in the 'Tips' section. The included merge fields can be of use when composing custom email templates.

Here is an example email for this situation.

HQN2 30 15 1.png
Remember to enable the rule when ready.
HQN2 30 16.png

[edit] Tips

1. There is one default email template that may be used to send email notifications. Find 'Service Usage Limits Notification' at WHMCS → Setup → Email Templates → Product/Service Messages.

You may edit the template freely, using special merge fields and create new ones on its basis. Allowed module special merge fields:

  • {$kind} - stands for bandwidth or usage.
  • {$limit} - allowed resource usage limit.
  • {$unit} - MB,GB or TB.
  • {$usage} - current resource usage of the client.
  • {$differenceUsageAndLimit} - amount by which the limit has been exceeded.
  • {$periodDays} - period of days defined for 'Fixed' type.
HQN2 30.png
That is what the email message may look like when delivered:
HQN2 28.png
2. When configuring a ticket template you need to select an admin to which it will be assigned. However, the ticket will be automatically opened by a randomly selected administrator.
3. There is the possibility to limit 'Logs' to a particular number of days. With the following cron command, you can delete 'Logs' older than X days.
As an example, we want to remove 'Logs' older than 2 days. Of course, you can provide any number of days.
php -q /yourWHMCS/modules/addons/hosting_quota_notifications/cron/cron.php DeleteLogs --older-than 2 

Please remember that if you do not define a number of days, the cron task will automatically set the default number of days which is 1. It means that 'Logs' older than 1 day will be removed.

[edit] Update Instructions

An essential guidance through the process of updating the module is offered here.
Important: If you are updating your Hosting Quota Notifications module form version 1.0.0 to 1.1.0 please be noted that all data except logs will be migrated.

Keep in mind that 'Groups' used in version 1.0.0 have now been renamed to 'Rules'.

[edit] Upgrade Guide

Seeking a solution that offers greater flexibility, customization tailored to your precise needs, and unrestricted availability?
There is an option that not only proves to be cost-effective in the long run but also includes prioritized support services, making it a truly valuable investment.

Opt for the Open Source version of your Hosting Quota Notifications For WHMCS module to unlock these benefits.
Simply click on either the Get Source Code or Upgrade To Lifetime button found on the product's page in our client area to complete the one-step upgrade process, with a dedicated discount already applied.

Follow a comprehensive guide covering the transition process, the advantages it brings, and step-by-step instructions on what to do next after the order has been successfully finalized.

[edit] Common Problems

1. When you have problems with connection, check whether your SELinux or firewall does not block ports.
2. We do not recommend using Hosting Quota Notifications For WHMCS module either with Multibrand For WHMCS or with Resellers Center For WHMCS.

Integration between these modules is hampered due to specific features of each one of them and their individual work flow.

Navigation
WHMCS Modules
WHMCS Widgets
Translations
cPanel Modules
General
FAQ
Community
Hosting Quota Notifications For WHMCS