How To Install Riemann on Ubuntu 20.04

How To Install Riemann on Ubuntu 20.04

This is the first blog of the Riemann Series in which we will learn about Riemann and How to install Riemann on our Ubuntu Server.

Introduction To Riemann

Riemann is an event-based tool for monitoring distributed systems. It is written in Clojure and runs on top of the JVM.

Riemann works on a push model, receiving events rather than pooling for them. Our hosts, services and applications will send their events to Riemann and Riemann makes necessary decisions about these events.

Riemann can also track the state of incoming events and allow us to build checks. It also provides us the ability to send events onto other services and into storage and a variety of other integrations.

Riemann on commodity x86 hardware can handle millions of events per second at sub-millisecond latencies.

Installation of Riemann

Following are the steps to Install Riemann on Ubuntu.

Step 1 - Updating the system

First, we need to update the package on our system.

sudo apt-get update -y

Step 2 - Installing default-jre

We need to install default-jre as this is required to run our Riemann Server.

#installing default-jre 
sudo apt-get install default-jre -y 

#checking java version 
java --version

Step 3 - Install Riemann

Now, we are going to install Riemann. To install Riemann we will use the Riemann project's own DEB packages. The Riemann DEB package installs the Riemann binary and supporting files, service management, and a default configuration file.

We are installing Riemann version 0.3.3 in this blog, you can check the Riemann site for the latest version and update this command to get that package.

Check the Riemann updated package Click here

# Fetching the Riemann DEB package
wget https://github.com/riemann/riemann/releases/download/0.3.3/riemann_0.3.3_all.deb

# Installing the Riemann package on Ubuntu
sudo dpkg -i riemann_0.3.3_all.deb

Riemann has been successfully installed in our system. Now we can start the Riemann server and check its status.

# Starting Riemann Server
sudo service riemann start 

# Checking status of Riemann
sudo service riemann status

Step 4 - Installing Riemann’s tools

Lastly, we need to install Riemann Tools.

Riemann tools are sets of programs that can be used to submit events to Riemann. This includes tools for monitoring Web Services, Local Hosts, Applications and Databases.

You can check the repository for the Riemann tool on GitHub click here

To install the Riemann tools we need to install Ruby on our machine. We are using RVM (Ruby Version Manager) to install Ruby on our machine.

# Install the dependencies required to build Ruby from source
sudo apt-get install curl g++ gcc autoconf automake bison libc6-dev \
libffi-dev libgdbm-dev libncurses5-dev libsqlite3-dev libtool \
libyaml-dev make pkg-config sqlite3 zlib1g-dev libgmp-dev \
libreadline-dev libssl-dev 

# Add the GPG keys and install RVM
curl -sSL https://rvm.io/mpapis.asc | gpg --import -
curl -sSL https://rvm.io/pkuczynski.asc | gpg --import -
curl -sSL https://get.rvm.io | bash -s stable

# To start using RVM, load the script environment variables using the source command
source /usr/local/rvm/scripts/rvm

# To get a list of all Ruby versions that can be installed with this tool
rvm list known

# Install Ruby with RVM and set it as the default version
rvm install ruby-2.6.6
rvm --default use ruby-2.6.6

# Verify that Ruby was properly installed
ruby -v

# Installing ruby other dependencies
apt-get install ruby-dev build-essential -y

So we are done with the Ruby installation. Now we can install Riemann tools on our system.

# install riemann supporting tools
gem install --no-document riemann-client riemann-tools riemann-dash

Congratulation !! We have successfully installed Riemann and Riemann tools on our system.

In our next blog of the Riemann series, we will learn about how to configure Riemann.


Hope you find this blog helpful !! See you in the next blog !! Keep Learning !!

Did you find this article valuable?

Support Goel Academy by becoming a sponsor. Any amount is appreciated!