Web based statistics: Difference between revisions

From DXSpider Documentation Wiki
Jump to navigation Jump to search
G0TRT (talk | contribs)
Complete scrub based on Mike G3YPP's notes
WI3W (talk | contribs)
m Grammar
 
Line 10: Line 10:
  sudo apt-get -y install mrtg
  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:
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 do and don't want, but initially it's worth getting them all. At the console run the command:


  mrtg all
  mrtg all

Latest revision as of 00:00, 6 April 2025

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 do 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.