Collect data from various sensors (see gan
) and use rrdtool
to generate graphs.
My own home monitoring setup involves one instance of stasi
running directly on a Raspberri Pi, which syncs data from multiple Raspberry Pi Zero devices that collect data using gan
.
The ideal way is to start from a gan
instance, as built by gan-gen
.
- Clone the
stasi
repo - Create the config file
sudo apt install python3-rrdtool nginx
- Run the commands manually for the first time - both to make sure it works, and because it will take a long time to sync if you have a lot of data
mkdir /home/gan/stasi-data/
/home/gan/stasi/scripts/sync.sh
python3 /home/gan/stasi/scripts/rrd_import.py /home/gan/stasi-data/
/home/gan/stasi/scripts/graph.sh
- Set up a cron job to do this periodically
sudo touch /var/log/cron.log && chmod a+w /var/log/cron.log
crontab -e
* * * * * /home/gan/stasi/scripts/sync.sh >> /var/log/cron.log 2>&1 && python3 /home/gan/stasi/scripts/rrd_import.py /home/gan/stasi-data/ >> /var/log/cron.log 2>&1 && /home/gan/stasi/scripts/graph.sh >> /var/log/cron.log 2>&1 && echo DONE at
date>> /var/log/cron.log
I use this system for my own home monitoring setup and it works fine, but it might not work for everyone nor is it easy enough to install for everyone.