1) Install MRTG and RRDTOOL ------------------------ MRTG -> http://oss.oetiker.ch/mrtg RRDTOOL -> http://oss.oetiker.ch/rrdtool I run MRTG and RRDTOOL on a completely separate server from my JNOS system, so in my case I have to make sure IP routing is in place such that my MRTG is able to read SNMP data from my JNOS system. This separate server is also running apache to service my general webpages, including the SNMP stats. 2) Create your MRTG configuration file - mrtg.cfg ---------------------------------------------- # WorkDir: /var/www/htdocs/yourwebsite/mrtg/jnos # LogFormat: rrdtool # Options[_]: noinfo,nobanner,growright,logscale XSize[_]: 300 YSize[_]: 100 # EnableIPv6: no NoMib2: Yes # # JNOS 2.0 interfaces # bob is a wormhole to Bob's system Target[bob]: #bob:password@ipaddressofmyjnossystem: MaxBytes[bob]: 150 PNGTitle[bob]: Bob (AXIP) Title[bob]: Bob # gus is a wormhole to Gus' system Target[gus]: #gus:password@ipaddressofmyjnossystem: MaxBytes[gus]: 150 PNGTitle[gus]: Gus (AXIP) Title[gus]: Gus # vhf is a 1200 baud radio port Target[vhf]: #vhf:password@ipaddressofmyjnossystem: MaxBytes[vhf]: 150 PNGTitle[vhf]: Vhf (145.01) Title[vhf]: 145.010 Mhz 1200 Baud 3) Create a script to make the pretty pictures - gengraph.sh --------------------------------------------------------- # # Generate two pictures - one for wormholes, one for my RF port # # IMPORTANT : do NOT use STACK on the very first AREA for each # 'group' of items you are plotting. If you have only 1 item, then # don't use STACK at all in the AREA directives, you will see this # in the sample script below, it should be obvious. # cd /var/www/htdocs/yourwebsite/mrtg/jnos # # Generate first picture of both wormhole's traffic # rrdtool graph pastday.png -a PNG \ \ -A --width 600 --height 300 \ \ DEF:bob_in=bob.rrd:ds0:AVERAGE \ DEF:bob_out=bob.rrd:ds1:AVERAGE \ DEF:gus_in=gus.rrd:ds0:AVERAGE \ DEF:gus_out=gus.rrd:ds1:AVERAGE \ \ CDEF:bobO=bob_out,-1,* \ CDEF:gusO=gus_out,-1,* \ \ AREA:bob_in#00FF00:"Bob in" \ AREA:gus_in#FF0000:"Gus in":STACK \ \ AREA:bobO#FFFF00:"Bob out" \ AREA:gusO#00FFFF:"Gus out":STACK # Generate second picture of the RF traffic rrdtool graph pastdayRFonly.png -a PNG \ \ -A --width 200 --height 100 \ \ DEF:vhf_in=vhf.rrd:ds0:AVERAGE \ DEF:vhf_out=vhf.rrd:ds1:AVERAGE \ \ CDEF:vhfO=vhf_out,-1,* \ \ AREA:vhf_in#999999:"Vhf in" \ \ AREA:vhfO#992200:"Vhf out" 3) Setup a crontab --------------- # # MRTG is run every 5 minutes # 0,5,10,15,20,25,30,35,40,45,50,55 * * * * /usr/local/mrtg-2/bin/mrtg --logging=/var/www/htdocs/yourwebsite/mrtg/jnos/mrtg.log /var/www/htdocs/yourwebsite/mrtg/jnos/mrtg.cfg # # The pretty pictures are generated every 15 minutes # 1,16,31,46 * * * * sh /var/www/htdocs/yourwebsite/mrtg/jnos/gengraph.sh # 4) Configure snmpd in JNOS - autoexec.nos ------------------------------------- # snmp ro password 192.168.1. snmp ro password WWW.XXX.YY.ZZZ # start snmpd # 5) Reference your pretty pictures in a status page or something ------------------------------------------------------------

Local RF traffic for my system

Wormhole traffic for my system