Configure MRTG

Home » Tutorials » MRTG Howto

Step # 5 : Commands to Configure mrtg

(a) Create a document root to store mrtg graphs/html pages for Apache web-server, enter:

# mkdir -p /var/www/html/mymrtg/

(b) Run any one of the following cfgmaker command to create mrtg configuration file:

# cfgmaker --global 'WorkDir: /var/www/html/mymrtg' --output /etc/mrtg/mymrtg.cfg public@localhost

OR (make sure FQDN resolves. In the following example I'm using rh9.test.com i.e. my router's FQDN address)

# cfgmaker --global 'WorkDir: /var/www/html/mymrtg' --output /etc/mrtg/mymrtg1.cfg public@rh9.test.com

(c) Create a default index page for your MRTG configuration, run:

# indexmaker --output=/var/www/html/mymrtg/index.html /etc/mrtg/mymrtg.cfg

(d) Copy all tiny png files to your mrtg path, run:

# cp -av /var/www/html/mrtg/*.png /var/www/html/mymrtg/
First test run of mrtg
Install mrtg if not installed