Forum EUserv

Server-Foren => Server - HowTo's => Thema gestartet von: DReffects am 20.November 2008, 00:42:21

Titel: Tutorial für MRTG?
Beitrag von: DReffects am 20.November 2008, 00:42:21
Tach,

gibts irgendwo bei Euserv eine Trafficstatistik die am Router gegrabbt wird oder hat wer ein Tutorial für die Installation von MRGT?

Mein System ist Debian 4 mit wunderhübschem Plesk

Thx :)
Titel: Re: Tutorial für MRGT?
Beitrag von: cs am 20.November 2008, 12:46:48
Schon mal hier geguckt?

http://oss.oetiker.ch/mrtg/doc/index.en.html
Titel: Re: Tutorial für MRGT?
Beitrag von: atari am 20.November 2008, 14:25:48
aptitude install mrtg mrtgutils
/etc/mrtg.cfg editieren:

WorkDir: /var/www/mrtg

WriteExpires: Yes
Title[^]: Traffic Analysis for
forks: 2
refresh: 300
interval: 5
runasdaemon: yes
Target[index]: `/usr/bin/mrtg-ip-acct eth0`
XSize[index]: 600
YSize[index]: 180
MaxBytes[index]: 125000
Title[index]: servername: eth0
PageTop[index]: Traffic Analysis for servername
WithPeak[index]: w
Options[index]: growright


env LANG=C /usr/bin/mrtg   in der console eingeben
Titel: Re: Tutorial für MRTG?
Beitrag von: DReffects am 20.November 2008, 22:16:14
perfekt, genau sowas hab ich gesucht :)

Jetzt hab ich nur ein Problem: irgendwer lügt.

vnstat erzählt mir:
Traffic average for eth0
      rx          32.61 kB/s            464 packets/s
      tx         924.66 kB/s            648 packets/s

die MRTG auswertung sagt:
In     35.2 kB/s (28.2%)     28.3 kB/s (22.6%)     35.2 kB/s (28.2%)
Out    0.0 B/s (0.0%)    0.0 B/s (0.0%)    0.0 B/s (0.0%)

da durchaus last auf der maschine ist und 0,0 mal etwas unrealistisch ist... woran hängts denn?

Danke :)
Titel: Re: Tutorial für MRTG?
Beitrag von: DReffects am 21.November 2008, 12:45:19
Hab wohl das Problem gefunden.

Bei 100mbit Netzwerkkarten muss MaxBytes[index]: 125000 auf folgenden Wert gestellt werden:

MaxBytes[index]: 12500000
Aus der Doku:

Zitat
MaxBytes

The maximum value either of the two variables monitored are allowed to reach. For monitoring router traffic this is normally the bytes per second this interface port can carry.

If a number higher than MaxBytes is returned, it is ignored. Also read the section on AbsMax for further info. The MaxBytes value is also used in calculating the Y range for unscaled graphs (see the section on Unscaled).

Since most links are rated in bits per second, you need to divide their maximum bandwidth (in bits) by eight (8) in order to get bytes per second. This is very important to make your unscaled graphs display realistic information. T1 = 193000, 56K = 7000, 10 MB Ethernet = 1250000, 100 MB Ethernet = 12500000. The MaxBytes value will be used by mrtg to decide whether it got a valid response from the router.

If you need two different MaxBytes values for the two monitored variables, you can use MaxBytes1 and MaxBytes2 instead of MaxBytes.

Example:

 MaxBytes[myrouter]: 1250000