vnstat PHP frontend - a graphical interface for vnStat

See how easy it is to install the vnStat PHP frontend. Read data transfer statistics from vnStat on a web server with PHP and GD. Step-by-step configuration!

This is a very interesting and useful graphical front-end for vnstat, allowing you to read the statistics collected by vnStat quickly and pleasantly, and importantly, without having to log into the shell.

vnstat php frontend
For the program to work we need a web server with PHP support plus the GD library installed for generating charts. Installing the vnstat PHP frontend itself is very simple.

  • we download the application: wget http://www.sqweek.com/sqweek/files/vnstat_php_frontend-1.5.1.tar.gz
  • we unpack the archive: tar -xvf vnstat_php_frontend-1.5.1.tar.gz
  • we move it to the directory pointed to by our web server, e.g: mv vnstat_php_frontend-1.5.1 /var/www/vnstat
  • We edit the vnstat PHP frontend settings: nano vnstat/config.php
  • $iface_list = array('eth0','eth1'); //we specify the network interfaces on which we measure traffic 
    $iface_title['eth0'] = 'Internal';
    $iface_title['eth1'] = 'External';
    //$iface_title['sixxs'] = 'SixXS IPv6'; //if we don't use IPv6, comment out this line
    $vnstat_bin = '/usr/bin/vnstat';  //we provide the path to vnstat
    	
  • there's an option to localize it into Polish: see here
  • and from this moment we can enjoy clear statistics