Telegraf - level=error msg="failed to create cache directory

I have installed influxdb and is working with a unifi-proxy collector. I started looking into monitoring my raspberry pi cluster. I found the influxdb with the telegraf collector. After downloading and installing telegraf, I ran into the hassle where I could not start telegraf because of the following error. shown in the below extract.

Aug 23 21:03:45 masternode telegraf[5979]: time=“2021-08-23T21:03:45+01:00” level=error msg=“failed to create cache directory. /etc/telegraf/.cache/snowflake, err: mkdir /etc/telegraf/.cache: permission denied. ignored\n” func=“gosnowflake.(*defaultLogger).Errorf” file=“log.go:120”
Aug 23 21:03:45 masternode telegraf[5979]: time=“2021-08-23T21:03:45+01:00” level=error msg=“failed to open. Ignored. open /etc/telegraf/.cache/snowflake/ocsp_response_cache.json: no such file or directory\n” func=“gosnowflake.(*defaultLogger).Errorf” file=“log.go:120”

I have done loads of searching around and everyone says that the solution to this issue is to roll back the telegraf version from 1.19 to 1.18

The issue I now have is that I cannot find the file type to install onto the arm processor.
I am looking for the file to install onto the raspberry pi.

Any help is very much appreciated.

@popey can you help here please?

In the meantime I also installed a previous version of Telegraf and had more errors. I think that they are related the contents of the telegraf.conf file provided from the site …

If I use the sample config file, and only change the following entries.

[agent]
  logtarget = "file"
  logfile = "/var/log/telegraf.log"  

[[outputs.influxdb]]
  urls = ["http://192.168.1.99:8086"]
  database = "rpi_monitoring"
  username = "demo"
  password = "demo"

The service starts without any hassle, but I do not see anything uploaded into the database, also nothing on the grafana dashboard.

I then try to add some of the other entries and then causes the service not to restart if I try.

Lawrence

I have managed to fix the issues. I rolled back to:

Telegraf 1.18.2 (git: HEAD a6143722)

wget https://dl.influxdata.com/telegraf/releases/telegraf_1.18.2-1_armhf.deb

dpkg -i telegraf_1.18.2-1_armhf.deb

After this was done. I followed the following site where I managed to resolve all the issues.

Lawrence