Web based statistics
Web based statistics
Generic installation
The Multi Router Traffic Grapher (MRTG) uses network traffic to provide a graphical representation of cluster traffic. An example can be seen with the node statistics for MX0NCA
Setting up a web environment such as Apache2 is outside the scope of this page, and whilst MRTG can be downloaded from its website, it can generally be installed as a Linux package. Under Debian the package is called mrtg, installing it this way will ensure that all dependencies are installed. Using the root account at the Linux prompt:
sudo apt-get update sudo apt-get -y install mrtg
As sysop, copy the image files from MRTG (in /usr/share/mrtg) to your ../spider/html/mrtg. MRTG can make many graphs, and it's possible to select which you don't and don't want, but initially it's worth getting them all. At the console run the command:
mrtg all
Then at the Linux command prompt, as sysop, in ../spider/html/mrtg run the command below putting your node callsign in place of <node-name>
indexmaker --output stats.html --columns=1 --title "Node statistics for <node-name>" ../../mrtg/mrtg.cfg
Your web server needs to know where the files are to publish, using the link below is one approach. As the sysop, in /home/sysop/ run the following command
sudo ln -s /spider/html/mrtg /var/www/<domain name>/public_html
Your browser should now see the graphs at http(s)://<domain-name>/mrtg/stats.html
To get refreshed graphs every 5 minutes, add the following line into your dxspider crontab:-
# Update stats for mrtg on website 00,05,10,15,20,25,30,35,40,45,50,55 * * * * run_cmd('mrtg all')
This will update the site every 5 minutes.