How to Install Statsd on Arch Linux

Introduction

Statsd is used to collect and aggregate data statistics from different sources in real-time. This article will discuss the steps to install Statsd on Arch Linux.

Prerequisites

  1. Arch Linux installed on your system.
  2. An internet connection to download Statsd.

Step 1: Install Nodejs

Before installing Statsd, we need to install Nodejs, which is required to run Statsd.

To install Nodejs, run the following command:

$ sudo pacman -S nodejs

Step 2: Download Statsd

Clone the Github Repository

To download Statsd, clone the official repository from Github using the following command:

$ git clone https://github.com/etsy/statsd.git

Direct Download

Alternatively, you can download the Statsd package from the following link:

https://github.com/etsy/statsd/archive/master.zip

Extract the downloaded package in your preferred directory.

Step 3: Configuration

After downloading, go to the 'statsd' directory.

$ cd statsd

Open 'config.js' file located in the same directory using your preferred text editor:

$ nano config.js

Update the following details as per your requirement:

{
  port: 8125,
  backends: [ "./backends/console" ],
  debug: true
}

Step 4: Start Statsd

To start Statsd, run the following command:

$ node stats.js config.js

You will see the following output on your terminal:

Server is running.

If you want to run Statsd in the background, use the following command:

$ node stats.js config.js &

Conclusion

Congratulations! You have successfully installed Statsd on Arch Linux. You can now configure Statsd to aggregate data statistics from different sources in real-time.

If you want to self-host in an easy, hands free way, need an external IP address, or simply want your data in your own hands, give IPv6.rs a try!