influxdb and grafana on raspberrypi
I've tried to install influxdb / grafana on my rpi v2 for the last couple of weeks. Following various guides on the net. All of them results in build errors when building influxdb.
I know that some of you are using it for graphing your sensor data, so is there someone that could help with some tips?
My goal is to have node-red dump data to influxdb, and then graphing it nicely using graphana for semi public access for some of the sensors (like outdoor temperature / humidity / barometric pressure)
Sorry in french but quite easy :
I did try to follow that guide (commands are in english, so easy to follow) but it still fails building influxdb..
Getting a larger and larger spot of missing hairs on my neck right now
The Domoticz Raspberry Pi image has influxdb, maybe you can use their packaging?
pi@raspberrypi ~ $ apt-cache show influxdb Package: influxdb Status: install ok installed Priority: extra Section: default Installed-Size: 20683 Maintainer: <root@pi> Architecture: armhf Version: 0.8.6 Description: no description given License: unknown Vendor: root@pi Homepage: http://example.com/no-uri-given pi@raspberrypi ~ $ apt-cache policy influxdb influxdb: Installed: 0.8.6 Candidate: 0.8.6 Version table: *** 0.8.6 0 100 /var/lib/dpkg/status pi@raspberrypi ~ $ apt-cache showpkg influxdb Package: influxdb Versions: 0.8.6 (/var/lib/dpkg/status) Description Language: File: /var/lib/dpkg/status MD5: c0af8b65ef8df63b3bfb124d96da1778 Reverse Depends: Dependencies: 0.8.6 - Provides: 0.8.6 - Reverse Provides:
@mfalkvidd : very old version
@tbowmo : can you post your error ? I compile influx and grafana few days ago with success on odroid C1 (armv7) and debian Jessie.
This is the last lines from my build log.. I followed the description on the link that you posted above.. But I see the same regardless of what recipe I follow.
Also it complained about go1.4.3 was needed, when I started to compile influxdb.. So I installed that as well (besides 1.4.2 / 1.5.2 as in the recipe)
can't load package: package github.com/influxdb/influxdb/tsdb: code in directory /home/thomas/.gvm/pkgsets/go1.5.2/influxdb/src/github.com/influxdb/influxdb/tsdb expects import "github.com/influxdata/influxdb/tsdb" can't load package: package github.com/influxdb/influxdb/tsdb/engine: code in directory /home/thomas/.gvm/pkgsets/go1.5.2/influxdb/src/github.com/influxdb/influxdb/tsdb/engine expects import "github.com/influxdata/influxdb/tsdb/engine" can't load package: package github.com/influxdb/influxdb/tsdb/engine/tsm1: code in directory /home/thomas/.gvm/pkgsets/go1.5.2/influxdb/src/github.com/influxdb/influxdb/tsdb/engine/tsm1 expects import "github.com/influxdata/influxdb/tsdb/engine/tsm1" can't load package: package github.com/influxdb/influxdb/uuid: code in directory /home/thomas/.gvm/pkgsets/go1.5.2/influxdb/src/github.com/influxdb/influxdb/uuid expects import "github.com/influxdata/influxdb/uuid" Build failed, unable to create package -- aborting
@tbowmo : in package.sh change line 70 to go1.5.2. This is the only modification i made.
I found the problem.. github.com/influxdb is renamed to github.com/influxdata, and all guides that I have followed pointed to influxdb. Tried to go with the influxdata instead. And I got it to build..
So the recipe that I followed is the following (Taken from the French site that you mentioned above, and modified with my findings)
$ wget https://raw.githubusercontent.com/moovweb/gvm/master/binscripts/gvm-installer $ chmod +x gvm-installer $ ./gvm-installer Cloning from https://github.com/moovweb/gvm.git to /home/pi/.gvm No existing Go versions detected Installed GVM v1.0.22 Please restart your terminal session or to get started right away run `source /home/pi/.gvm/scripts/gvm` $ source /home/pi/.gvm/scripts/gvm # Install Go 1.4 before Go 1.5 : https://github.com/moovweb/gvm/issues/155 $ gvm install go1.4.2 Downloading Go source... Installing go1.4.2... * Compiling... $ gvm use go1.4.2 --default Now using version go1.4.2 $ gvm install go1.5.3 Updating Go source... Installing go1.5.3... * Compiling... $ gvm use go1.5.3 --default Now using version go1.5.3 $ sudo apt-get install bison $ sudo apt-get install ruby-dev gcc $ sudo gem install fpm # Cf https://github.com/influxdb/influxdb/issues/3557 $ gvm pkgset create influxdb $ gvm pkgset use influxdb Now using version go1.5.3@influxdb $ go get github.com/tools/godep $ go get -t -d github.com/influxdata/influxdb $ cd .gvm/pkgsets/go1.5.2/influxdb/src/github.com/influxdata/influxdb # Update to use go1.5.3 instead of 1.4.3 $ sed -i -- 's/go1.4.3/go1.5.3/g' package.sh $ ./package.sh -t deb -p 0.9.6 $ sudo dpkg -i influxdb_0.9.6_armhf.deb $ sudo mkdir /var/lib/influxdb $ sudo chown influxdb. /var/lib/influxdb $ sudo mkdir /var/log/influxdb $ sudo chown influxdb. /var/lib/influxdb $ sudo systemctl enable influxdb $ sudo systemctl start influxdb $ /opt/influxdb/influx Connected to http://localhost:8086 version 0.9.6 InfluxDB shell 0.9.6
Thank you @tbowmo It will help me when I will compile the last version.
drock1985 last edited by drock1985
Not sure if this works for sure or not but, if you are looking for a shortcut.... here is a .deb package made for Ubuntu arm.
Anyone have any tips for Grafana on an Rpi by chance?
that's a rather old influxdb version, latest is 0.10
I finally succeeded in getting both influxdb and grafana to install.. (Influx 0.10 and grafana 2.6.0). So now it's graphing time
I have setup node-red to push data into influxdb, so it's independent on the controller that I choose to use..
Right now it's stored to the sdcard on my raspberry, but since I push electrical utility measurements every second, I believe that I have to setup some kind of external storage, otherwise the sdcard would be worn out..
@tbowmo What's the performance of this setup on RPi?
I use a real server (dual core Athlon, 4Gb Ram, SSD) to run InfluxDB and Grafana on and even sometimes find it rather slow with large datasets.
I haven't got that large data amount right now.. Right now only 5 sensors are writing to the influx db:
4 sensebenders (temperature / humidity). One of them also barometric pressure.. These are only transmitting when temperature / humidity changes..
1 Electrical utility meter.. this writes a couple of times each second (every time the LED blinks on my utility meter :))
So far I can't see any issues with speed, but it might change when I've got logs for 6 months in the database.
I haven't set up a retention plan yet, so currently I keep all data forever..
Alexander last edited by
@tbowmo how did you finally manage to install Grafana on the RPI?
Some time ago I tried to do the same on the Domoticz image but gave it up...
I used the description that @fabien linked to in the first reply in this thread. I did however install go 1.5.3 instead of 1.5.2 as mentioned in that article.
Just found out that influxdata, is now making builds for armhf platform, from version 0.11..
So no need to compile stuff yourself for that part..
News are on their blog here https://influxdata.com/blog/announcing-influxdb-0-11-ga-kapacitor-telegraf/
And install instructions for ubuntu / debian is here https://docs.influxdata.com/influxdb/v0.9/introduction/installation/#ubuntu-debian