[mrtg] Re: unknown values
Ashley Morrison
Ashley.Morrison at SMC.sa.edu.au
Thu Aug 17 01:34:09 MEST 2006
Steve,
Is there a way in routers2 to have a UNKN shown as last value and not a
grey area on the graphs??
I have several large printer farms that I monitor the toner levels in,
looking for trends and rate of usage, but there are turned off after
hours (reduce fire hazard) and it is ok to look at day or week graphs,
but monthly is hard to read as most of the graph is grey.
I have looked through the docs and faq, but no luck or maybe I just
can't read.
Sorry I know this is a routers2 question on the mrtg list, but I am sure
I might not be the only person wondering this.
More detail:
1 example-
Colour laser printer, 4 toners each are recorded as separate target
using mrtg/rrdtool, then a user defined graph is used to display all 4,
using:
routers.cgi*options[all4600toner]: integer nototal nodetails noo
Cheers ... Ash
Ashley Morrison, MCSE MCP DCE
Network Administrator
St. Michael's College
15 Mitton Ave
Henley Beach, SA, 5022
Ph: +61 8 8356 5966
Internet: www.smc.sa.edu.au
SAGE-AU Member
www.sage-au.org.au
-----Original Message-----
From: mrtg-bounce at list.ee.ethz.ch [mailto:mrtg-bounce at list.ee.ethz.ch]
On Behalf Of Steve Shipway
Sent: Thursday, 17 August 2006 8:19 AM
To: David Grohmann; mrtg at list.ee.ethz.ch
Subject: [mrtg] Re: unknown values
David Grohmann wrote:
> I understand the MRTG has 2 ways of dealing with unknowns.
> The default is to assume the previous value, and the other option is
> to assume zero.
Technically, what happens is that if the unknaszero option is set then a
0 is stored in the database, otherwise an UNKN is stored. The non-rrd
MRTG will display an UNKN as the previous value, as will 14all.cgi.
routers2.cgi displays an UNKN as a grey bar, unless unknaszero is set in
which case it is displayed as zero. I'm not sure what mrtg-rrd.cgi
does.
> However, while computing a large expression from different hosts,
> specifically an average in my case. If any of the values in the
> expression or unknown then the whole target reverts to either zero or
> flat line.
This is because any expression containing an unknown gives an unknown.
routers.cgi gets around this in userdefined graphs by making totals and
averages be over all non-unknown values, unless unknaszero is set in
which case they are treated as zero.
> For example, I'm trying to get the average cpu usage in a room (among
> many other averages ram usage, disk usage, network throughput), if
> host A goes offline for whatever reason I would prefer that the
> calculation go on assuming that Host A's cpu usage is zero(or use the
> previous value of host A's cpu usage) and have the calculated target
> still give out a meaningful value instead of it reverting to zero or
> the previous value of the target.
>
> Is there anyway to do this?
You can do this with routers2, by defineing all the various host
targets, then defining a userdefined graph with average line over the
top of the multiple targets. Here, I use this to give average webserver
activities over all the active hosts in the web farm, for example.
To do this in a single MRTG target, you will need to write a wrapper
script yourself that retrieves the data and does the average calculation
taking into account the unknowns.
Of course I'm biased in promoting routers2 as a universal panacea,
though...
Steve
--
Unsubscribe mailto:mrtg-request at list.ee.ethz.ch?subject=unsubscribe
Archive http://lists.ee.ethz.ch/mrtg
FAQ http://faq.mrtg.org Homepage http://www.mrtg.org
WebAdmin http://lists.ee.ethz.ch/lsg2.cgi
--
Unsubscribe mailto:mrtg-request at list.ee.ethz.ch?subject=unsubscribe
Archive http://lists.ee.ethz.ch/mrtg
FAQ http://faq.mrtg.org Homepage http://www.mrtg.org
WebAdmin http://lists.ee.ethz.ch/lsg2.cgi
More information about the mrtg
mailing list