# Installing Telegraf RPi - Error running agent

**URL:** https://community.influxdata.com/t/installing-telegraf-rpi-error-running-agent/9632
**Category:** Telegraf
**Created:** [April 29, 2019, 8:56pm UTC](https://community.influxdata.com/t/installing-telegraf-rpi-error-running-agent/9632 "2019-04-29T20:56:41Z")
**Posts on this page:** 13
**Page:** 1

<div class="post-metadata">

### Author: ![Quark](https://avatars.discourse-cdn.com/v4/letter/q/5e9695/32.png) [@Quark](https://community.influxdata.com/u/Quark)
#### Post date: [April 29, 2019, 8:56pm UTC](https://community.influxdata.com/t/installing-telegraf-rpi-error-running-agent/9632/1 "2019-04-29T20:56:41Z")

</div>

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:

> **[Get started with Telegraf | Telegraf 1.21 Documentation](https://docs.influxdata.com/telegraf/v1.10/introduction/getting-started/)**
>
> Configure and start the Telegraf service.

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 🙂

---

<div class="post-metadata">

### Author: ![daniel](https://sea1.discourse-cdn.com/flex023/user_avatar/community.influxdata.com/daniel/32/142_2.png) [@daniel](https://community.influxdata.com/u/daniel)
#### Post date: [April 29, 2019, 11:33pm UTC](https://community.influxdata.com/t/installing-telegraf-rpi-error-running-agent/9632/2 "2019-04-29T23:33:29Z")

</div>

You will need to [create a config file](https://docs.influxdata.com/telegraf/v1.10/introduction/getting-started/#creating-and-editing-the-configuration-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.

---

<div class="post-metadata">

### Author: ![Quark](https://avatars.discourse-cdn.com/v4/letter/q/5e9695/32.png) [@Quark](https://community.influxdata.com/u/Quark)
#### Post date: [April 30, 2019, 9:39pm UTC](https://community.influxdata.com/t/installing-telegraf-rpi-error-running-agent/9632/3 "2019-04-30T21:39:36Z")

</div>

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?

---

<div class="post-metadata">

### Author: ![MarcV](https://sea1.discourse-cdn.com/flex023/user_avatar/community.influxdata.com/marcv/32/7676_2.png) [@MarcV](https://community.influxdata.com/u/MarcV)
#### Post date: [April 30, 2019, 10:31pm UTC](https://community.influxdata.com/t/installing-telegraf-rpi-error-running-agent/9632/4 "2019-04-30T22:31:31Z")

</div>

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

---

<div class="post-metadata">

### Author: ![Quark](https://avatars.discourse-cdn.com/v4/letter/q/5e9695/32.png) [@Quark](https://community.influxdata.com/u/Quark)
#### Post date: [June 11, 2019, 7:43pm UTC](https://community.influxdata.com/t/installing-telegraf-rpi-error-running-agent/9632/5 "2019-06-11T19:43:37Z")

</div>

Hi,

Sorry for the really late reply on this - I’ve been on other projects of late.

I see, no I don’t have Influxdb installed. I’ve now downloaded Influx1.7.6 but am having trouble installing.

I’ve run…

```
wget https://dl.influxdata.com/influxdb/releases/influxdb-1.7.6_linux_armhf.tar.gz
tar xvfz influxdb-1.7.6_linux_armhf.tar.gz

```

This has unzipped the files on my Raspberry Pi home. I can see a bin folder with lots of executables. Not sure how to install though.

As described I’m quiet new to RPi.

Any pointers most welcome 🙂

Cheers

---

<div class="post-metadata">

### Author: ![Pooh](https://avatars.discourse-cdn.com/v4/letter/p/f05b48/32.png) [@Pooh](https://community.influxdata.com/u/Pooh)
#### Post date: [June 11, 2019, 8:00pm UTC](https://community.influxdata.com/t/installing-telegraf-rpi-error-running-agent/9632/6 "2019-06-11T20:00:16Z")

</div>

> I’ve run…
> 
> ```
> wget
> 
> ```
> 
> [https://dl.influxdata.com/influxdb/releases/influxdb-1.7.6\_linux\_armhf.tar](https://dl.influxdata.com/influxdb/releases/influxdb-1.7.6_linux_armhf.tar)  
> .gz tar xvfz influxdb-1.7.6\_linux\_armhf.tar.gz
> 
> This has unzipped the files on my Raspberry Pi home. I can see a bin folder  
> with lots of executables. Not sure how to install though.

Isn’t influx available as a Raspbian package?

> As described I’m quiet new to RPi.
> 
> Any pointers most welcome 🙂

What does “aptitude search influx” tell you?

If it gives an error, please confirm what Operating System you’ve installed on  
the Raspberry.

Antony.

---

<div class="post-metadata">

### Author: ![Quark](https://avatars.discourse-cdn.com/v4/letter/q/5e9695/32.png) [@Quark](https://community.influxdata.com/u/Quark)
#### Post date: [June 11, 2019, 8:13pm UTC](https://community.influxdata.com/t/installing-telegraf-rpi-error-running-agent/9632/7 "2019-06-11T20:13:26Z")

</div>

Hi

```
aptitude search influx

```

returns  
E: the list of sources could not be read

I am running Rasbian OS.

Does this mean I need to follow Debian from install page?..

[https://portal.influxdata.com/downloads/](https://portal.influxdata.com/downloads/)

---

<div class="post-metadata">

### Author: ![Pooh](https://avatars.discourse-cdn.com/v4/letter/p/f05b48/32.png) [@Pooh](https://community.influxdata.com/u/Pooh)
#### Post date: [June 11, 2019, 8:29pm UTC](https://community.influxdata.com/t/installing-telegraf-rpi-error-running-agent/9632/8 "2019-06-11T20:29:59Z")

</div>

> Hi
> 
> ```
> aptitude search influx
> 
> ```
> 
> returns  
> E: the list of sources could not be read

Oh dear, that’s bad - it means you can’t install new software, update existing  
software, or obtain security updates for your Raspberry.

> I am running Rasbian OS.

I wonder how you installed it…

> Does this mean I need to follow Debian from install page?..

It means you should check the contents of:

/etc/apt/sources.list

/etc/apt/sources.list.d/\*

You should also make sure you have a working Internet connection to the  
Raspberry (which I guess is true because you managed the wget) and a working  
DNS service (ditto).

Antony.

---

<div class="post-metadata">

### Author: ![Quark](https://avatars.discourse-cdn.com/v4/letter/q/5e9695/32.png) [@Quark](https://community.influxdata.com/u/Quark)
#### Post date: [June 11, 2019, 8:42pm UTC](https://community.influxdata.com/t/installing-telegraf-rpi-error-running-agent/9632/9 "2019-06-11T20:42:13Z")

</div>

Ok so

/etc/apt/sources.list

is a file with three lines that says to un-comment bottom line to enable apt-get source

and

/etc/apt/sources.list.d/\*

Has a similar file as described above called raspi.list and an influxdb.list file.

Internet connection is fine.

Should I un-comment the bottom lines in these files?

---

<div class="post-metadata">

### Author: ![Pooh](https://avatars.discourse-cdn.com/v4/letter/p/f05b48/32.png) [@Pooh](https://community.influxdata.com/u/Pooh)
#### Post date: [June 11, 2019, 8:58pm UTC](https://community.influxdata.com/t/installing-telegraf-rpi-error-running-agent/9632/10 "2019-06-11T20:58:43Z")

</div>

> Ok so
> 
> /etc/apt/sources.list
> 
> is a file with three lines that says to un-comment bottom line to enable  
> apt-get source

What _exactly_ does it say?

It’s nothing confidential - there’s no reason not to post it to a public  
mailing list.

It _should_ be a working sources.list file, from wherever you installed  
Raspian, but it sounds like there’s a problem.

> and /etc/apt/sources.list.d/\* has a similar file as described above called  
> raspi.list and an influxdb.list file.

How similar? I know this is getting off-topic for InfluxDB, but post the  
contents of those files as well.

> Internet connection is fine.

Good.

> Should I un-comment the bottom lines in these files?

I don’t know until I know exactly what they say.

Antony.

---

<div class="post-metadata">

### Author: ![Quark](https://avatars.discourse-cdn.com/v4/letter/q/5e9695/32.png) [@Quark](https://community.influxdata.com/u/Quark)
#### Post date: [June 12, 2019, 7:10pm UTC](https://community.influxdata.com/t/installing-telegraf-rpi-error-running-agent/9632/11 "2019-06-12T19:10:11Z")

</div>

sources.list

> deb [Index of /raspbian](http://raspbian.raspberrypi.org/raspbian/) stretch main contrib non-free rpi
> 
> # Uncomment line below then ‘apt-get update’ to enable ‘apt-get source’
> 
> #deb-src [Index of /raspbian](http://raspbian.raspberrypi.org/raspbian/) stretch main contrib non-free rpi

---

<div class="post-metadata">

### Author: ![Quark](https://avatars.discourse-cdn.com/v4/letter/q/5e9695/32.png) [@Quark](https://community.influxdata.com/u/Quark)
#### Post date: [June 12, 2019, 7:10pm UTC](https://community.influxdata.com/t/installing-telegraf-rpi-error-running-agent/9632/12 "2019-06-12T19:10:49Z")

</div>

and sources.list.d/raspi.list

> deb [Index of /debian](http://archive.raspberrypi.org/debian/) stretch main ui
> 
> # Uncomment line below then ‘apt-get update’ to enable ‘apt-get source’
> 
> #deb-src [Index of /debian](http://archive.raspberrypi.org/debian/) stretch main ui

also there is a sources.list.d/influxdb.list file

Does this make more sense?

---

<div class="post-metadata">

### Author: ![Quark](https://avatars.discourse-cdn.com/v4/letter/q/5e9695/32.png) [@Quark](https://community.influxdata.com/u/Quark)
#### Post date: [June 12, 2019, 7:30pm UTC](https://community.influxdata.com/t/installing-telegraf-rpi-error-running-agent/9632/13 "2019-06-12T19:30:20Z")

</div>

And the influxdb file just one line

@deb [InfluxDB - Package Repository](https://repos.influxdata.com/debian) stretch stable@
