| MRTG Implementation Manual
Table of Contents |
||
|
6. Installing and configuring the RRD database support 6.1 Installing RRD database support The installation steps are: 1. Download the RRDTOOL package and unzip it to the
chosen RRD folder.
2. The package contains the binary files and also the source files for development reference. The src\ folder contains four subfolders where some RRD tools are available in .exe format and they are usable as they are. Copy these files in the rrdtool\bin\ folder for an easier access. Include the rrdtool\bin in the system path. 3. Register RRDTOOL package with the currently installed Perl distribution (at least Perl 5.6). Go to the “perl-shared” folder and run the following command: > ppm install rrds.ppd RRDTOOL is now ready for use. Next step is to configure the MRTG instances to write SNMP data into the RRD databases. 6.2 Configuring MRTG instances
with RRD database support
The MRTG configuration steps are: 1. Build the MRTG .cfg file for the monitored target using the CFGMAKER command as described in paragraph 3.1 2. Update the .cfg file with the following configuration
The MRTG instances with RRD database support can be ran in the same manner as the classic collect-and-graph instances. Run from the command prompt the following command: > perl mrtg [.cfg file] Example: > perl d:\mrtg\bin\mrtg d:\mrtg\ubr-0302-rrdformat.cfg
MRTG will read the SNMP data at the specified interval and will add the values to the database instead of just updating the image-graphs. It is recommended to run these instances as NT/W2K
Services (Windows version).
A RRD database consists of one or multiple Round Robin Archives (RRA), which stores the data for a specific frequency. The values stored in these RRAs are calculated based on one or multiple Data Sources (DS). A DS describes the monitored entity where the SNMP information is collected. The values stored in the RRAs are calculated using
a consolidation function (CF). There are 3 CFs available: Average/Min/Max.
The below picture displays the RRD database generic structure:
The following function displays the structure of a database: > rrdtool info [RRD database] Database structure example, as shown by the above
command:
When you configure MRTG to run with the RRD database support, the MRTG instance creates 8 RRAs for a database. The first RRA[0] keeps the values corresponding to the configured read frequency (ex: 5min) and the next ones RRA[1] – RRA[7] store values that are automatically calculated for larger intervals (30min, 1hour, etc). 6.5 Resizing the database and
extend it over a specific period of time
The MRTG instances first create the RRD databases with a standard size, which covers a short period of continuous data storage. To extend this period to a couple of months or years you need to resize the database to a number of records which corresponds to the desired period and read frequency. To resize a database use the following command: rrdtool resize [RRD database] [RRAx] GROW [# of records to increase] Example: The following command expands a database for a period
of 1 year with a 5min read frequency.
> rrdtool resize 10.0.0.1_fa0_0.rrd
RRA[0] GROW 107136
|