Both sides previous revision Previous revision Next revision | Previous revisionLast revisionBoth sides next revision |
collectd_graphite_grafana [2017/04/07 16:57] – brot | collectd_graphite_grafana [2017/07/05 13:37] – [Konfiguration] brot |
---|
} | } |
</file> | </file> |
| |
<code bash -> | <code bash -> |
root@minipi:/home/pi# ln -sv /etc/uwsgi/apps-available/graphite.ini /etc/uwsgi/apps-enabled/ | root@minipi:/home/pi# ln -sv /etc/uwsgi/apps-available/graphite.ini /etc/uwsgi/apps-enabled/ |
‘/etc/nginx/sites-enabled/graphite.conf’ -> ‘/etc/nginx/sites-available/graphite.conf’ | ‘/etc/nginx/sites-enabled/graphite.conf’ -> ‘/etc/nginx/sites-available/graphite.conf’ |
root@minipi:/home/pi# rm /etc/nginx/sites-enabled/default | root@minipi:/home/pi# rm /etc/nginx/sites-enabled/default |
| root@minipi:/home/pi# su _graphite -s /bin/bash |
| _graphite@pi-grafana-sensor:~$ cd /usr/lib/python2.7/dist-packages/graphite/ |
| _graphite@pi-grafana-sensor:/usr/lib/python2.7/dist-packages/graphite$ python manage.py syncdb |
| (...) |
| _graphite@pi-grafana-sensor:/usr/lib/python2.7/dist-packages/graphite$ exit |
root@minipi:/home/pi# systemctl restart uwsgi | root@minipi:/home/pi# systemctl restart uwsgi |
root@minipi:/home/pi# systemctl restart nginx | root@minipi:/home/pi# systemctl restart nginx |
==== Installation ==== | ==== Installation ==== |
| |
Grafana soll, wie auch der Rest der Software, auf einem Raspberry Pi laufen. Die Grafana-Pakete gibt es allerdings nur [[https://packages.debian.org/unstable/web/grafana|in Debian unstable ]](Stand April 2017). Wir brauchen also das "unstable" Repository, und müssen aufpassen dass wir nicht unsere ganze Software über dieses beziehen. Dafür gibt es das [[https://wiki.debian.org/AptPreferences|Pinning von Repositorys]]. | Grafana soll, wie auch der Rest der Software, auf einem Raspberry Pi laufen. Die Grafana-Pakete gibt es allerdings nicht für raspian, und die debian unstable pakete wollen auf einem rpi1 nicht so ohne weiteres laufen. Aber es gibt abhilfe: Ein [[https://github.com/fg2it/grafana-on-raspberry|Github Projekt für grafana auf Raspberys]] inkl dazugehörigem [[https://dl.bintray.com/fg2it/deb-rpi-1b/|repository]] |
| |
<code bash -> | <code bash -> |
root@minipi:/home/pi# echo "deb http://ftp.de.debian.org/debian unstable main contrib non-free" >> /etc/apt/sources.list.d/deb_unstable.list | apt install apt-transport-https curl |
root@minipi:/home/pi# cat >> /etc/apt/preferences.d/pinning << EOF | curl https://bintray.com/user/downloadSubjectPublicKey?username=bintray | sudo apt-key add - |
> Package: * | echo "deb https://dl.bintray.com/fg2it/deb-rpi-1b jessie main" | sudo tee -a /etc/apt/sources.list.d/grafana.list |
> Pin: release a=stable | apt update |
> Pin-Priority: 999 | apt install grafana |
> | |
> Package: * | |
> Pin: release a=unstable | |
> Pin-Priority: 1 | |
> EOF | |
root@minipi:/home/pi# apt update | |
root@minipi:/home/pi# apt install grafana | |
</code> | </code> |
| |
| |
| |