LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Other *NIX Forums > *BSD
User Name
Password
*BSD This forum is for the discussion of all BSD variants.
FreeBSD, OpenBSD, NetBSD, etc.

Notices


Reply
  Search this Thread
Old 09-11-2004, 05:50 PM   #1
vladimir-dk
Member
 
Registered: Mar 2004
Location: Denmark
Distribution: Debian, FreeBSD
Posts: 53

Rep: Reputation: 15
FreeBSD - MRTG


I have just installed MRTG on my FreeBSD server and it is now creating statistics on my networkcard.

In my "mrtg.cfg" can i see that you can monitor other interfaces. And now the question. I have a router - can i monitor the traffic on this router using MRTG ?

If yes - how do i configure this ?

Thanks for your time.
 
Old 09-11-2004, 11:54 PM   #2
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
Example from the www.mrkg.com website:

Code:
cfgmaker --global 'WorkDir: /home/httpd/mrtg'  \
          --global 'Options[_]: bits,growright' \
          --output /home/mrtg/cfg/mrtg.cfg    \
           community@router.abc.xyz
From cfgmaker man page at http://people.ee.ethz.ch/~oetiker/we.../cfgmaker.html
Quote:
DESCRIPTION
Cfgmaker creates MRTG configuration files based on information pulled from a router or another SNMP manageable device.
[community@]router

Community is the community name of the device you want to create a configuration for. If not specified, it defaults to 'public'; you might want to try this first if you do not know the community name of a device. If you are using the wrong community name you will get no response from the device.

Router is the DNS name or the IP number of an SNMP-managable device. Following the name you can specify 6 further options separated by colons. The full syntax looks like this:

router[:[prt][:[tmout][:[retr][:[backoff][:vers]]]]]

Of special interest may be the last parameter, vers. If you set this to '2' then your device will be queried with SNMP version 2 requests. This allows to poll the 64 bit traffic counters in the device and will thus work much better with fast interfaces (no more counter overrun). Note that the order in which the routers are specified on the command line do matter as the same order is used when the configuration file is generated. The first specified router has it's configuration lines genrated first, followed by the lines belonging to the next router and so on.

Note that the first line of the generated cfg file will contain all the commandline options you used for generating it. This is to allow for the easy 'regeneration' in case you want to add newhosts or make some other global change.

Last edited by jschiwal; 09-11-2004 at 11:56 PM.
 
Old 09-12-2004, 04:20 AM   #3
vladimir-dk
Member
 
Registered: Mar 2004
Location: Denmark
Distribution: Debian, FreeBSD
Posts: 53

Original Poster
Rep: Reputation: 15
Thx for the reply m8!

But when i run the commands. It just override the "mrtg.cfg" i clear it comepletly.

I can see that the mrtg.cfg (after I have recreated the file) have the possibility to analyse more interfaces.

### Interface 1 >> Descr: 'sis0' | Name: '' | Ip: '10.0.0.3' | Eth: '' ###

Target[127.0.0.1_1]: 1ublic@127.0.0.1:
SetEnv[127.0.0.1_1]: MRTG_INT_IP="10.0.0.3" MRTG_INT_DESCR="sis0"
MaxBytes[127.0.0.1_1]: 1250000
Title[127.0.0.1_1]: Traffic Analysis for 1 -- dfbserver.zoq.dk
PageTop[127.0.0.1_1]: <H1>Traffic Analysis for 1 -- dfbserver.zoq.dk</H1>
<TABLE>
<TR><TD>System:</TD> <TD>dfbserver.zoq.dk in DK</TD></TR>
<TR><TD>Maintainer:</TD> <TD>webmaster@zoq.dk</TD></TR>
<TR><TD>Description:</TD><TD>sis0 </TD></TR>
<TR><TD>ifType:</TD> <TD>ethernetCsmacd (6)</TD></TR>
<TR><TD>ifName:</TD> <TD></TD></TR>
<TR><TD>Max Speed:</TD> <TD>1250.0 kBytes/s</TD></TR>
<TR><TD>Ip:</TD> <TD>10.0.0.3 (dfbserver.zoq.dk)</TD></TR>
</TABLE>


### Interface 2 >> Descr: 'lp0' | Name: '' | Ip: '' | Eth: '' ###
### The following interface is commented out because:
### * it is administratively DOWN
### * it is operationally DOWN
### * has a speed of 0 which makes no sense
#
# Target[127.0.0.1_2]: 2ublic@127.0.0.1:
# SetEnv[127.0.0.1_2]: MRTG_INT_IP="" MRTG_INT_DESCR="lp0"
# MaxBytes[127.0.0.1_2]: 0
# Title[127.0.0.1_2]: Traffic Analysis for 2 -- dfbserver.zoq.dk
# PageTop[127.0.0.1_2]: <H1>Traffic Analysis for 2 -- dfbserver.zoq.dk</H1>
# <TABLE>
# <TR><TD>System:</TD> <TD>dfbserver.zoq.dk in DK</TD></TR>
# <TR><TD>Maintainer:</TD> <TD>webmaster@zoq.dk</TD></TR>
# <TR><TD>Description:</TD><TD>lp0 </TD></TR>
# <TR><TD>ifType:</TD> <TD>para (34)</TD></TR>
# <TR><TD>ifName:</TD> <TD></TD></TR>
# <TR><TD>Max Speed:</TD> <TD>0.0 Bytes/s</TD></TR>
</TABLE>


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


but I cant get it to work without override the original mrtg-config file.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
As a FreeBSD user, what is the best things you like about FreeBSD? t3gah *BSD 6 06-10-2005 02:38 PM
rrd mrtg & mrtg-rrd.cgi ducati620 Linux - Newbie 0 06-03-2004 07:29 PM
help with mrtg adm1329 Linux - Networking 2 04-21-2004 10:17 AM
Mrtg jcb_dreamvsat Linux - Software 3 07-27-2003 03:32 AM
Mrtg mallikarjun Linux - Software 1 12-13-2002 06:52 AM

LinuxQuestions.org > Forums > Other *NIX Forums > *BSD

All times are GMT -5. The time now is 04:07 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration