In this guide we’ll describe how to install our PHP Server Monitoring Agent on your shared hosting environment that’s running on the DirectAdmin control panel.
Step 1: Download the “hetrixtools_agent.php” file from GitHub and save it on your local computer.
Right-click on the link below, then select “Save Link As…”:
Step 2: Upload the “hetrixtools_agent.php” file to your webhosting DirectAdmin account.
Open up your DirectAdmin panel web interface and locate and click on your “File Manager” icon:
Now that the “File Manager” has been opened, make sure you are in the “Root” folder of your account and click on the “New Folder” button in order to create a new folder here:
Name this new folder “hetrixtools” and click on the “Create” button:
Now that the “hetrixtools” folder has been created, access it from your folder tree:
Once in the “hetrixtools” folder (which should be empty at this point), click on the “Upload File” button:
In the “Upload Files” drag and drop the “hetrixtools_agent.php” file that you have downloaded at Step1 paragraph (a) in this guide, and then click the “Upload” button:
Step 3: Edit the “hetrixtools_agent.php” file.
Go to your Uptime Monitors in your HetrixTools dashboard, and get the SID (Server ID) from the Agent Install screen:
Going back to your DirectAdmin File Manager, click the “hetrixtools_agent.php” file that you’ve uploaded earlier, and select “Edit File”:
In the text editor window, locate ” SIDPLACEHOLDER” and replace it with your SID (Server ID) that you’ve got from Step 3 paragraph (a) in this guide, then save your changes:
Step 4: Configuring the cronjob that runs the agent.
Go back to your DirectAdmin panel, and locate and click on the “Cron Jobs” icon:
On your “Cron Jobs” page, click on the “Create Cron Job” button, in order to add a new cron job to your account:
Everything should be pretty much already filled out on the next page.
You will need to fill out the “Command” field with the following line of text:
php -q /home/YOUR_DA_USERNAME/hetrixtools/hetrixtools_agent.php
(replace “YOUR_DA_USERNAME” with your actual DirectAdmin username in the command line).
Then click on the “Create” button:
Make sure not to replace your actual username in the command path, the word “username” above is just an example.
You’re all done. Our PHP Server Monitoring Agent is now installed in your DirectAdmin shared hosting account and will start sending data to our platform within 2 minutes after creating the cron job.