Installing Telegraf RPi - Error running agent

#1

Hi All,

I want to learn how to make a simple TIG stack (or similar) to monitor some data. Perhaps starting with my computers metric (cpu, ram usage etc) but eventually from a sensor.

I now have a RPi ready to go running Rasbian and the first step is installing Telegraf to collect some data.

I’m trying to follow this:

But I’ve gotten stuck at the first hurdle - Install Telegraf.

Just a side note, I’m completely new to the world of Influx, and only basic proficiency on the Raspberry Pi.

I’ve managed to download Telegraf Binary and unzip.

I navigate to

cd /home/pi/telegraf/usr/bin

then

./telegraf

It says starting telegraf. Then Error running agent no config file specified…

Any thoughts appreciated :slight_smile:

#2

You will need to create a config file, then start Telegraf with it: ./telegraf --config telegraf.conf

I recommend trying the .deb file since it is setup to run Telegraf as a service using a config in /etc/telegraf/telegraf.conf, this is a bit nicer once you get past the early testing stage.

1 Like
#3

Ok thanks for the reply, seem to have something happening now.

I did…
./telegraf -sample-config -input-filter cpu:mem -output-filter influxdb > telegraf.conf
Instead of
telegraf -sample-config -input-filter cpu:mem -output-filter influxdb > telegraf.conf

as the tutorial suggested, to monitor cpu and mem usage. Probably obvious to others but I’m quiet new.

I then started telegraf as you suggested.

However, it now says " Error writing output… could not write to any address…connection refused"

Is this to do with permissions on the RPi perhaps?

#4

Hi ,
that is because Telegraf expects an influx database up and running ,
because of the outputs part in the config.
Do you have Influxdb installed ?

best regards