Web based statistics: Difference between revisions
DXSpider Documentation>G0vgs Created page with "==Web based statistics== ===Generic installation=== From version 1.50, you can use the freeware software MRTG to produce really nice graphical statistics on your web site. For an example try http://www.gb7mbc.net/mrtg/stats.html. The following should help you get it all working. First you need to download the latest version of MRTG from http://people.ee.ethz.ch/~oetiker/webtools/mrtg/. You will also need the following files.. libpng-1.0.14.tar.gz zlib-1.1.4.tar...." |
m Grammar |
||
(2 intermediate revisions by 2 users not shown) | |||
Line 3: | Line 3: | ||
===Generic installation=== | ===Generic installation=== | ||
The Multi Router Traffic Grapher ([https://oss.oetiker.ch/mrtg/ MRTG]) uses network traffic to provide a graphical representation of cluster traffic. An example can be seen with the [https://dxc.mx0nca.uk/mrtg/stats.html 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 [https://oss.oetiker.ch/mrtg/download.en.html 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 | # Update stats for mrtg on website | ||
Line 48: | Line 30: | ||
This will update the site every 5 minutes. | This will update the site every 5 minutes. | ||
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.