telegraf command not found

In this troubleshooting guide we learn how to fix telegraf command not found error message

Introduction

When you run more command in linux terminal / console, you get the following error message

telegraf: command not found

or when using sudo you get the following error message

sudo: telegraf: command not found

Solutions to telegraf: command not found

How To Fix telegraf: command not found in Ubuntu / Debian / Kali Linux / Raspbian

In Ubuntu telegraf is provided by telegraf package.

telegraf is:

Telegraf is an agent for collecting, processing, aggregating, and writing metrics.

Design goals are to have a minimal memory footprint with a plugin system so that developers in the community can easily add support for collecting metrics.

Telegraf is plugin-driven and has the concept of 4 distinct plugin types:

  1. Input Plugins collect metrics from the system, services, or 3rd party API

  2. Processor Plugins transform, decorate, and/or filter metrics

  3. Aggregator Plugins create aggregate metrics (e.g. mean, min, max, quantiles, etc.)

  4. Output Plugins write metrics to various destinations

To fix this problem, we can install more using the command below.

sudo apt-get -y install telegraf

This command might take some time to finish depending on your machine internet connection.

You can also use apt command to install telegraf.

sudo apt -y install telegraf

Or if you have aptitude installed you can use the following command.

sudo aptitude install telegraf

Summary

In this tutorial we learn how to fix telegraf command not found error in Ubuntu / Debian / Kali Linux or Raspbian distribution.