RRDtool is a great way of storing metric data, however the charts it produces look dated now, especially considering how good modern JS based visualization libraries such as D3 have become. I wanted to understand RRDtool better, so this gave me an opportunity to write a front end for RRDTool that uses NVD3 to display RRD data as charts.
The Live Example uses data from the Mosquitto MQTT Server as a source.
First setup a Django project, Once you have the code, install using the supplied setup.py. If you are using git, be sure to use the –recursive flag, or otherwise ensure all sub modules are downloaded before running setup.
$ sudo python setup.py install
Then add ‘rrdviewer’ to your INSTALLED_APPS list in settings.py:
INSTALLED_APPS = ( 'django.contrib.admin', 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.messages', 'django.contrib.staticfiles', .... 'rrdviewer', .... )
Then setup your GRAPH_DIR in settings.py to point to a directory containing a bunch of RRD files. RRDViewer will recursively search that directory for RRD files to include.
Once the application is installed, run collectstatic to copy the static files to their correct location:
$ sudo python manage.py collectstatic
Finally, setup your urls.py to include the urls for rrdviewer at your preferred location:
urlpatterns = patterns('', url(r'^rrdviewer/', include('rrdviewer.urls')), )
You can now restart the web browser and visit the RRDViewer page.