[mrtg] Re: mrtg numbers differ from snmpget
Michael Markstaller
mm at elabnet.de
Tue May 6 15:08:23 MEST 2003
What Daniel wrote works correct, but leads to wrong values in the graph on the Y-axis (free kB instead of MB for instance) at least in case of hrStorage.
To be also independant of AllocationUnitSize, you should rather multiply the value from hrStorageUsed with hrStorageAllocationUnits to receive bytes;
replace MaxBytes with the according values from hrStorageSize and multiply also with hrStorageAllocationUnits (which is mostly 4096)
In general I'd suggest you to use kMG with caution..
The following config for Disk works fine for my servers, only do an snmpwalk on OID .1.3.6.1.2.1.25.2.3.1 and replace the index accordingly:
--- cut ---
Target[HOSTNAME.disk1]: 1.3.6.1.2.1.25.2.3.1.6.2&1.3.6.1.2.1.25.2.3.1.6.3:COMMUNITY at HOSTNAME * 1.3.6.1.2.1.25.2.3.1.4.2&1.3.6.1.2.1.25.2.3.1.4.3:COMMUNITY at HOSTNAME
Directory[HOSTNAME.disk1]: HOSTNAME
Options[HOSTNAME.disk1]: gauge,growright
WithPeak[HOSTNAME.disk1]: ymw
Title[HOSTNAME.disk1]: HOSTNAME Disk usage
PageTop[HOSTNAME.disk1]: <h1>HOSTNAME Disk usage</h1>
<TABLE>
<TR><TD>Resource:</TD><TD>Diskspace from Host-Resource-MIB<br>
host.hrStorage.hrStorageTable.hrStorageEntry.hrStorageUsed.x * host.hrStorage.hrStorageTable.hrStorageEntry.hrStorageAllocationUnits.x
</TD></TR>
</TABLE>
MaxBytes1[HOSTNAME.disk1]: 4219568128
MaxBytes2[HOSTNAME.disk1]: 50297552896
YLegend[HOSTNAME.disk1]: Disk usage
ShortLegend[HOSTNAME.disk1]: B
kilo[HOSTNAME.disk1]: 1024
Legend1[HOSTNAME.disk1]: Used Drive C
Legend2[HOSTNAME.disk1]: Used Drive D
Legend3[HOSTNAME.disk1]: Peak Drive C
Legend4[HOSTNAME.disk1]: Peak Drive D
LegendI[HOSTNAME.disk1]: Drive C
LegendO[HOSTNAME.disk1]: Drive D
--- cut ---
Michael
-----Original Message-----
From: Daniel J McDonald [mailto:dan.mcdonald at austinenergy.com]
Sent: Tuesday, May 06, 2003 1:31 PM
To: Reckhard, Tobias
Cc: mrtg
Subject: [mrtg] Re: mrtg numbers differ from snmpget
On Tue, 2003-05-06 at 05:32, Reckhard, Tobias wrote:
> Hello
> I'm observing some strangeness (to me) when trying to graph a number of
> system values acquired from a Solaris 8 box. I'm probably the one who's
> wrong, not mrtg, so I'm looking for help here. This is, I must confess, the
> first time I'm writing mrtg config statements myself.
[...]
> That's a difference of 5493 connections over a five-minute period, which is
> 18.31 connections per second. That falls within the range mrtg finds, but it
> claims there to be around a thousand as many connections. What's wrong here?
>
>From the manual:
kMG
Change the default multiplier prefixes (,k,M,G,T,P). In the tag
ShortLegend define only the basic units. Format: Comma seperated list of
prefixed. Two consecutive commas or a comma at start or end of the line
gives no prefix on this item. Note: If you do not want prefixes, then
leave this line blank.
Example: velocity in nm/s (nanometers per second) displayed in nm/h.
ShortLegend[ezwf]: m/h
kMG[ezwf]: n,u,m,,k,M,G,T,P
options[ezwf]: perhour
Note the leading ',' in the list for a null prefix. Now look at your config:
kMG[hrStorageUsedRAM]: k,M,G,T
You have overridden the default by shifting it by a prefix.
> I've got a number of other problems, some similar, with other parameters as
> well:
>
> * hrStorageUsed.101 and hrStorageUsed.102: mrtg reports zero where snmpget
> reports ~25000 and ~160000 respectively. These variables are type INTEGER,
> I've configured them as gauge, could that be a problem?
>
Shouldn't be, although you might want to tweak your maxbytes a little
higher (or set an absmax value a bit higher).
--
Daniel J McDonald, CCIE 2495, CNX
Austin Energy
--
Unsubscribe mailto:mrtg-request at list.ee.ethz.ch?subject=unsubscribe
Archive http://www.ee.ethz.ch/~slist/mrtg
FAQ http://faq.mrtg.org Homepage http://www.mrtg.org
WebAdmin http://www.ee.ethz.ch/~slist/lsg2.cgi
--
Unsubscribe mailto:mrtg-request at list.ee.ethz.ch?subject=unsubscribe
Archive http://www.ee.ethz.ch/~slist/mrtg
FAQ http://faq.mrtg.org Homepage http://www.mrtg.org
WebAdmin http://www.ee.ethz.ch/~slist/lsg2.cgi
More information about the mrtg
mailing list