Getting Started

Servers

Sites

APIs

Need Help…

Working with shell scripts

Unlike other server monitoring tools, Pulse does not require you to disclose your SSH credentials or install compiled agents to gather monitoring data. Instead, Pulse generates a bespoke shell script that is directly tailored to your server profile.

This script only monitors what you've asked of it and nothing else. In addition, it uses a set of commands that are common to almost all Unix-like distributions and which do not require any elevated permissions in order to run.

This approach makes it incredibly easy to set up Pulse on your server, while also providing the flexibility to alter the commands should your server not support one or more of the defaults used by Pulse.

Downloading the script

You can download an up-to-date copy of the shell script for your server by visiting your server profile page and clicking the 'Download File' link in the header mast.

Installing the script

The next step, is to copy the file over to your server. There are a variety of methods for doing this, but the simplest is to use the scp command like so:

scp /path/to/script.sh [email protected]:/path/to/destination.sh

Since the script does not require any elevated permissions, you are free to save it anywhere your account has permission to write files to.

Pulse assumes that you have some prior experience of working with servers. If you're new to this sort of thing, you may wish to first familiarise yourself with the basics of shell scripts, SSH, copying files to servers etc.

The final step is to make your script executable, which you can do like so:

chmod +x /path/to/script.sh

Scheduling your script to run

Now that your script is copied to your server and has permission to execute, its time to tell your server to run it at a set interval so that it routinely sends data to Pulse.

We'll make use of the built-in cron service for this.

If you're using a server management tool / service that includes a scheduling feature e.g. Laravel Forge, you could instead use that to execute the script.

First, open crontab using the following command:

crontab -e

Select your preferred text editor if required, then you'll be able to add entries. Move to the bottom of the file, and add the following text on a new line:

*/2 * * * * /path/to/script.sh > /dev/null 2>&1

This command tells cron to run the script every two minutes, which is the correct frequency Pulse expects when receiving data from a server. It also redirects the output to null, which prevents cron emailing it to the server owner.

Please note that the user account that will be running the script MUST have permission to execute cron jobs. If your account does not permit it, consider instructing cron to run the script as another user:

Finally, wait a few minutes, then refresh your server profile page and you should see the data reflected in the header and monitoring configuration table.