zfs monitor (a catchier name may be forthcoming) is a combination of a Python script that runs on your storage servers as a cron job and a Sinatra-based webapp that runs elsewhere to monitor your ZFS storage.
A picture is worth a thousand words, so here are 5000 of them.
- Download the egg here.
- Make sure you have Python >= 2.6 and the requests library installed.
easy_install zfsmond-0.3.1-py2.7.egg
- Copy zfsmond.example.conf
to
/etc/zfsmond.conf
and edit as needed (you will definitely need to set your zfsmon server's hostname) - Add
/usr/bin/updater.py
to the crontab of someone who can runzfs list
andzpool list
. Every 15 minutes is recommended.
- Unzip the webapp tarball
bundle install
- Add a file called auth.yml to this directory with username-password combos for anyone you want
to have access to protected resources (deleting hosts, etc.)
For example,
rainbowdash: cool123 someguy: changeme
ruby start.rb start
- This will start a server on port 4567 using a sqlite database in the directory you unzipped to.
- Next, add a reverse proxy from nginx or Apache to the Thin server on 4567. With Apache,
you can usually just add these lines to your httpd.conf or to the Vhost you want to host
the webapp on:
ProxyPass / http://localhost:4567/ ProxyPassReverse / http://localhost:4567/ ProxyVia On