(1) Reinstall the Agent

Start off by going to your Uptime Monitors page in your client area dashboard. Here, you will need to go to the action drop-down menu of the uptime monitor and select ‘Monitoring Agent Package’.

A modal will open containing the installation code, which you’ll need to copy and run as ‘root’ on the server you wish to reinstall the client on.


(2) Update the Agent

Keeping your Agent up to date is always a good idea, so you can always take advantage of all of the latest features.

Updating your agent to the latest version is as easy as running the following command as ‘root’ on your server:

wget https://raw.githubusercontent.com/hetrixtools/agent/master/hetrixtools_update.sh && bash hetrixtools_update.sh

This will download and run our ‘update agent’ script, which can be inspected on our GitHub page, here:
https://github.com/hetrixtools/agent/blob/master/hetrixtools_update.sh

The ‘update agent’ script will fetch our latest agent from GitHub while preserving all of your existing configurations from your old agent.

This way, you can update multiple agents on different servers with the same command, run this update command programmatically, or even have it on a cronjob to automatically update your agent periodically.

Please note that the ‘update agent’ script is a stand-alone script, and it isn’t downloaded, installed, or used by our Agent in any way. It will always have to be manually or programmatically triggered by the end-user on their server(s).

We’ve intentionally not built an auto-update feature into our agent.


(3) Remove the Agent

In order to remove the Agent from your server, you’ll need to run the ‘uninstall’ code provided by our platform. Just like in the first chapter of this article, go to the drop-down action menu of your uptime monitor, and click on ‘Monitoring Agent Package’.

On the pop-up modal click the ‘Uninstall Agent’ button located at the bottom.

You’ll be presented with the command line that you’ll need to run as ‘root’ to completely uninstall and remove our Agent from your server.

Once you complete running the uninstall code on your server, be sure to click on the ‘Remove Agent’ button at the bottom of the modal in the picture above so the Server Monitoring Agent will be detached and removed from the Uptime Monitor it was attached to, on our platform.


Notes:

Tagged: