[mrtg] mrtg log formula known, but don't understand it.
Robin.Butler at ioko.com
Fri Mar 5 12:40:35 MET 2004
I am trying to configure MRTG to monitor a number of routers and
switches but so far I have encountered some problems.
This problem seems to be caused when MRTG is processing data for its log
entry, it multiplies the data by 1000 which causes the entry to exceed
the maximum bandwidth for a given interface and is therefore discarded
by the MRTG logs.
I understand the format of the MRTG log files is as follows:
First line: <UNIX_time_in_seconds_since_epoch>
Data: < UNIX_time_in_seconds_since_epoch>
Initially no data was being recorded in the logs.
After debugging MRTG I understand this was caused by the amount of data
(input and output) exceeding the MaxBytes option. This option was
correctly configured by cfgmaker for the interface bandwidth.
By replacing this value with an insanely high value MRTG started
I understand that MRTG (cfgmaker) calculates MaxBytes as follows:
Interface speed 256Kbps (Kilo bits)
256 / 8 = 32KBps (Kilo Bytes)
32 * 1000 = 32000 B/s (Bytes per second)
MaxBytes = 32000
However, data logged by MRTG seems to massively exceed this threshold.
On further analysis, the following equation seems to be used by MRTG to
calculate a log entry.
((current_input_value_in_bytes - previous_input_value_in_bytes) /
time_interval) * 1K) = data entry
Most of which makes sense except the last multiplication. Why multiply
the data by 1000 when it is already in Bps?
My mrtg.cfg test config file is as follows:
Target[126.96.36.199_3]: 3:COMSTR at 188.8.131.52:
SetEnv[184.108.40.206_3]: MRTG_INT_IP="220.127.116.11" MRTG_INT_DESCR="Serial3/0"
Title[18.104.22.168_3]: Traffic Analysis for 3 - host.domain.com
Thanks in advance,
Firewall and Network Engineer
Tel: 01904 438000
Mob: 07776 198142
Fax: 01904 435450
Email: robin.butler at ioko.com
Unsubscribe mailto:mrtg-request at list.ee.ethz.ch?subject=unsubscribe
FAQ http://faq.mrtg.org Homepage http://www.mrtg.org
More information about the mrtg