Tutorial: How to Install tcollector on Debian Latest

In this tutorial, we will learn how to install tcollector on Debian Linux.

tcollector is a collection agent that can help capture system performance metrics and forward them to a metric collection system like OpenTSDB. It supports many different data sources, including Linux Performance counters, JMX MBeans, and Python scripts.

Prerequisites

Before we get started, make sure you have the following:

  1. Debian Linux installed and running
  2. Root or sudo access to the system

Step 1 - Install Git

tcollector is an open-source project and maintained on GitHub, so we need git to clone the source code.

To install git, run the following command:

sudo apt-get install git

Step 2 - Clone tcollector

Clone the tcollector source code to your Debian instance.

git clone https://github.com/OpenTSDB/tcollector.git

Once the clone is completed, you will see the tcollector folder in your current directory.

Step 3 - Install Python Dependencies

tcollector is a Python script that requires some dependencies. Before running the installation script, we need to install the following Python modules:

sudo apt-get -y update
sudo apt-get -y install python python-pip python-dev python-setuptools

Step 4 - Install TCollector

To install tcollector, we need to run the installation script located in the tcollector folder:

cd tcollector
sudo ./setup.sh

The installation script will prompt you for some parameters, like the OpenTSDB server IP address and port.

Once the installation is completed, tcollector will start collecting metrics from the supported sources.

Step 5 - Verify the Installation

To verify the installation, run the following command:

ps ax | grep tcollector

If everything is installed correctly, you should see something like this:

11883 pts/0    S+     0:00 grep --color=auto tcollector
24690 ?        Sl     0:00 /usr/bin/python /opt/tcollector/tcollector.py -H <OpenTSDB IP Address> -p <OpenTSDB port>

Conclusion

In this tutorial, we learned how to install tcollector on Debian and started collecting metrics to be forwarded to OpenTSDB. tcollector is a great tool to help monitor your systems and troubleshoot issues.

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!

Alternatively, for the best virtual desktop, try Shells!