ein Blog

Grafana 4.6 on Raspberry Pi

I am running Grafana + Prometheus on a Raspberry Pi 2 to collect metrics of all my things. Unfortunately, there is no official Grafana Package for ARM so i looked into how to build it myself.

Basically you can use the Instructions on github except some minor changes. Grafana requires phantomjs to export Graphs as images but that doesn't exist for ARM as well. Usually don't need that so i decided do strip phantomjs out.

To do so, you can just remove phantomjs from yarn.lock before running yarn install:

diff --git a/yarn.lock b/yarn.lock
index 5c47f4268..2d42b72ab 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -6260,20 +6260,6 @@ performance-now@^2.1.0:
   version "2.1.0"
   resolved "https://registry.yarnpkg.com/performance-now/-/performance-now-2.1.0.tgz#6309f4e0e5fa913ec1c69307ae364b4b377c9e7b"

-phantomjs-prebuilt@^2.1.15, phantomjs-prebuilt@^2.1.7:
-  version "2.1.15"
-  resolved "https://registry.yarnpkg.com/phantomjs-prebuilt/-/phantomjs-prebuilt-2.1.15.tgz#20f86e82d3349c505917527745b7a411e08b3903"
-  dependencies:
-    es6-promise "~4.0.3"
-    extract-zip "~1.6.5"
-    fs-extra "~1.0.0"
-    hasha "~2.2.0"
-    kew "~0.7.0"
-    progress "~1.1.8"
-    request "~2.81.0"
-    request-progress "~2.0.1"
-    which "~1.2.10"
-
 pify@^2.0.0, pify@^2.3.0:
   version "2.3.0"
   resolved "https://registry.yarnpkg.com/pify/-/pify-2.3.0.tgz#ed141a6ac043a849ea588498e7dca8b15330e90c"

grunt build tasks also have to be modified:

diff --git a/scripts/grunt/build_task.js b/scripts/grunt/build_task.js
index 668a67d22..27211a0e6 100644
--- a/scripts/grunt/build_task.js
+++ b/scripts/grunt/build_task.js
@@ -6,7 +6,6 @@ module.exports = function(grunt) {
   grunt.registerTask('build', [
     'clean:release',
     'clean:build',
-    'phantomjs',
     'webpack:prod',
   ]);