Personal tools
Namespaces

Variants
Actions

Hosting Quota Notifications For WHMCS

From ModulesGarden Wiki
(Difference between revisions)
Jump to: navigation, search
Line 4: Line 4:
 
=About [https://www.modulesgarden.com/products/whmcs/hosting-quota-notifications 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 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 Resource 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;"|✔ Configure Notification Rules:
 
|}
 
|}
 
{|
 
{|
|style="padding: 0px 0px 0px 45px;"|✔ Fixed - Define Usage Grow Over Time
+
|style="padding: 0px 0px 0px 45px;"|✔ Enable/Disable Notification Rules
 
|}
 
|}
 
{|
 
{|
|style="padding: 0px 0px 0px 30px;"|✔ Assign Multiple Products To Single Notification Group
+
|style="padding: 0px 0px 0px 45px;"|✔ Choose Between Two Types Of Exceedance Calculation:
 
|}
 
|}
 
{|
 
{|
|style="padding: 0px 0px 0px 30px;"|✔ Assign Email Templates Per Notification Group
+
|style="padding: 0px 0px 0px 60px;"|✔ Tiered - Define Tiers Of Resource Usage
 
|}
 
|}
 
{|
 
{|
|style="padding: 0px 0px 0px 30px;"|✔ Enable/Disable Notification Groups
+
|style="padding: 0px 0px 0px 60px;"|✔ Fixed - Define Resource Usage In Specific Time Periods
 
|}
 
|}
 
{|
 
{|
|style="padding: 0px 0px 10px 30px;"|✔ View Logs Of Sent Notifications
+
|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 30px;"|✔ Configure Multiple Steps Per Disk And Bandwidth Rule:
 +
|}
 +
{|
 +
|style="padding: 0px 0px 0px 45px;"|✔ Define Resource Exceedance 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 Resource Usage Calculation For Fixed Rule Step
 +
|}
 +
{|
 +
|style="padding: 0px 0px 0px 45px;"|✔ Define Action Taken Upon Resource Value Exceedance:
 +
|}
 +
{|
 +
|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 45: Line 104:
 
|}
 
|}
 
{|
 
{|
|style="padding: 0px 0px 30px 30px;"|✔ Supports WHMCS V7
+
|style="padding: 0px 0px 30px 30px;"|✔ Supports WHMCS V7.2 And Later
 
|}
 
|}
  
Line 61: Line 120:
 
|}
 
|}
 
{|
 
{|
|style="padding: 0px 0px 10px 15px;"|'''2. In the downloaded file you will find two packages that support different PHP versions.'''<br/>As presented on the screen below, the first one is dedicated to PHP 5.6 up to PHP 7.0, while the second one is aimed at PHP 7.1 up to PHP 7.2.<br/>It does not apply to open source versions.<br/>
+
|style="padding: 0px 0px 15px 15px;"|'''2. In the downloaded file you will find two packages that support different PHP versions.'''<br/>As presented on the screen below, the first one is dedicated to PHP 5.6 up to PHP 7.0, while the second one is aimed at PHP 7.1 up to PHP 7.2.<br/>It does not apply to open source versions.<br/>
'' '''Note''': You can check the current PHP version in your WHMCS. To do so, proceed to ''' 'Utilities' 'System' 'PHP Info'.'''
+
'' '''Note''': You can check the current PHP version in your WHMCS. To do so, proceed to ''' 'Utilities' 'System' 'PHP Info'.'''
 
|}
 
|}
 
{|
 
{|
Line 72: Line 131:
 
|}
 
|}
 
{|
 
{|
|style="padding: 0px 0px 20px 25px;"|[[File:drfere.png]]
+
|style="padding: 0px 0px 20px 25px;"|[[File:HQN2_2_1.png]]
 
|}
 
|}
 
{|
 
{|
Line 87: Line 146:
 
{|
 
{|
 
|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]]
 
|}
 
|}
  
Line 95: Line 161:
 
|}
 
|}
 
