|
In H-Sphere 2.5 and up the MRTG software is used for
the dedicated hosting feature. This software is installed to H-Sphere as a logical server
from hsphere-mrtg-rrd-X-X package, where X-X is the latest available version.
Mrtg service is managed by supervise, similarly to clamd, spamd, ftpd, and bind. Apache
service with configured VirtualHost for mrtg service is required which is provided by Apache
configuration in version 2.5 and up.
RRD Tool Integration
Mrtg works with RRDtool which improves its performance
and graphing flexibility. RRDtool is used as the logger to MRTG. It stores data samples on each of the network switch interfaces (ports) in a
separate RRD. To minimize size of the database files, RRD uses the consolidation mechanism. It guarantees that the database does not grow over
time and that old data is automatically eliminated. However this leads to degradation of accuracy. For the sake of high degree of data
accuracy, space for 10080 samples (35 days) is allocated. The DSBandwidthLoader daily cron acquires data from RRDs and stores it into the
hsphere database.
Managing MRTG Service
For Linux:
/etc/init.d/mrtg stop | start | restart | stat
For FreeBSD:
/usr/local/etc/rc.d/mrtg.sh stop | start | restart | stat
Configuration Directory and File
Mrtg configuration directory is /hsphere/local/config/mrtg.
/hsphere/local/config/mrtg/mrtg.conf - mrtg configuration file. It has an include for
/hsphere/local/config/mrtg/ports/index.conf which in its turn contains includes for files corresponding to each opeational
switch port. Such files are generated dynamically via CP interface when switch ports are assigned to dedicated servers.
Scripts Processing Data
/hsphere/local/config/mrtg/scripts/getstatistics - gathers data from each port file.
/hsphere/local/config/mrtg/scripts/setstartbill - sets the start billing period date.
/hsphere/local/config/mrtg/scripts/formgraph - draws traffic graphs.
RRD Files
Mrtg writes RRD files to /hsphere/local/config/mrtg/rrd directory. In its subdirectories image files with bandwidth
representations for chosen periods are located:
- ~httpd/htdocs/rrd/d - day
- ~httpd/htdocs/rrd/w - week
- ~httpd/htdocs/rrd/m - month
- ~httpd/htdocs/rrd/y - year
|