Web Hosting Talk







View Full Version : MRTG and 95th


MikeA
12-05-2001, 05:11 PM
Can someone tell me how to configure MRTG to do 95th percentile?

cperciva
12-05-2001, 06:02 PM
*MRTG* can't do 95th percentile. There are, however, a number of external packages which can compute it for you.

qps
12-05-2001, 09:21 PM
http://www.seanadams.com/95/

Fremont Servers
12-06-2001, 12:05 AM
95.pl and the patch would do the job. :cool:

cperciva
12-06-2001, 01:34 AM
Note, however, that the code linked above does not work with rrdtool, making it rather deprecated.

qps
12-06-2001, 02:16 AM
Originally posted by cperciva
Note, however, that the code linked above does not work with rrdtool, making it rather deprecated.

Yeah, does anyone know where I can get a version of this that will work with the latest version of MRTG? Or perhaps the version of MRTG this was written for? I thought that it was going to work anyway, but it doesn't appear to be.

cperciva
12-06-2001, 02:23 AM
As far as I know, 95.pl works fine with the latest version of MRTG, as long as rrdtool isn't being used. With rrdtool you need a new way of extracting values from the data file.

Fremont Servers
12-06-2001, 02:26 AM
MRTG, 95.pl, and cisco 2924.

When you install MRTG & 95.pl, does it comment out your port 1 (eth0/0)? Somehow my port 1 (ethernet 0/0) is commented out, and I am trying to figure what have caused it.

:cool:

qps
12-06-2001, 02:28 AM
Originally posted by cperciva
As far as I know, 95.pl works fine with the latest version of MRTG, as long as rrdtool isn't being used. With rrdtool you need a new way of extracting values from the data file.

The patch no longer works... All I get in the HTML files is:

"Last 30 days usage (Metered 95%): kb/sec"

It doesn't actually imput the value from what 95.pl is pulling.

Any ideas?

cperciva
12-06-2001, 02:30 AM
Did you wait for 95.pl to run and create the file on disk which stores the value? The patched mrtg doesn't actually do any 95th percentile work, it just reads a file created by 95.pl.

Fremont Servers
12-06-2001, 02:31 AM
jkehe,

You need to modify the version in the patch to the current version of your MRTG.

I think you have to wait 24 hours for the 95th percentile to show up. :cool:

qps
12-06-2001, 02:56 AM
Originally posted by Asia
You need to modify the version in the patch to the current version of your MRTG.

DUH! Yeah, oops. It's way too late to be playing with this stuff, what the hell was I thinking. Hehehe. Thanks!

Fremont Servers
12-06-2001, 06:01 PM
Do you know of a script that would work with MRTG to produce graph on each account via dedicated/static IP? :cool:

qps
12-07-2001, 01:42 AM
Originally posted by Asia
Do you know of a script that would work with MRTG to produce graph on each account via dedicated/static IP? :cool:

I know of people graphing eth0, but I've never heard of each individual IP address. I'm sure it's possible, however.

jahsh
12-12-2001, 05:32 PM
here is a copy of our config for a cisco 2924xl switch to monitor all 24 ports:

# File Name: mrtg.cfg
WorkDir: Asia insert your directory here please

Title[_]: Cisco Catalyst 2924
Options[_]: integer, noinfo, bits, unknaszero, growright
YLegend[_]: Bits per Second
Kilo[_]: 1024
WithPeak[_]: my
Legend1[_]: Bits In
Legend2[_]: Bits Out
LegendI[_]:   In
LegendO[_]:   Out


# Cisco Catalyst 2924
# >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
Target[Port-1]: 2:<Comm String>$@<IP Address>
MaxBytes[Port-1]: 12500000
PageTop[Port-1]: <FONT SIZE="6"><B>To Port 1</B></FONT><FONT COLOR="000099" SIZE="5"> [F.E Port 0/1 ]</FONT>

#.....................................................................
Target[Port-2]: 3:<Comm String>$@1.1.1.1
MaxBytes[Port-2]: 12500000
PageTop[Port-2]: <FONT SIZE="6"><B>To Port 2 </B></FONT><FONT COLOR="000099" SIZE="5"> [F.E Port 0/2 ]</FONT>
]</FONT>

#---------------------------------------------------------------
Target[Port-3]: 4:<Comm String>$@1.1.1.1
MaxBytes[Port-3]: 12500000
PageTop[Port-3]: <FONT SIZE="6"><B>To Port 3 </B></FONT><FONT COLOR="000099" SIZE="5"> [F.E Port 0/3 ]</FONT>

