Commands to allow MRTG to graph Wan Port

Unanswered Question
Dec 23rd, 2003

How do I setup up the CISCO 1605R router so that MRTG is able to calculate the WAN port traffic. What commands/syntax do I need to type in and where. Please give me the commands and all the steps to allow MRTG to graph the WAN port. I am a newbie to MRTG, thanks.

I have this problem too.
0 votes
  • 1
  • 2
  • 3
  • 4
  • 5
Average Rating: 0 (0 ratings)
r.wilcox Tue, 12/23/2003 - 18:29

Hi,

I am not aware of any special command that you need to enable on the router in order to capture and graph wan utilization. MRTG queries the router using SNMP to get stats on the interfaces at intervals you setup within MRTG. As long as the system you have MRTG running on can accsess/query the router, you should be able to get the information you need.

Setting up MRTG can be the tricky part sometimes. But there are several good references on the internet, starting with the MRTG website: http://people.ee.ethz.ch/~oetiker/webtools/mrtg/

Have you setup MRTG yet and tried to query the router?

Thanks,

Robert

huytuan Tue, 12/23/2003 - 18:44

I am still trying to set it up. That means I need to create a public community SMNP on the Wan interface. What SMNP syntax commands do I need to type on the WAN interface would you know.

eg smnp interface e 0 ???

r.wilcox Tue, 12/23/2003 - 19:00

Hi

I don't believe you have to specify a community SNMP on the wan interface. As long as the snmp settings are part of the global router config you should be fine. You do need to know what the public community string is however (usually "Public" by default).

For example, on one of our 1602 routers we have the following:

snmp-server community public RO 1

snmp-server community password xxxx

snmp-server trap-authentication

snmp-server contact me@domain.com

snmp-server system-shutdown

snmp-server enable traps config

snmp-server enable traps frame-relay

snmp-server enable traps isdn call-information

snmp-server host 10.0.0.20 public

You don't have to have all of these settings to run MRTG, however.

When configuring your MRTG, you should only have to enter this at a command prompt:

perl cfgmaker public@x.x.x.x --global 'WorkDir: D:\Inetpub\wwwroot\mrtg' --output mymrtgfile.cfg

Where x.x.x.x is the IP address of your router and the path following WorkDir: is were you want your graphs to be saved. The mymrtgfile.cfg is the file that contains all the information MRTG will need to update your graphs and query your router interfaces.

I run MRTG on Window 2000, if you are running it on Linux, it will be slightly different as far as the path location.

Does this help at all?

Thanks,

Robert

huytuan Mon, 12/29/2003 - 16:55

Thanks Robert, at long last I've got the MRTG to graph my WAN port which is a good start. But what I really wanted is for a SNMP software such as MRTG to present the traffic as Megabytes every five minutes, 1 hour, 1 day, 1 week, 1 months interval. At the moment MRTG only graphs these intervals but not present the actual figures, is there a MRTG command that allows me to do this??? Or can MRTG be tuned to do it? Or is there other SNMP software that present the figures??

r.wilcox Tue, 12/30/2003 - 18:38

Hi,

I not sure I understand what you are asking. Are you indicating that the MRTG just made one set of graphs and stopped? And you would like it to update all the time, right?

If so, yes, MRTG can do that. There are several ways you can get MRTG to update the graphs and provide you with up to the minute information.

What I have done is this:

I added the following lines to the top of my mrtg.cfg file (under the global defaults section):

RunAsDaemon: yes

Interval: 5

Options[_]: growright, bits

This will make MRTG run as a service (a daemon) and update the graphs at 5 minute intervals. The last option will have the graph grow from left to right instead of the reverse (just my own preference). The "bits" part will make the graphs scale to bits. I find this better because it's easier to use when talking about bandwidth, for example a T1 is 1.544 Mega bits/second.

The next thing I did was to schedule a task (using the Microsoft task scheduler), which makes the MRTG script run whenever the system is restarted. This works out nice because it doesn't require anyone to login to the system to make it work.

You could also put a short-cut to the script in the start up folder and that would start it provided someone logged in.

There are a few other free apps out there that can be used to do the same things. You can find links to the others on the MRTG homepage.

I hope this helps.

Thanks,

Robert

huytuan Tue, 12/30/2003 - 19:01

Hi Robert, what I mean is MRTG only shows the graph of the traffic at the set time intervals of 5min, 1hour, 1 day, 1month, 1year. The graph of the traffic is not really what I wanted. I need the figures at these time intervals 5min, 1hour, 1day, 1month, 1year, eg at 5min 15MB - at 10min 34MB - at 30min 89MB - at 1day 467MB inflow into the WAN port and 20MB outflow of the WAN ports. I need figures presentation of traffic flow not the graph presentation.

Actions

Login or Register to take actions

This Discussion

Posted December 23, 2003 at 6:01 PM
Stats:
Replies:6 Avg. Rating:
Views:418 Votes:0
Shares:0
Tags: No tags.

Discussions Leaderboard

Rank Username Points
1 2,069
2 1,732
3 1,675
4 1,624
5 1,529