MRTG - Config



Bücher | Seti | Netz | W-Forum | Sprüche | Euro | Brasilien
Umfrage | Haftungsausschluss | Lebenslauf | Selbstgemacht | Sitemap | Unglaubliches
Tanzen | Beschreibungen | Downloads | LINKS | Server | Zugriffe | Mrtg
Gästebuch | MC Donalds | Newsletter | Software | Technik


Für Fragen schreiben Sie einfach ein Mail und ich schau mal ob ich es beantworten kann .

 

LINUX Festplattenplatz anzeigen

mrtg.cfg

WorkDir: /www/mrtg/hdc1
Options[hdc1]: absolute,noinfo,growright,transparent,nopercent,gauge
XSize[_]: 350
Ysize[]: 95
kilo[hdc1]: 1024
ShortLegend[hdc1]:MB
YLegend[hdc1]: MB
#Extension[_]: php
Background[_]: #eeee88
Colours[_]: Frei#88ff88,Gesamt#000000,DARKGREEN#006600,VIOLET#ff00ff
Target[hdc1]: `/www/mrtg/hdc1/fest.sh`
SetEnv[hdc1]: MRTG_INT_IP="Programm Volume" MRTG_INT_DESCR="MB"
MaxBytes[hdc1]: 20000000
Title[hdc1]: Festplattenspeicher
PageTop[hdc1]: <H1>LINUX Sicherungen</H1>
<TABLE>
<TR><TD>System:</TD> <TD>LINUX</TD></TR>
</TABLE>

fest.sh

grep="/bin/grep"
cut="/usr/bin/cut"

gesamtbytes=`df -m |grep /dev/hdc1 | cut -c26-35`
freibytes=`df -m |grep /dev/hdc1 | cut -c46-51`

echo $(( $freibytes ))
echo $(( $gesamtbytes ))
exit 0


Seti Prozent Aufzeichnung

mrtg.cfg


WorkDir: /www/mrtg/setiwin
Options[_]: absolute,noinfo,growright,gauge,nopercent
XSize[_]: 350
Ysize[_]: 95
ShortLegend[_]: %
YLegend[_]: %
Background[_]: #c0c0c0c
Colours[_]: VIOLET#bb00ff,Blue#0000ff,DARKGREEN#006600,Violet#ff66ff
Target[seti_2000]: `/www/mrtg/setiwin/leistung.sh`
SetEnv[seti_2000]: MRTG_INT_IP="10.1.63.89" MRTG_INT_DESCR="MB"
MaxBytes[seti_2000]: 100
Title[seti_2000]: Datenverbrauch Analyse setiwin
PageTop[seti_2000]: <H1>Seti Win2000</H1>
<TABLE>
<TR><TD>System:</TD> <TD>Win2000 Seti Berechnet</TD></TR>
<TR><TD>Description:</TD><TD>% </TD></TR>
</TABLE>

leistung.sh

grep="/bin/grep"
cut="/usr/bin/cut"

proc=`lynx -dump /www/mrtg/setiwin/state.sah |grep prog | cut -c8-9`
gesamt=100
echo $(( $proc ))
echo $(( $gesamt ))
exit 0


LINUX Festplattenplatz anzeigen

mrtg.cfg

WorkDir: /www/mrtg/eth0
Options[_]: bits,growright
XSize[_]: 350
Ysize[_]: 95
Background[_]: #a0a0a0a
WorkDir: /www/mrtg/eth0
Options[_]: bits,growright
XSize[_]: 350
Ysize[_]: 95
Background[_]: #a0a0a0a
Target[intern_1]: `/www/mrtg/eth0/mrtg-info-linux.sh eth0 eth0`
SetEnv[intern_1]: MRTG_INT_IP="192.168.20.20" MRTG_INT_DESCR="eth0"
MaxBytes[intern_1]: 1250000
Title[intern_1]: RAW Traffic Analysis for eth0
PageTop[intern_1]: <H1>Interner Datenverkehr eth0</H1>
<TABLE>
<TR><TD>System:</TD> <TD>Linux-Server</TD></TR>
<TR><TD>Maintainer:</TD> <TD>kpeter@eurolab.at</TD></TR>
<TR><TD>Description:</TD><TD>eth0 </TD></TR>
<TR><TD>ifType:</TD> <TD>ethernetCsmacd (6)</TD></TR>
<TR><TD>ifName:</TD> <TD>Realtek 8029</TD></TR>
<TR><TD>Max Speed:</TD> <TD>10.0 Mbits/s</TD></TR>
<TR><TD>Ip:</TD> <TD>192.168.20.20</TD></TR>
</TABLE>

mrtg-info-linux.sh