#---------------------------------------------------------------
Target[Web-mail]: 5:<Comm String>$@1.1.1.1
MaxBytes[Web-mail]: 1250000
PageTop[Web-mail]: <FONT SIZE="6"><B>To Port Web Mail </B></FONT><FONT COLOR="000099" SIZE="5"> [Ethernet Port 0/4 ]</FONT>

#---------------------------------------------------------------
Target[Port-5]: 6:<Comm String>$@1.1.1.1
MaxBytes[Port-5]: 12500000
PageTop[Port-5]: <FONT SIZE="6"><B>To Port 5 </B></FONT><FONT COLOR="000099" SIZE="5"> [F.E Port 0/5 ]</FONT>

#---------------------------------------------------------------
Target[Port-6]: 7:<Comm String>$@1.1.1.1
MaxBytes[Port-6]: 12500000
PageTop[Port-6]: <FONT SIZE="6"><B>To Port 6 </B></FONT><FONT COLOR="000099" SIZE="5"> [F.E Port 0/6 ]</FONT>

#---------------------------------------------------------------
Target[Port-7]: 8:<Comm String>$@1.1.1.1
MaxBytes[Port-7]: 12500000
PageTop[Port-7]: <FONT SIZE="6"><B>To Port 7 </B></FONT><FONT COLOR="000099" SIZE="5"> [F.E Port 0/7 ]</FONT>

#---------------------------------------------------------------
Target[Port-8]: 9:<Comm String>$@1.1.1.1
MaxBytes[Port-8]: 12500000
PageTop[Port-8]: <FONT SIZE="6"><B>To Port 8 </B></FONT><FONT COLOR="000099" SIZE="5"> [F.E Port 0/8 ]</FONT>

#---------------------------------------------------------------
Target[Port-9]: 10:<Comm String>$@1.1.1.1
MaxBytes[Port-9]: 12500000
PageTop[Port-9]: <FONT SIZE="6"><B>To Port 9 </B></FONT><FONT COLOR="000099" SIZE="5"> [F.E Port 0/9 ]</FONT>

#---------------------------------------------------------------
Target[Port-10]: 11:<Comm String>$@1.1.1.1
MaxBytes[Port-10]: 12500000
PageTop[Port-10]: <FONT SIZE="6"><B>To Port 10 </B></FONT><FONT COLOR="000099" SIZE="5"> [F.E Port 0/10 ]</FONT>

#---------------------------------------------------------------
Target[Port-11]: 12:<Comm String>$@1.1.1.1
MaxBytes[Port-11]: 12500000
PageTop[Port-12]: <FONT SIZE="6"><B>To Port 11 </B></FONT><FONT COLOR="000099" SIZE="5"> [F.E Port 0/11 ]</FONT>

#---------------------------------------------------------------
Target[Port-12]: 13:<Comm String>$@1.1.1.1
MaxBytes[Port-12]: 12500000
PageTop[Port-12]: <FONT SIZE="6"><B>To Port 12 </B></FONT><FONT COLOR="000099" SIZE="5"> [F.E Port 0/12 ]</FONT>

#---------------------------------------------------------------
Target[Port-13]: 14:<Comm String>$@1.1.1.1
MaxBytes[Port-13]: 12500000
PageTop[Port-13]: <FONT SIZE="6"><B>To Port 13 </B></FONT><FONT COLOR="000099" SIZE="5"> [F.E Port 0/13 ]</FONT>

#---------------------------------------------------------------
Target[Port-14]: 15:<Comm String>$@1.1.1.1
MaxBytes[Port-14]: 12500000
PageTop[Port-14]: <FONT SIZE="6"><B>To Port 14 </B></FONT><FONT COLOR="000099" SIZE="5"> [F.E Port 0/14 ]</FONT>

#---------------------------------------------------------------
Target[Port-15]: 16:<Comm String>$@1.1.1.1
MaxBytes[Port-15]: 12500000
PageTop[Port-15]: <FONT SIZE="6"><B>To Port 15 </B></FONT><FONT COLOR="000099" SIZE="5"> [F.E Port 0/15 ]</FONT>

