Automation & Ordering
Information
For most use cases, the default settings are already well-suited, so there may not be a need to adjust the overwhelming number of available options.
Open the server management module admin page ("Addons" -> "Server Manager"), click "System Configuration" -> "Automation & Ordering".
Settings Overview
The module offers a number of settings to control the automation. If you prefer to do things manually, you can disable most of the automation. In this regard, it is worth taking a look at the notification settings.
Group: Order Automation
Globally Disable Automated Provisioning
Activate this function if you want to temporarily disable the automatic provision of new orders. This overrides the product specific setting for automatic setup.
Exclude servers that are online
Servers that are unassigned but powered on will not be provisioned. Useful if you sometimes power on server for your own usage but forgot to reserve the server / unassign it from the list of available servers.
Please note that the online status is only taken into account if the power provider (e.g. IPMI) supports the polling of the current power status. Based on the power status of the server you can see if status polling is supported or not - if you see "Online (probably)", polling is not supported.
Exclude servers with pending reinstallation
If a server is currently undergoing an OS reinstallation, the server will not be provisioned. Useful if you run a post-profile after termination (e.g. disk wipe).
Exclude servers with following tags
Servers, that have at least one of the listed tags assigned, will not be used for automatic provisioning. E.g. If you specify the tag "internal", servers with the tag "internal" will not be assigned to clients.
Exclude servers where your account is not the sole owner
If the server is already assigned to another Tenantos account (i.e. to a sub-user), the server will not be used for automatic provisioning. This setting is enabled by default and we do recommend leaving it enabled.
This protects against accidentally provisioning a server, which is already assigned to a customer. This can happen due to human error if the server was forgotten to be assigned to a customer in WHMCS and the excluded server tags were not added in Tenantos.
Don't perform VPS upgrades
This prevents the automatic adjustment of VPS resources when an downgrade/upgrade order is placed.
Show matching server at order overview
Lists the matching dedicated servers on the "Manage Orders" page. Useful when testing configurable options. Enter the amount of servers which should be shown at the order overview. Set to 0 or leave it blank to disable.
For performance reasons, it's the best to show less than 10 matching servers.
Additionally a button "Explain Skipped Servers" button is available to help identify the reasons for skipped servers during matching processing.
Show server hostname at matching servers overview
Enable this option to show the hostname of the matched servers in the "Dedicated Server Finder" output. The differences is:
- On: Found matching Server (ID: 1, hostname-of-the-server-in-tenantos) for product abc.com
- Off: Found matching Server (ID: 1) for product abc.com
Don't use client hostname
Activate this function if you want to overwrite the hostname chosen by the customer with the one from Tenantos.
Override hostname if invalid
If the client provided an invalid hostname, the hostname will be automatically adjust to a valid one.
Override Client Password
Use a random generated (cryptographically secure) root password instead of the client provided password.
Windows Username
Defines the default username for Windows operating system. The username is sent out in the welcome mail and stored in the client service "username" field. The value is not used for the username inside of the operating system but defines the fixed name of the username (e.g. Administrator for english Windows versions).
Override default app username
By default, the automatically generated username of WHMCS is used for the Tenantos user account, unless WHMCS passes an empty username, then the module creates a username consisting of the static text "user" and an appended random number (e.g. user30192).
Using this option you can create your own format for the usernames and using the variables, you can set, for example, the WHMCS client ID as the username. Or the first name + WHMCS client ID.
You can use all variables from the WHMCS module parameters array which are on the first level or in the clientsdetails array. Just wrap them into "{{insert_name}}". Module parameters documentation.
If the username is already taken, the module will append some characters to the generated username until a unique username is found.
User description in app
When WHMCS does create a new account in Tenantos, the defined description will be stored in the newly created user account. As usually, the account description is only visible to you, not to the user.
The same variables are available as for the option "Override default app username".
Group: System Automation
Auto sync hostnames from app to WHMCS
Enable to automatically synchronize the hostnames of the servers in the app to WHMCS (once daily, after the cronjob).
Additionally, if the hostname is changed via the "Server Information" card of the module, the hostname will be automatically updated in the WHMCS hostname field.
Auto sync IP assignments from app to WHMCS
Enable to automatically synchronize IP addresses assigned in the app to WHMCS (once daily, after the cronjob).
Suspend & shutdown server on Bandwidth Limit
Enable to automatically suspend and shutdown the server when reaching the bandwidth limit.
Disable the entire module automation for:
The module provides several configuration options to influence the actions taken during service creation, suspension, or termination. Additionally, two more options are available:
- Disable automation for suspensions (all servers)
- Disable automation for terminations (all servers)
- Disable suspension automation only for servers with one of the following tags:
- Disable termination automation only for servers with one of the following tags:
Enabling this option is only for those who do not wish to automate the suspension or termination of services, for instance, due to custom contract arrangements.
Notes:
- The status in WHMCS will still be updated and any module notifications set up will still be triggered when a suspension/termination occurs.
- Only the automated tasks, such as suspending/terminating the server in Tenantos, will be skipped if the suspension/termination is done through the WHMCS cronjob.
- This option does not disable the automatic server shutdown/power on and switch port actions if it is enabled in the options.
- If the suspension/termination is executed by an administrator through the WHMCS admin panel, the automation will be carried out based on the settings configured in the module settings.
If you want to disable the automation completely, the following additional options can be enabled:
- Suspension: Disable Custom Event Executions (failedSuspendAccount will still be triggered)
- Suspension: Disable power and network interface actions
- Suspension: Disable service status change
- Suspension: Disable notifications
- Termination: Disable Custom Event Executions (failedTerminateAccount will still be triggered)
- Termination: Disable power and network interface actions
- Termination: Disable service status change
- Termination: Disable notifications
These options are particularly useful when you want to disable automation for a specific server or group of servers by using tag selection.
Auto shutdown server
The module can shutdown the server if the client service has been suspended or terminated. Available options:
- Shutdown server on suspension.
- Shutdown server on termination.
Auto start server on Unsuspend
Enable to automatically turn on the server after unsuspension.
On unsuspension, the module checks if the server has been already assigned to an other client. In this case, it will leave the service suspended. If you have installed WHMCS version 7.1 or higher, a log entry at the WHMCS module queue will be created. If you have ticket notifications enabled, your staff will be also informed by ticket about this issue.
Switch Interface Actions
If the server has a switch port assigned and the Advanced Switch Management is enabled, the module can automatically perform the following actions:
Action on service creation/unsuspension:
- No switch port action.
- Enable interface.
Action on service suspension:
- No Switch port action.
- Disable interface. If no switch port is available, or if the action fails, fallback to the power option.
- Disable interface and execute power action.
Action on service termination:
- No switch port action.
- Disable interface. If no switch port is available, or if the action fails, fallback to the power option.
- Disable interface and execute power action.
- Enable interface and execute power action.
Notes
- The Activity Log shows executed actions with clear information on both failed and successful actions.
- Performing switch interface actions will delay service creation, suspension, unsuspension, or termination, as the module waits for the switch port action to complete.
- Notifications for failed switch port actions are available.
- A configurable wait time (in seconds) can be set after changing the state of a switch device interface if a power action follows.
Change hostname on Create
By default, the hostname specified by the client during ordering will be used.
This option allows to override the hostname at service creation. The hostname will be updated in Tenantos and in WHMCS. If you don't want to use the hostname provided by the client, consider using the "Don't use client hostname" option as an alternative.
Additionally, variables for dynamic hostnames are available, and more information can be found by clicking on the information link in WHMCS.
Change hostname on Terminate
Same as the above option, just for termination.
Start PXE profile on Termination
The module can automatically start the selected PXE profile on service termination. This feature can be used to wipe the hard drive content of the server.
Remove additional IPs on termination
When terminating a server, the IP addresses assigned in Tenantos can be removed automatically. Three options are available, which can also be used in combination:
- Remove all additional IPv4 addresses from the server. The primary IPv4 address will not be removed.
- Remove all IPv6 subnets / addresses from the server (additional configuration available below).
- Keep one IPv6 assignment (i.e. delete all IPv6 assignments, except one).
The last option can be activated only if the second one is active. The setting has no effect if the API account (e.g. a reseller) does not have permission to remove IP assignments.
Delete RDNS records of assigned IPs
This option ensures that the RDNS entries of the previous client are no longer set. Two options are available:
- Delete RDNS entries when terminating a service.
- Delete RDNS entries when creating a service.
The deletion of RDNS entries during service creation ensures that the RDNS entries are always unset, even if a reverse DNS entry was manually set.
In addition, the option "Set default PTR entry instead of an empty entry." is available to set the configured RDNS template instead of an empty PTR record.
Stock Monitor: Recount stock after service creation/termination
Enable to recount the stock immediately after creating or terminating a service. This can increase the execution time. If disabled, the stock will be recalculated during the WHMCS cronjob, which runs every 5 minutes.
Stock Monitor: Don't count auto-setup disabled servers
If this option is enabled, servers for which automatic setup is disabled are not counted as part of the available stock. Stock Monitor must be active for the product, otherwise the setting has no effect.
More information about stock monitor.
Stock Monitor: Hide products when out of stock
This option automatically marks the product as hidden when it is out of stock. Stock Monitor must be active for the product, otherwise the setting has no effect.
More information about stock monitor.
Stock Monitor: Unhide products when in stock
This option automatically removes the hidden status from the product when it becomes available again. Stock Monitor must be active for the product, otherwise the setting has no effect.
More information about stock monitor.
Stock Monitor: Advanced Detection Modes
These settings are especially relevant if you use the same Tenantos account across multiple billing systems, otherwise, there is usually no need to enable these settings.
More information about the "Advanced Detection Modes".
Stock Monitor: Stock Monitor: Recount events
Select on which events the stock should be recounted:
- Recount stock after service creation. This can increase the execution time. (Enabled by default)
- Recount stock after service termination. (Enabled by default)
- Recount stock at each WHMCS cronjob execution. (usually each 5 minutes) (Enabled by default)
- Recount stock after the daily WHMCS cronjob execution. (Disabled by default)
Refer to the Pending orders option for an explanation of why these fine-tuning settings are available.
Stock Monitor: Pending orders
Skip recounting the stock for products where a order is pending for the defined amount of minutes.
How does this work?
This option ensures that a product is not shown as available when a client has placed an order but has not yet completed the payment. Without this setting, the stock might be updated prematurely (e.g. during a WHMCS cron job) and marked as available for other clients to purchase. This can result in multiple clients ordering the same product when there is only one unit available.
By deferring the stock recount for a specified number of minutes, the system ensures that the product remains reserved for the client who has placed the order, reducing the likelihood of conflicts in stock availability.
This option applies only to products where an order is pending for the defined number of minutes. Products where no orders are pending are still recounted.
Example
If there is 1 unit of stock and a client places an order but does not complete the payment immediately, the stock remains reserved for that client for the defined period.
Without this option, the system might make the stock available to another client before the first client has completed payment, potentially resulting in two orders for the same unit.
This option ensures that stock is held for the initial client until the payment window has passed, preventing such issues.
Group: Server Tag Management
The module can add tags to servers on various events. Tags provide a neat way to group servers and allow filtering in Tenantos.
You will notice that the default values are partially redundant. For example, Add server tags after unsuspension
: that tag should already exist because the tag is added after provisioning.
The purpose of this is to ensure that the tags are correct under all circumstances and are not stored incorrectly due to human error.
Add server tags after provisioning
The listed tags will be added after service creation.
Default: Assigned to client
Remove server tags after provisioning
The listed tags will be removed after service creation.
Default: For Rent
Add server tags after suspension
The listed tags will be added after service suspension.
Default: Suspended
Add server tags after unsuspension
The listed tags will be added after service unsuspension.
Default: Assigned to client
Remove server tags after unsuspension (additional)
The listed tags will be removed after service unsuspension. Tags from "Add server tags after unsuspension" are removed automatically.
Default: For Rent
Add server tags after termination
The listed tags will be added after service unsuspension.
Default: For Rent
Remove server tags after termination
The listed tags will be removed after service unsuspension.
Default: Assigned to client, Suspended