Check whmcs-status

Overview

WHMCS (Web Host Manager Complete Solution) is a billing, support and automation platform designed primarily for web hosting companies and service providers. This check plugin returns the health status of a WHMCS server via its HTTP-based API, using the GetHealthStatus API endpoint.

Configuring API acceess and creating an API user in WHMCS is a bit tedious. First, allow IP Addresses to connect to WHMCS:

Then create an administrator role with „API Access“:

Create an Administrator User with Role „API Access“:

Create API Credentials:

Note the api_identifier and the api_secret. You will need both to configure this plugin.

Fact Sheet

Check Plugin Download

https://github.com/Linuxfabrik/monitoring-plugins/tree/main/check-plugins/whmcs-status

Check Interval Recommendation

Every 15 minutes

Can be called without parameters

Yes

Compiled for

Linux, Windows

Help

usage: whmcs-status [-h] [-V] --identifier IDENTIFIER [--insecure]
                    [--no-proxy] [-p PASSWORD] --secret SECRET [--test TEST]
                    [--timeout TIMEOUT] [--url URL] [--username USERNAME]

Returns the health status of a WHMCS server using its HTTP-based API.

options:
  -h, --help            show this help message and exit
  -V, --version         show program's version number and exit
  --identifier IDENTIFIER
                        WHMCS API identifier. Default: None
  --insecure            This option explicitly allows to perform "insecure"
                        SSL connections. Default: False
  --no-proxy            Do not use a proxy. Default: False
  -p, --password PASSWORD
                        HTTP basic auth password.
  --secret SECRET       WHMCS API secret. Default: None
  --test TEST           For unit tests. Needs "path-to-stdout-file,path-to-
                        stderr-file,expected-retc".
  --timeout TIMEOUT     Network timeout in seconds. Default: 8 (seconds)
  --url URL             WHMCS API URL. Default: http://127.0.0.1:8080
  --username USERNAME   HTTP basic auth username.

Usage Examples

./whmcs-status --identifier=myidentifier --secret=linuxfabrik --url=https://whmcs.example.com

Output:

There are 4 messages, ordered by severity.

* WHMCS: Please upgrade to the latest version: 8.12.0 You can learn about performing an upgrade in our documentation. (error) [WARNING]
* WHMCS: Module debugging is currently enabled. We recommend that you disable this when you finish debugging. Continuous use may degrade performance. For more information, see our documentation. (warning) [WARNING]
* WHMCS: We have detected that your WHMCS installation is currently using the default template names for one or more of the active templates. If you have made any customisations, we strongly recommend creating a custom template directory to avoid losing your customisations the next time you upgrade.You are currently using a default template in the following locations: *Cart*. Please review our documentation on making a custom theme for help doing this. (warning) [WARNING]
* PHP: Your PHP version *8.1.31* is supported by WHMCS. Your PHP version does not receive regular updates but is the latest supported by WHMCS. (info)

States

  • WARN if messages with a status greater than „info“ are returned.

Perfdata / Metrics

There is no perfdata.

Credits, License