{|
 
{|
|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;"|'''7. In the next step you need to permit access to this module.'''<br />
 
|style="padding: 0px 0px 15px 15px;"|'''7. 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 on '' '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;"|'''8. You have just successfully installed Hosting Quota Notifications For WHMCS!'''<br />
 
|style="padding: 0px 0px 15px 15px;"|'''8. You have just successfully installed Hosting Quota Notifications For WHMCS!'''<br />
You can access your module in '' 'Addons' '' → '' 'Hosting Quota Notifications' ''.
+
You can access your module at '' 'Addons' '' → '' 'Hosting Quota Notifications'. ''
 
|}
 
|}
 
{|
 
{|
|style="padding: 0px 0px 30px 25px;"|[[File:HQN_7.png]]
+
|style="padding: 0px 0px 20px 25px;"|[[File:HQN2_7.png]]
 +
|}
 +
{|
 +
|style="padding: 0px 0px 15px 15px;"|'''9. The last thing you still need to do before starting to use the moduel 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 30px 25px;"|[[File:HQN2_8.png]]
 
|}
 
|}
  
 
=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==
+
 
 +
==Rules==
 
{|
 
{|
|style="padding: 10px 0px 15px 15px;"|In '' 'Configuration' '' page you can find the list of configured notification groups.<br />
+
|style="padding: 10px 0px 20px 15px;"|The first section allows to prepare numerous rules according to which the services resource usage will be monitored and calculated and then adequate notifications sent.
You can enable/disable any of them, as well as alter or completely remove them.<br />
+
Press '' 'Create New Group' '' to proceed.
+
 
|}
 
|}
 
{|
 
{|
|style="padding: 0px 0px 20px 25px;"|[[File:HQN_9.png]]
+
|style="padding: 0px 0px 20px 25px;"|[[File:HQN2_9.png]]
 
|}
 
|}
 +
===Rule Configuration===
 
{|
 
{|
|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 15px 15px;"|Let us begin with creating an exemplary rule according to which disk usage of selected service will be checked.<br/> Press '' 'Add Rule'. ''
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_10.png]]
 
|}
 
|}
 
