[mrtg] Adding decimals to graphs
s.shipway at auckland.ac.nz
Tue Nov 20 21:50:02 CET 2007
> The temperature sensor returns the temp using four integers. So, a
> log entry of say, 2010, is actually 20.10 degrees Celsius.
> Unfortunately, mrtg seems rather keen on maintaining the scale in the
> thousands. What I need in effect is to divide all numbers by 100...or
> so I thought.
You can either use '/ 100' on the end of the Target definition (to
divide by 100 after collection the data but before storing it) or else
add 'Factor: 0.01' to divide the value by 100 when the graph is
If you are using native MRTG (as opposed to RRDTool) then the first way
will also round off all decimals (2001 -> 20).
The main difference between these two ways is that the Target way will
store the adjusted data in the database, whereas the Factor way will
store the original unmodified data. The only time this might make a
difference is if you are using thresholding or an external program reads
the database (eg, Nagios check_rrd).
Personally, I prefer to use the Factor method in most cases, but YMMV.
More information about the mrtg