#---------------------------------------------------------------
Target[Port-16]: 17:<Comm String>$@1.1.1.1
MaxBytes[Port-16]: 12500000
PageTop[Port-16]: <FONT SIZE="6"><B>To Port 16 </B></FONT><FONT COLOR="000099" SIZE="5"> [F.E Port 0/16 ]</FONT>

#---------------------------------------------------------------
Target[Port-17]: 18:<Comm String>$@1.1.1.1
MaxBytes[Port-17]: 12500000
PageTop[Port-17]: <FONT SIZE="6"><B>To Port 17 </B></FONT><FONT COLOR="000099" SIZE="5"> [F.E Port 0/17 ]</FONT>

#---------------------------------------------------------------
Target[Port-18]: 19:<Comm String>$@1.1.1.1
MaxBytes[Port-18]: 12500000
PageTop[Port-18]: <FONT SIZE="6"><B>To Port 18 </B></FONT><FONT COLOR="000099" SIZE="5"> [F.E Port 0/18 ]</FONT>

#---------------------------------------------------------------
Target[Port-19]: 20:<Comm String>$@1.1.1.1
MaxBytes[Port-19]: 12500000
PageTop[Port-19]: <FONT SIZE="6"><B>To Port 19 </B></FONT><FONT COLOR="000099" SIZE="5"> [F.E Port 0/19 ]</FONT>

#---------------------------------------------------------------
Target[Port-20]: 21:<Comm String>$@1.1.1.1
MaxBytes[Port-20]: 12500000
PageTop[Port-20]: <FONT SIZE="6"><B>To Port 20 </B></FONT><FONT COLOR="000099" SIZE="5"> [F.E Port 0/20 ]</FONT>

#---------------------------------------------------------------
Target[Port-21]: 22:<Comm String>$@1.1.1.1
MaxBytes[Port-21]: 12500000
PageTop[Port-21]: <FONT SIZE="6"><B>To Port 21 </B></FONT><FONT COLOR="000099" SIZE="5"> [F.E Port 0/21 ]</FONT>

#---------------------------------------------------------------
Target[Port-22]: 23:<Comm String>$@1.1.1.1
MaxBytes[Port-22]: 12500000
PageTop[Port-22]: <FONT SIZE="6"><B>To Port 22 </B></FONT><FONT COLOR="000099" SIZE="5"> [F.E Port 0/22 ]</FONT>

#---------------------------------------------------------------
Target[Port-23]: 24:<Comm String>$@1.1.1.1
MaxBytes[Port-23]: 12500000
PageTop[Port-23]: <FONT SIZE="6"><B>To Port 23 </B></FONT><FONT COLOR="000099" SIZE="5"> [F.E Port 0/23 ]</FONT>

#---------------------------------------------------------------
Target[Port-24]: 25:<Comm String>$@1.1.1.1
MaxBytes[Port-24]: 12500000
PageTop[Port-24]: <FONT SIZE="6"><B>To Port 24</B></FONT><FONT COLOR="000099" SIZE="5"> [F.E Port 0/24 ]</FONT>



RunAsDaemon: yes

let me know if you have any questions, it took me like a week to set this up but have it running great now:D

Fremont Servers
12-12-2001, 06:12 PM
jahsh,

I don't know why my port 1 (eth0) got commented out.
Do you know?

Look at my Interface 1
"### The following interface is commented out because:
### * it is a cisco VLAN interface"






-------------------------
# Created by
# /usr/local/mrtg-2/bin/cfgmaker --global 'WorkDir: /home/mrtg' --global 'Option
s[_]: bits,growright' --output /home/mrtg/cfg/mrtg.cfg public@<ip address>


### Global Config Options

# for UNIX
# WorkDir: /home/http/mrtg

# or for NT
# WorkDir: c:\mrtgdata

### Global Defaults

# to get bits instead of bytes and graphs growing to the right
# Options[_]: growright, bits

WorkDir: /home/mrtg
Options[_]: bits,growright

######################################################################
# System: Earth
# Description: Cisco Internetwork Operating System Software
# IOS (tm) C2900XL Software (C2900XL-C3H2S-M), Version 12.0(5.4)WC(1),
MAINTENANCE INTERIM SOFTWARE
# Copyright (c) 1986-2001 by cisco Systems, Inc.
# Compiled Tue 10-Jul-01 11:52 by devgoyal
# Contact:
# Location:
######################################################################