grep="/bin/grep"
cut="/usr/bin/cut"
uptime="/usr/bin/uptime"
ifconfig="/sbin/ifconfig"
if [ $# -ne 2 ]
then echo "usage: mrtg-info.sh <MRTGname> <localinterface>"; exit 1
else
stat=`$ifconfig $2 |grep 'bytes'`
ibytes=`echo $stat |grep 'bytes'|cut -d":" -f2|cut -d" " -f1`
obytes=`echo $stat |grep 'bytes'|cut -d":" -f3|cut -d" " -f1`
uptim=`$uptime | $cut -d"," -f1`
uptim=`echo $uptim | $cut -d" " -f3,4`
echo $(( $ibytes/8 ))
echo $(( $obytes/8 ))
echo $1 #name for MRTG stat
echo $uptim
exit 0
fi

 

Internet Datenvolumen Anzeigen

( eigene Netzwerkkarte )

mrtg.cfg

WorkDir: /www/mrtg/luwy_einzel
Options[MBl_0]: absolute,noinfo,growright,transparent,nopercent,gauge
XSize[_]: 350
Ysize[]: 95
kilo[MBl_0]: 1024
ShortLegend[MBl_0]:Byte/Monat
YLegend[MBl_0]: BYTE pro Monat
Background[_]: #c0c0c0c
Colours[_]: RED#ff0000,Gelb#ffff00,DARKGREEN#006600,VIOLET#ff00ff
Target[MBl_0]: `/www/mrtg/luwy_einzel/eth1.sh eth1 eth1`
SetEnv[MBl_0]: MRTG_INT_IP="Daten Transfer" MRTG_INT_DESCR="MB"
MaxBytes[MBl_0]: 2000000000
Title[MBl_0]: Datenverbrauch Analyse Luwy
PageTop[MBl_0]: <H1>Analyse Luwy</H1>
<TABLE>
<TR><TD>System:</TD> <TD>Luwy</TD></TR>
<TR><TD>Max Speed:</TD> <TD>Max 2GB/Monat</TD></TR>
</TABLE>

 

eth1.sh

grep="/bin/grep"
cut="/usr/bin/cut"
uptime="/usr/bin/uptime"
ifconfig="/sbin/ifconfig"
if [ $# -ne 2 ]
then echo "usage: mrtg-info.sh <MRTGname> <localinterface>"; exit 1
else
stat=`$ifconfig $2 |grep 'bytes'`
ibytes=`echo $stat |grep 'bytes'|cut -d":" -f2|cut -d" " -f1`
# ibytes =$ ibytes - 694661442
obytes=`echo $stat |grep 'bytes'|cut -d":" -f3|cut -d" " -f1`
# obytes= $obytes - 326098484
uptim=`$uptime | $cut -d"," -f1`
uptim=`echo $uptim | $cut -d" " -f3,4`

 

Internet Datenvolumen Anzeigen

( von Provider )

mrtg.cfg

WorkDir: /www/mrtg/luwy
Options[MB_0]: absolute,noinfo,growright,transparent,nopercent,gauge
XSize[_]: 350
Ysize[]: 95
Factor[MB_0]: 1000
ShortLegend[MB_0]:KByte/Monat
YLegend[MB_0]: KBYTE pro Monat
Background[_]: #c0c0c0c
Colours[_]: red#ff0000,gelb#ffff00,DARKGREEN#006600,VIOLET#ff00ff
Target[MB_0]: `/www/mrtg/luwy/parse.cgi`
SetEnv[MB_0]: MRTG_INT_IP="10.1.63.89" MRTG_INT_DESCR="MB"
MaxBytes[MB_0]: 300000000000000
Title[MB_0]: Datenverbrauch Analyse Luwy
PageTop[MB_0]: <H1>Analyse Luwy</H1>
<TABLE>
<TR><TD>System:</TD> <TD>Luwy</TD></TR>
<TR><TD>Max Speed:</TD> <TD>Max 3GB/Monat</TD></TR>
</TABLE>

parse.cfg

open (MBS,"/www/mrtg/luwy/wert.txt") or die "oeffnen fehlgeschlagen!";
while(<MBS>) 
{
    $zeile=$_;
    chomp($zeile);
    if ($zeile =~ /[ ]{3}([0-9]+\.[0-9]+)$/) 
    {
    $zeile=$1;
    $zeile=$zeile*1000;
    print "$zeile\n3000000\n0\n0\n";
    } 

    else     
   
{
    if ($zeile =~ /[ ]{3}([0-9]+)$/) {
    $zeile=$1;
    $zeile=$zeile*1000;
    print "$zeile\n3000000\n0\n0\n";
    }
}
}
exit(0);

wert.txt

Luwy Statistik
Zugriff von 77.88.55.66
Traffic fuer KPeter
Seit Monatsanfang bis heute 0:00 Uhr:
154.5

Hier gehts zur MRTG Page


kostenlose Statistik