How To Install & Configure HalfLife To Monitor Your Cosmos Validator

In this how to, I will cover how to build/install and configure The Halflife Monitoring Tool made by Strangelove Ventures.

You can find the github repository here:

Step 1: Create a user for the service

This will create a 24-character random password for the user. Because we never expect that this user should be allowed to login, it doesn’t matter if we know the password. Root can su to halflife without a password. This should be all you need to use to access this user.

Step 2: Install go and set the paths

Install Go:

Add the proper paths to the halflife users .profile

Step 3: Clone the github directory.

This will install it to ~/go/bin

Step 4: Configure HalfLife

In my example configuration shown above, I have shown how to monitor more than one validator. Continue to add sections in the same format for each additional Validattor/Fullnode/Sentry you are monitoring.

First you will want to create a new channel in your Discord Server. Then create your webhook as instructed here:
You will want to name it the same as the username field. That field defines the name of the bot. Then select the new channel you just made for this webhook.
Copy the URL.

The url will look like this format

The corresponding id and token can be taken from the url.
id: 978129125394247720
token: cwM4Ks-kWcK3Jsg4I_cboauYjOa48ngI2VKaS76afsMwuY7-U4Frw3BGcYXCJvZJ2kWD

You will need to find out your User ID, or all user id’s you want to be alerted if a high/critical error is reached. Follow this guide to enable it and learn how to get them:

An example configuration with the above information and alerting two users:

Here is a link to the example configuration for further study. You will see that there are more options to enable or configure based on your setup.

Step 6: Create Service File

Add this to the service file, save, and quit

Regarding the ExecStart line in the service file. I created a directory .halflife and named the configuration file personal_validators.yaml and so I have to specify it for HalfLife to read the configuration.
Change this to fit your own needs, and where you decide to place your configuration file.
Lastly update the systemd service:

Step 5: Start and View the logs.

You should see updates in your Discord channel and the journal log should scroll that it is Monitoring NAME where name is the name of the chain that you specified in the configuration.

I hope you found this helpful!



Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store

My name is Jonathan and I am a Marine Infantry Veteran, an IT Professional with decades of admin experience, and focus on a healthy living style!