[ previous ] [ next ] [ threads ]
 
 From:  "Frans King" <kingf1 at cs dot man dot ac dot uk>
 To:  <m0n0wall at lists dot m0n0 dot ch>
 Subject:  RE: [m0n0wall] snmp / mrtg, how to get started
 Date:  Tue, 21 Oct 2003 01:11:44 +0100
Here's an example mrtg.cfg file. When run mrtg will daemonize and query
the m0n0wall box every 5 minutes. 

------------

WorkDir: /home/www-f334.net/html/admin/gollum/mrtg
LoadMIBs: /usr/share/snmp/mibs/UCD-SNMP-MIB.txt

RunAsDaemon: Yes
Interval: 5


Target[lan]: 1:public@10.0.1.1
PageTop[lan]: <H2>LAN interface on gollum.intranet.f333.net</H2>
Title[lan]: LAN traffic on gollum.intranet.f333.net
WithPeak[lan]: wym
Suppress[lan]: y
MaxBytes[lan]: 12500000

------------


So you would configure something like:

-----------

WorkDir: <where you want the output to go>
LoadMIBs: /usr/share/snmp/mibs/UCD-SNMP-MIB.txt

RunAsDaemon: Yes
Interval: 5


Target[lan]: <interface number>:public@<ip address of m0n0wall>
PageTop[lan]: <html title>
Title[lan]: <html title>
WithPeak[lan]: wym
Suppress[lan]: y
MaxBytes[lan]: <max bytes your interface can handle. E.g. 100mbs =
12500000>

Target[wan]: <interface number>:public@<ip address of m0n0wall>
PageTop[wan]: <html title>
Title[wan]: <html title>
WithPeak[wan]: wym
Suppress[wan]: y
MaxBytes[wan]: <max bytes your interface can handle. E.g. 100mbs =
12500000>

Target[opt1]: <interface number>:public@<ip address of m0n0wall>
PageTop[opt1]: <html title>
Title[opt1]: <html title>
WithPeak[opt1]: wym
Suppress[opt1]: y
MaxBytes[opt1]: <max bytes your interface can handle. E.g. 100mbs =
12500000>


Etc.
--------------

HTH,

Frans



-----Original Message-----
From: Chad R. Larson [mailto:clarson at eldocomp dot com] 
Sent: 20 October 2003 23:30
To: Michel Schilthuizen; m0n0wall at lists dot m0n0 dot ch
Subject: Re: [m0n0wall] snmp / mrtg, how to get started

At 05:00 PM 10/19/2003 +0200, Michel Schilthuizen wrote:
>However, I am not really able to figure out how it should work. I
assume 
>M0n0wall sends snmptraps to a machine (what does system contact mean), 
>which logs the traps, which are used by mrtg?

Not quite.  Instead of traps, the information is collected by SNMP
"get"s, 
done by default every five minutes.  MRTG keeps a circular log file of
all 
the responses for a year(!) under a filename derived from the interface 
name, and uses a graphics package to generate PNG images of the graphs
and 
an HTML page with stats and the graph.  You point your web server, via a

symlink or whatever, to the logging directory MRTG keeps, and you'll
find 
valid web pages there.

For example, my Apache server looks in /usr/local/var/mrtg for the web 
pages.  Here's the "index.html" file from within that directory:

<html>
<title>Network Traffic Analysis at Eldorado Headquarters</title>
<body>

<h1 align=center style='text-align:center'>
Network Traffic Analysis at Eldorado Headquarters</h1>
<HR SIZE=4>
<FONT SIZE=5>
For Eldorado backhaul traffic
click <A HREF="ecibh.html"> here</A>.
<P>
For Eldorado border router (test) traffic
click <A HREF="ecibr1.html"> here</A>.
<P>
For customer private line traffic
click <A HREF="ecipl.html"> here</A>.
<P>
For the Intel Wireless Access Points
click <A HREF="eciwap.html"> here</A>.
<P>

</FONT>
<CENTER>
<HR SIZE=4><A HREF="http://www.FreeBSD.org/"><IMG SRC="./powerani.gif"
ALT="Pow
ered by FreeBSD" BORDER=0 HEIGHT=64 WIDTH=171 ALIGN=CENTER></A><A
HREF="http://
www.apache.org/"><IMG SRC="./apache_pb2_ani.gif" ALT="Powered by Apache"
BORDER
=0 HEIGHT=32 WIDTH=259
ALIGN=CENTER></A>
</P></CENTER>

<P>Web pages maintained by:
<A HREF="mailto:clarson at eldocomp dot com">Chad R. Larson</A>

</body>
</html>

And here's the contents of "ecibr1.html":

<html>
<title>Network Traffic Analysis at Eldorado Headquarters</title>
<body>

<h1 align=center style='text-align:center'>
Network Traffic Analysis Test Border Firewall.</h1>
<HR SIZE=4>
<FONT SIZE=5>
For LAN traffic,
click <A HREF="net4501_1.html"> here</A>.
<P>
For WAN traffic,
click <A HREF="net4501_2.html"> here</A>.
<P>
For OPT (bridged) traffic,
click <A HREF="net4501_3.html"> here</A>.
<P>


</FONT>
<CENTER>
<HR SIZE=4><A HREF="http://www.FreeBSD.org/"><IMG SRC="./powerani.gif" 
ALT="Powered by FreeBSD" BORDER=0 HEIGHT=64 WIDTH=171
ALIGN=CENTER></A><A 
HREF="http://www.apache.org/"><IMG SRC="./apache_pb2_ani.gif"
ALT="Powered 
by Apache" BORDER=0 HEIGHT=32 WIDTH=259
ALIGN=CENTER></A>
</P></CENTER>

<P>Web pages maintained by:
<A HREF="mailto:clarson at eldocomp dot com">Chad R. Larson</A>

</body>
</html>

Clear enough?
          -crl -- Chad R. Larson (CRL22)    chad at eldocomp dot com   Eldorado

Computing, Inc.   602-604-3100      5353 North 16th Street, Suite 
400        Phoenix, Arizona   85016-3228 

-- CONFIDENTIALITY NOTICE --

This message is intended for the sole use of the individual and entity
to whom it is addressed, and may contain information that is privileged,
confidential and exempt from disclosure under applicable law. If you are
not the intended addressee, nor authorized to receive for the intended
addressee, you are hereby notified that you may not use, copy, disclose
or distribute to anyone the message or any information contained in the
message. If you have received this message in error, please immediately
advise the sender by reply email, and delete the message. Thank you.