{|
 
{|
|style="padding: 0px 0px 15px 15px;"|For example, shown below module uses fixed counting type.<br />
+
|style="padding: 0px 0px 15px 15px;"|Start with  typing a custom name, selecting the usage calculating type: '' 'Tiered' '' or '' 'Fixed' '' (read more about these two methods [[#Calculating Method | here]] )<br/> Select your products that this rule will cover.
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_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' '' or '' 'Fixed' ''
 +
*Assign products from available
 +
*Select a default email template that will sent to a client with 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.
 +
*Set notification hourly interval 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 (Days) - '''(Fixed type only)'''
 +
*Email Template - Select one per single step, if you choose '' 'default' '' then the one selected at the rule configuration will be used. Set to '' 'None' '' to disable the option.
 +
*[[#Ticket Template|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
 +
*Action - You may automatically '' 'Terminate' '' or '' 'Suspend' '' a service once selected limit has been reached.<br/> Set to '' 'None' '' to disable the option.
 +
|}
 +
{|
 +
|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.
 +
|}
 +
{|
 +
|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 describe above '' 'Disk'. ''
 +
|}
 +
{|
 +
|style="padding: 0px 0px 30px 25px;"|[[File:HQN2_16.png]]
 +
|}
 +
 +
====Calculation Methods====
 +
{|
 +
|style="padding: 10px 0px 5px 15px;"|There are two calculation types available: '' 'Fixed' '' and '' 'Tiered'. '' We will try to explain now the main difference 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
 +
|}
 +
{|
 +
|style="padding: 0px 0px 5px 15px;"|Take a look at the table below to see the differences between the two types.
 +
|}
 +
{|class="wikitable"
 +
! Period
 +
! Fixed
 +
! Tiered
 +
|-
 +
|Day 1
 +
|10 MB
 +
|10 MB
 +
|-
 +
|Day 2
 +
|20 MB
 +
|30 MB
 +
|-
 +
|Day 3
 +
|10 MB
 +
|40 MB
 +
|-
 +
|Day 4
 +
|5 MB
 +
|45 MB
 +
|-
 +
|}
 +
{|
 +
|style="padding: 0px 0px 10px 15px;"|For '''Fixed''' type:<br/>
 +
Period: - 3 days<br/>
 +
Value: 30 MB<br/>
 +
Take three last values from the table (Fixed column), sum 20, 10 and 5.<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 table (Tiered column, the last row), 45 MB in this case.<br/> 40 MB limit has been exceeded, therefore a notification is sent.
 +
|}
 +
{|
 +
|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 will give 20 MB - this amount of resource will be considered for this single product.
 +
|}
 +
 +
==Ticket Templates==
 +
{|
 +
|style="padding: 10px 0px 15px 15px;"|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/>
 +
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 and 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 the template name, select language and type in the text in the '' 'Message' '' text field.<br/> If you select default language, then this template will used in case there is no translation 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.
 +
|}
 +
{|
 +
|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 30px 25px;"|[[File:HQN2_24.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 service usage of the servicer 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 WHCMS 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 '' '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==
+
 
 +
==Home==
 
{|
 
{|
|style="padding: 10px 0px 15px 15px;"|You can create as many notifications as you wish.<br />
+
|style="padding: 10px 0px 15px 15px;"|Dashboard of the addon includes statistics on the actions attempts, either successful or failed. <br/>
The only requirement is their type being set to '' 'Product/Service' ''.<br />
+
Take a quick look at the number of emails sent, tickets opened and products suspended or terminated in the provided time periods.
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.
+
 
|}
 
|}
 
{|
 
{|
|style="padding: 0px 0px 30px 25px;"|[[File:HQN_13.png]]
+
|style="padding: 0px 0px 30px 25px;"|[[File:HQN2_29.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 onse on its basis. Allowed module special merge fields:
 +
*{$kind} - stands for badwidth or usage
 +
*{$limit} - allowd 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 how the email message may look like when delivered:
 +
|}
 +
{|
 +
|style="padding: 0px 0px 20px 25px;"|[[File:HQN2_28.png]]
 +
|}
 +
{|
 +
|style="padding: 0px 0px 30px 15px;"|2. When configuring a ticklet template you need to select an admin to which it will be assigned. However, the ticket will be automatically opened by a randomly selected administartor.
 
|}
 
|}
  
 
=Update Instructions=
 
=Update Instructions=
 
{|
 
{|
|style="padding: 10px 0px 30px 15px;"|Essential guidance through the process of updating the module is offered '''[https://www.docs.modulesgarden.com/How_To_Update_WHMCS_Module here]'''.<br/><br/>
+
|style="padding: 10px 0px 10px 15px;"|Essential guidance through the process of updating the module is offered '''[https://www.docs.modulesgarden.com/How_To_Update_WHMCS_Module here]'''.<br/><br/>
 
Keep in mind there is a quick and easy option in our client area that will let you upgrade the license of your module to an open source version at any time - and at a lower price!<br/>
 
Keep in mind there is a quick and easy option in our client area that will let you upgrade the license of your module to an open source version at any time - and at a lower price!<br/>
 
To take advantage of it, simply use the '''License Upgrade''' button located on the product's page and a discounted invoice will be generated automatically.<br/>
 
To take advantage of it, simply use the '''License Upgrade''' button located on the product's page and a discounted invoice will be generated automatically.<br/>
 
|}
 
|}
 +
{|
 +
|style="padding: 0px 0px 30px 15px;"|'''Important'''<br/>
 +
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 naw been renamed to '' 'Rules'. ''
 +
|}
 +
 
=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 30px 15px;"|'''1. When you have problems with connection, check whether your SELinux or firewall does not block ports.'''
 
|}
 
|}

Revision as of 17:01, 12 September 2018

Contents

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 Resource Usage:
✔ By Email
✔ By Ticket
✔ Configure Notification Rules:
✔ Enable/Disable Notification Rules
✔ Choose Between Two Types Of Exceedance Calculation:
✔ Tiered - Define Tiers Of Resource Usage
✔ Fixed - Define Resource Usage In Specific Time Periods
✔ Assign Multiple Products To Single Notification Rule
✔ Assign Default Email Template
✔ Define Hours Interval Of Notification
✔ Configure Multiple Steps Per Disk And Bandwidth Rule:
✔ Define Resource Exceedance 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 Resource Usage Calculation For Fixed Rule Step
✔ Define Action Taken Upon Resource Value Exceedance:
✔ 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 5.6 Up To PHP 7.2
✔ Supports WHMCS V7.2 And Later

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.

Installation

1. Log in to our client area and download the module.
HQN 1.png
2. In the downloaded file you will find two packages that support different PHP versions.
As presented on the screen below, the first one is dedicated to PHP 5.6 up to PHP 7.0, while the second one is aimed at PHP 7.1 up to PHP 7.2.
It does not apply to open source versions.

Note: You can check the current PHP version in your WHMCS. To do so, proceed to 'Utilities' → 'System' → 'PHP Info'.

PHP56 72.png
3. Extract the downloaded file and choose the one with the right PHP version. Upload and extract the PHP file into the main WHMCS directory.

The content of PHP version files 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 'license_RENAME.php' file.

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 a 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

Configuration of Addon

6. 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 'Activate' button.

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

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

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

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

HQN2 7.png
9. The last thing you still need to do before starting to use the moduel 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

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.

Rules

The first section allows to prepare numerous rules according to which the services resource usage will be monitored and calculated and then adequate notifications sent.
HQN2 9.png

Rule Configuration

Let us begin with creating an exemplary rule according to which disk usage of selected service will be checked.
Press 'Add Rule'.
HQN2 10.png
Start with typing a custom name, selecting the usage calculating type: 'Tiered' or 'Fixed' (read more about these two methods here )
Select 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' or 'Fixed'
  • Assign products from available
  • Select a default email template that will sent to a client with 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.
  • Set notification hourly interval to send the notifications.

Save the changes when ready.

HQN2 12.png

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 (Days) - (Fixed type only)
  • Email Template - Select one per single step, if you choose 'default' then the one selected at the rule configuration will be used. Set to '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
  • Action - You may automatically 'Terminate' or 'Suspend' a service once selected limit has been reached.
    Set to 'None' to disable the option.
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.

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

Calculation Methods

There are two calculation types available: 'Fixed' and 'Tiered'. We will try to explain now the main difference 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
Take a look at the table below to see the differences between the two types.
Period Fixed Tiered
Day 1 10 MB 10 MB
Day 2 20 MB 30 MB
Day 3 10 MB 40 MB
Day 4 5 MB 45 MB
For Fixed type:

Period: - 3 days
Value: 30 MB
Take three last values from the table (Fixed column), sum 20, 10 and 5.
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 table (Tiered column, the last row), 45 MB in this case.
40 MB limit has been exceeded, therefore a notification is sent.

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 will give 20 MB - this amount of resource will be considered for this single product.

Ticket Templates

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.

Save changes.

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

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 the template name, select language and type in the text in the 'Message' text field.
If you select default language, then this template will used in case there is no translation 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.
HQN2 23.png
Use action buttons to edit or delete the template translations.
HQN2 24.png

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 service usage of the servicer per each day.

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

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

HQN2 26.png

Logs

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

Home

Dashboard of the addon includes statistics on the actions attempts, either successful or failed.

Take a quick look at the number of emails sent, tickets opened and products suspended or terminated in the provided time periods.

HQN2 29.png

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 onse on its basis. Allowed module special merge fields:

  • {$kind} - stands for badwidth or usage
  • {$limit} - allowd 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 how the email message may look like when delivered:
HQN2 28.png
2. When configuring a ticklet template you need to select an admin to which it will be assigned. However, the ticket will be automatically opened by a randomly selected administartor.

Update Instructions

Essential guidance through the process of updating the module is offered here.

Keep in mind there is a quick and easy option in our client area that will let you upgrade the license of your module to an open source version at any time - and at a lower price!
To take advantage of it, simply use the License Upgrade button located on the product's page and a discounted invoice will be generated automatically.

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 naw been renamed to 'Rules'.

Common Problems

1. When you have problems with connection, check whether your SELinux or firewall does not block ports.
Navigation
WHMCS Modules
WHMCS Widgets
Translations
cPanel Modules
General
FAQ
Community
Hosting Quota Notifications For WHMCS