Install MRTG

MRTG can run on the web server and monitor both firewall and web server. MRTG queries hosts through SNMP.

# pkg_add mrtg
jpeg-6bp3: complete
png-1.2.28: complete
gd-2.0.35: complete
p5-IO-INET6-2.01p0:p5-Socket6-0.20: complete
p5-IO-INET6-2.01p0: complete
p5-Net-SNMP-5.2.0:p5-Crypt-DES-2.05p0: complete
p5-Net-SNMP-5.2.0:p5-Digest-SHA1-2.11p0: complete
p5-Net-SNMP-5.2.0:p5-Digest-HMAC-1.01p0: complete
p5-Net-SNMP-5.2.0: complete
p5-SNMP_Session-1.07p1: complete
mrtg-2.15.2p2: complete

Edit /etc/rc.conf.local to start snmpd at boot.

snmpd_flags=""          # for normal use: ""

Create config file for mrtg.

cfgmaker --global 'WorkDir: /var/www/pages/mrtg' \
         --global 'Options[_]: bits,growright' \
         --output /etc/mrtg.cfg \
         localhost

Run mrtg once.

mrtg /etc/mrtg.cfg --logging /var/log/mrtg.log

Run from cron or rc.d. TBD

Show from webserver. TBD

References