Hostbeat App logo
Hostbeat by Ruben Arrebola

Getting Started

Before starting monitoring your computers from the mobile app, you have to install the hostbeat client application in the computer. This client app sends heartbeats to the platform indicating that is online and available.

The client is currently available in the major known platforms, like Windows, MacOS and Linux. There are two different official clients, the first one is a multiplatform command line tool and the second one is an exclusive Windows App, both application do the same in different ways.

Using the CLI tool

This tutorial explains how to use the command line client tool in Linux and MacOS

Installation

Download the desired version of the tool, this is available to download in the GitHub official repository be free to choose the desired version but the higher and recent is recommended.

The correct script to install it on Linux and Mac is the install.sh script. So download, open a terminal and execute the next command:

sudo ./install.sh

Once installed, be sure to close the terminal and open a new one. And now we can interact with the hostbeat client directly, try to open the hostbeat help function executing the following command:

hostbeat --help

Now the command line client is installed and available in our machine.

Using

Here we have several options to send heartbeats with this tool. The first one is set the settings and start the daemon and let the tool sends the heartbeats with the desired interval. The second one is send one time a heartbeat and use the system cronjob to repeat the same process every x minutes.

Daemon Way

First of all set the correct configuration, we are going to set the host token, this is a unique token that identifies our computer and is available if you access to edit the host in the mobile app. So copy it and paste it:

hostbeat heartbeat config --set-token <your-big-token-goes-here/>

Now we can start the daemon using the next command, and is going to send heartbeats every minute.

hostbeat heartbeat daemon

Now if no error is returned to the command line, refresh the list on the hostbeat mobile app and you can see that the host has changed his status and is now available and online.

This way is not necessary to set any configuration because we can set it on the fly passing all necessary information as an argument. But we have to create an script file to make it available to the cron.

I recommend you to create a directory under your home with the name hostbeat-client. Create a shell file in the new directory with the name of heartbeat.sh. Inside this file put the following text and replace the text <your-big-token-goes-here/> for your host token, you can find this token in the app where you edit a host.

#!/bin/bash
PATH=/usr/local/bin/:/usr/bin:/bin
hostbeat heartbeat send --use-token <your-big-token-goes-here/>

Make the script file executable:

chmod 700 heartbeat.sh

Next we will be using the cron process to make the script get run every minute

crontab -e

Copy this text and paste it at the bottom of the crontab, save and exit. Remember to let a blank line at the end of the file.

*/1 * * * * ~/hostbeat-client/heartbeat.sh >/dev/null 2>&1

Now lets test the script:

sh ~/hostbeat-client/heartbeat.sh

Now if no error is returned to the command line, refresh the list on the hostbeat mobile app and you can see that the host has changed his status and is now available and online and a heartbeat it going to be sended every minute.

Hostbeat App logo Hostbeat
  • Monitor PCs & Macs remotely. Get alerts when they go offline. All from your phone.
  • Hostbeat App v1.1.0
  • Hostbeat CLI Client v1.0.0
  • Hostbeat Windows 10/11 Client v1.2.2

catalonia flag

Made in Barcelona.

© Ruben Arrebola. All rights reserved.

An unhandled error has occurred. Reload 🗙