You can create a custom API endpoint in WHMCS by bootstrapping the system, retrieving server information from the database, and calling the TestConnection module function via WHMCS\Module\Server, then returning the results in JSON for external monitoring. https://brush-jjaemu.io