### Interface 1 >> Descr: 'VLAN1' | Name: 'VL1' | Ip: '<ip address>' | Eth: '00
-d0-bb-cf-62-40' ###
### The following interface is commented out because:
### * it is a cisco VLAN interface
#
# Target[<ip address>_1]: 1:public@<ip address>:
# SetEnv[<ip address>_1]: MRTG_INT_IP="<ip address>" MRTG_INT_DESCR="VLAN1"
# MaxBytes[<ip address>_1]: 1250000
# Title[<ip address>_1]: Traffic Analysis for 1 -- Earth
# PageTop[<ip address>_1]: <H1>Traffic Analysis for 1 -- Earth</H1>
# <TABLE>
# <TR><TD>System:</TD> <TD>Earth in </TD></TR>
# <TR><TD>Maintainer:</TD> <TD></TD></TR>
# <TR><TD>Description:</TD><TD>VLAN1 </TD></TR>
# <TR><TD>ifType:</TD> <TD>ethernetCsmacd (6)</TD></TR>
# <TR><TD>ifName:</TD> <TD>VL1</TD></TR>
# <TR><TD>Max Speed:</TD> <TD>0.0 Mbits/s</TD></TR>
# <TR><TD>Ip:</TD> <TD><ip address> ()</TD></TR>
# </TABLE>

### Interface 2 >> Descr: 'FastEthernet0/1' | Name: 'Fa0/1' | Ip: '' | Eth: '00-
d0-bb-cf-62-41' ###

Target[<ip address>_2]: 2:public@<ip address>:
SetEnv[<ip address>_2]: MRTG_INT_IP="" MRTG_INT_DESCR="FastEthernet0/1"
MaxBytes[<ip address>_2]: 12500000
Title[<ip address>_2]: Traffic Analysis for 2 -- Earth
PageTop[<ip address>_2]: <H1>Traffic Analysis for 2 -- Earth</H1>
<TABLE>
<TR><TD>System:</TD> <TD>Earth in </TD></TR>
<TR><TD>Maintainer:</TD> <TD></TD></TR>
<TR><TD>Description:</TD><TD>FastEthernet0/1 </TD></TR>
<TR><TD>ifType:</TD> <TD>ethernetCsmacd (6)</TD></TR>
<TR><TD>ifName:</TD> <TD>Fa0/1</TD></TR>
<TR><TD>Max Speed:</TD> <TD>0.0 Mbits/s</TD></TR>
</TABLE>


.
.
.
.

### Interface 26 >> Descr: 'Null0' | Name: 'Nu0' | Ip: '' | Eth: '' ###
### The following interface is commented out because:
### * it is a cisco Null0 interface
#
# Target[<ip address>_26]: 26:public@<ip address>:
# SetEnv[<ip address>_26]: MRTG_INT_IP="" MRTG_INT_DESCR="Null0"
# MaxBytes[<ip address>_26]: 536870911
# Title[<ip address>_26]: Traffic Analysis for 26 -- Earth
# PageTop[<ip address>_26]: <H1>Traffic Analysis for 26 -- Earth</H1>
# <TABLE>
# <TR><TD>System:</TD> <TD>Earth in </TD></TR>
# <TR><TD>Maintainer:</TD> <TD></TD></TR>
# <TR><TD>Description:</TD><TD>Null0 </TD></TR>
# <TR><TD>ifType:</TD> <TD>Other (1)</TD></TR>
# <TR><TD>ifName:</TD> <TD>Nu0</TD></TR>
# <TR><TD>Max Speed:</TD> <TD>0.0 Mbits/s</TD></TR>
# </TABLE>
-------------------------------------

jahsh
12-12-2001, 07:24 PM
keep in mind I dont know to much about this either but the only difference I see is that I started my 1st Target (port-1) at
2:<com string>@x.x.x.x and you started at 1, you might try adjusting yours to start at 2 and then go from there. I have a question for you. How did you get the 95th percentile to graph on the html output?

Fremont Servers
12-12-2001, 07:30 PM
You use the patch and 95.pl at http://www.seanadams.com/95/.

Fremont Servers
12-12-2001, 08:06 PM
Let me create an mrtg.cfg file using your code to see if it helps. :D

Fremont Servers
12-18-2001, 04:11 PM
I use cfgmaker to create mrtg.cfg

Whenever I add a server to a port, I need to run cfgmaker for it to recognize/update the ports.

If I create my own mrtg.cfg,how do you get it to recognize/update the ports?

:cool:

Fremont Servers
12-19-2001, 03:32 PM
Anyone know? :blush: