Installation Guide

Requirements

You will need at least one Cent OS 6 (64 bit recommended) VPS/Dedicated server with nothing else running/installed. If you would like to run checks from multiple locations you can setup additonal check servers at multiple data centers. Each check server runs MongoDB which is setup to automatically failover if one of the check servers go offline. This helps to ensure your users checks will always run. In order for the MongoDB automatic failover system to work properly, you always need an odd number of MongoDB servers. If you want to run an even number of MongoDB servers you will need to run an additional small server to run an arbiter which doesn't store any data and is simply used to help vote for a new primary if the current primary goes offline. The arbiter server doesn't require much resources so you could install it on your current WHMCS server or another server that is used for something else.

On your WHMCS server you will need to install the mongo driver which can be easily installed using pecl. You will also need to be running at least WHMCS 5.0.3 and using the new default template or a variation of it which uses the same bootstrap CSS. You can also edit the included template files to fit your theme.

 

Setting up your first check server

Please note, before proceeding with the installation, the hostname of your server needs to be set to a FQDN that resolves to the server and is setup in /etc/hosts.

  1. Login as the root user to your new CentOS 6 server. You will need wget installed in order to download the install files, if you already have wget installed you can skip the first line.
    1. yum install wget -y
    2. wget http://www.serverping.net/serverping_server.tar.gz
    3. tar xzvf serverping_server.tar.gz
    4. cd distro
    5. sh setup_first_location.sh

 

The setup script will take a few minutes to run and will automatically install all the packages and libraries needed for ServerPing to run properly. It will also setup the mongodb server for you and generated a random password for authentication. Please make note of this password as you will need to enter it into the addon module setup screen in WHMCS in the next step.

 

Setting up the WHMCS addon

 

  1. First you will need to enable the mongo php driver. If you have pecl installed on your whmcs server than all you need to do is run the following comand:
    1. pecl install mongodb
  2. After the module is installed, you will need to add the following to your php.ini in order for the module to load, be sure to restart apache after you have done this.
    1. extension=mongodb.so
  3. Next, download the ServerPing addon module to your WHMCS server using wget or you can download the file to your computer then ftp the file to the WHMCS server.
    1. wget http://www.serverping.net/serverping_whmcs.tar.gz
    2. tar xzvf serverping_whmcs.tar.gz
    3. cd serverpingwhmcs
  4. Move the modules/addons/serverping directory to your WHMCS's modules/addons/ directory. e.g.
    1. mv modules/addons/serverping /home/whmcs/public_html/modules/addons/.
  5. Move the modules/servers/serverping directory to your WHMCS's module/servers/ directory. e.g.
    1. mv modules/servers/serverping /home/whmcs/public_html/modules/servers/.
  6. Finally, active the module by logging into your WHMCS's admin area by clicking on Setup->Addon Modules, then click activate next to ServerPing.
  7. Once you have activated SeverPing
    1. Enter in the hostname for your first check server in the MongoDB Hostnames field.
    2. Paste in the automatically generated MongoDB password from your first check server in the MongoDB Password field.
    3. Paste in your license key provided by ServerPing in the license key field.
    4. Check which admin groups should have access to the admin interface of ServerPing and click Save Changes.

 

Configuring ServerPing

  1. After the module has been activated, you can access ServerPing's admin screen by clicking on Addons than ServerPing.
  2. Follow the instructions on the configuration screen and click save changes.
  3. In order for the check servers to run properly, you will need to refresh the license file on the server, to do this click on Refresh License.
  4. Click on Manage Check Servers, from this screen you will be able to name your first check server, we recommend naming it after the location of the data center it resides in, e.g. Dallas, TX USA.
  5. After all of your configuration settings have been saved, you will need to restart the php processes on every check server. This can be done by sshing to each server and running the following command:
    1. supervisorctl reload

 

Adding additional check servers

Before adding additional check servers, make sure you have installed the WHMCS module and refreshed your licenses as instructed above or this process will fail. The default license for ServerPing allows you to install up to nine check servers.

  1. First you most decide if you want the new check server to be a part of your MongoDB replica set. It is recommended that three of your check servers be a part of the replica set to ensure a redundant database setup. Any additional check servers you can install without MongoDB in order to conserve resources. Please contact us if you need help planning which servers will be a part of the replica set.
  2. Setup your new CentOS 6 server with nothing else installed or running on it other than the standard packages CentOS comes with. You also need to ensure that the hostname is a fully qualified domain and the dns records are in place before proceeding.
  3. SSH into your first check server you setup as the root user and execute the following command, replacing server2.domain.com with the fully qualified hostname of your new Cent OS 6 server.
  4. cd /home/serverping/serverping
  5. If this check server will be a part of the MongoDB replica set, run the following command
  6. sh setup_additional_location.sh server2.domain.com
  7. If you do not wish for the new check server to be a part of the MongoDB replica set, run the following command instead:
  8. sh setup_additional_location_without_mongo.sh server2.domain.com
  9. Follow the instructions on screen for setting up public/private key authentication and then continue with the install script.
  10. After the install script has ran successfully, login to the WHMCS Admin Area and go to Addons->ServerPing, then click Manage Check Servers to enter a name for your new check server and click activate to add it to the rotation.
  11. Lastly if you made this server part of the MongoDB replica set, you will need to add the servers hostname into the MongoDB hostnames field in the WHMCS module configuration screen, this field should be a comma separated list of your check server hostnames. This can be accessed by going to Setup->Addon Modules. We recommend restarting apache on your WHMCS server after you have saved the changes.
  12. If you made this new server part of the replica set, it is also recommend that you edit the /home/serverping/serverping/config.php file on each check server and add the new hostname to the $mongodb_hostname variable. The list of hostnames should be comma seperated.

Troubleshooting Common Issues

If after enabling the WHMCS module, when you go to Addons->ServerPing you receive a white page, This indicates an issue with either the MongoDB php extension installation or a problem connecting to the MongoDB instance on the check server. Please enable display errors in WHMCS by clicking on Setup->General Settings->Other then checking the Display Errors option then clicking save. Then go back to Addons->ServerPing and you should see a detailed error message which you can email to support@serverping.net and we can help you fix whatever is going on. Be sure and disable display errors after doing this.

Important note about MongoDB failover.

MongoDB requires an odd number of servers in order for failover to work properly. If you have an even number of check servers you will need to have an arbiter which is just small instance of MongoDB that is used to help elect a new primary if the current primary goes offline. It is important to enable/disable the arbiter as needed based on if you have an even or odd amount of MongoDB servers.

  1. Install MongoDB on a seperate server, it can run on a very small 256 MB VPS for example or on a server that you use for something else.
    1. If you are running Cent OS 5 or 6 you can use our install script that will enable and install the MongoDB packages via yum
      1. wget http://www.serverping.net/serverping_arb.zip
      2. unzip serverping_arb.zip
      3. cd serverping_arb
      4. sh serverping_arb.sh
      5. Follow the instructions on the screen for copying over your key file
    2. If you are not using Cent OS 5/6, please contact us and we can help you install the MongoDB arbiter manually.
  2. Once you have installed the arbiter, you need to enable it.
    1. SSH into one of your check servers and execute the following command, replacing arb.domain.com with the hostname of your arbiter server and the port it is installed on. If you used our install script the arbiter port is 27019
    2. cd /home/serverping/serverping
    3. sh enable_mongo_arb.sh arb.domain.com:27019
  3. If you add an additonal check server which brings you back to an odd number, you will then need to disable the arbiter.
    1. SSH into one of your check servers and execute the following command, replacing arb.domain.com with the hostname of your arbiter server and the port it is installed on. If you used our install script the arbiter port is 27019
    2. cd /home/serverping/serverping
    3. sh disable_mongo_arb.sh arb.domain.com:27019
  • 381 Корисниците го најдоа ова како корисно
Дали Ви помогна овој одговор?

Понудени резултати

Adding ServerPing Package

  Login to your WHMCS Admin Area and go to Setup->Products/Services->Products/Services...

Adding a SMS Credits Package

Login to your WHMCS Admin Area and go to Setup->Products/Services->Products/Services...

Adding ServerPing to your Client Area template

You will need to provide a link to the SeverPing module from your client area. We recommend...

System Requirements

Requirements You will need at least one Cent OS 6 (64 bit recommended) VPS/Dedicated server with...

Getting Started with ServerPing

Monitoring your servers with ServerPing is quick and easy. Setting up your alert contacts...