Setja upp Graphite á Raspberry PI



apt-get update apt-get upgrade apt-get install -y python2.6 python-pip python-cairo python-django python-django-tagging python-configobj apt-get install -y libapache2-mod-wsgi python-twisted python-memcache python-pysqlite2 python-simplejson sqlite3 pip install whisper pip install carbon pip install graphite-web pip install pytz mkdir /etc/httpd mkdir /etc/httpd/wsgi/ chown -R www-data:www-data /etc/httpd/ wget https://raw.github.com/tmm1/graphite/master/examples/example-graphite-vhost.conf -O /etc/apache2/sites-available/graphite cd /opt/graphite/conf/ cp graphite.wsgi.example graphite.wsgi cp carbon.conf.example carbon.conf cp storage-schemas.conf.example storage-schemas.conf cd /opt/graphite/webapp/graphite cp local_settings.py.example local_settings.py chown -R www-data:www-data /opt/graphite/storage/ a2dissite default a2ensite graphite /etc/init.d/apache2 restart cd /opt/graphite/webapp/graphite python manage.py syncdb cd /opt/graphite/storage/ chown www-data:www-data graphite.db /opt/graphite/bin/carbon-cache.py start

 

 

http://raspberrypi_host 

graphite2

Dallas hitanemi ds18b20 við Raspberrypi

Ræsa upp af Whezzy image. http://www.raspberrypi.org/downloads

tengja siðan við GPIO 4 og pull upp með 3.3 voltum yfir 4.7k viðnám.

 dallas hitanemi dallas

dallas hitanemi

ræsa gpio

root@raspberrypi:/home/pi# modprobe w1-gpio

stilla gpio 4 fyrir hita

root@raspberrypi:/home/pi#  modprobe w1-therm

Sjá hvort nemi hafi komið inn

root@raspberrypi:/home/pi# ls /sys/bus/w1/devices/w1\ bus\ master/
28-0000043a474e  uevent                     w1_master_name     w1_master_search
driver           w1_master_add              w1_master_pointer  w1_master_slave_count
power            w1_master_attempts         w1_master_pullup   w1_master_slaves
subsystem        w1_master_max_slave_count  w1_master_remove   w1_master_timeout
root@raspberrypi:/home/pi#

lesa af nema

root@raspberrypi:/home/pi# cat /sys/bus/w1/devices/w1\ bus\ master/28-0000043a474e/w1_slave
8b 01 4b 46 7f ff 05 10 3a : crc=3a YES
8b 01 4b 46 7f ff 05 10 3a t=24687

hitin er 24.6gr
root@raspberrypi:/home/pi#