collectd_graphite_grafana

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Last revisionBoth sides next revision
collectd_graphite_grafana [2017/04/01 12:52] – [Konfiguration] brotcollectd_graphite_grafana [2017/07/05 13:37] – [Konfiguration] brot
Line 64: Line 64:
  
 <code bash -> <code bash ->
 +
 +root@minipi:/usr/share/graphite-web# nano/etc/graphite/local_settings.py
 +(secret salt setzen)
 +
 root@minipi:/usr/share/graphite-web# graphite-manage migrate root@minipi:/usr/share/graphite-web# graphite-manage migrate
 +
 </code> </code>
  
-<file shell /etc/uwsgi/apps-available/graphite-api.ini>+<file shell /etc/uwsgi/apps-available/graphite.ini> 
 [uwsgi] [uwsgi]
 processes = 2 processes = 2
-socket localhost:8080 +uid _graphite 
-plugins python27 +gid _graphite 
-module = graphite_api.app:app +chdir = /usr/share/graphite-web 
-home = /usr/share/graphite-web+file = graphite.wsgi 
 +chmod-socket = 666 
 + 
 </file> </file>
  
Line 84: Line 93:
     location / {     location / {
         include uwsgi_params;         include uwsgi_params;
-        uwsgi_pass localhost:8080;+        uwsgi_pass unix:/run/uwsgi/app/graphite/socket;
     }     }
 } }
 </file> </file>
 +
 <code bash -> <code bash ->
-root@minipi:/home/pi# ln -sv /etc/uwsgi/apps-available/graphite-api.ini /etc/uwsgi/apps-enabled/ +root@minipi:/home/pi# ln -sv /etc/uwsgi/apps-available/graphite.ini /etc/uwsgi/apps-enabled/ 
-‘/etc/uwsgi/apps-enabled/graphite-api.ini’ -> ‘/etc/uwsgi/apps-available/graphite-api.ini’+‘/etc/uwsgi/apps-enabled/graphite.ini’ -> ‘/etc/uwsgi/apps-available/graphite.ini’
 root@minipi:/home/pi# ln -sv /etc/nginx/sites-available/graphite.conf /etc/nginx/sites-enabled/ root@minipi:/home/pi# ln -sv /etc/nginx/sites-available/graphite.conf /etc/nginx/sites-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
 </code> </code>
 +
 +===== Grafana =====
 +
 +==== Installation ====
 +
 +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 ->
 +apt install apt-transport-https curl
 +curl https://bintray.com/user/downloadSubjectPublicKey?username=bintray | sudo apt-key add -
 +echo "deb https://dl.bintray.com/fg2it/deb-rpi-1b jessie main" | sudo tee -a /etc/apt/sources.list.d/grafana.list
 +apt update
 +apt install grafana
 +</code>
 +
 +
 +
  • collectd_graphite_grafana.txt
  • Last modified: 2017/07/05 13:40
  • by brot