fff-wue2

1. DHCP-Leases
dhcpleasecount Traffic Graph
2. Active CPU Load %
localhost.cpu Traffic Graph
3. #bat0 -- fff-wue2
localhost_bat0 Traffic Graph
4. #bat3 -- fff-wue2
localhost_bat3 Traffic Graph
5. #bat4 -- fff-wue2
localhost_bat4 Traffic Graph
6. #bat5 -- fff-wue2
localhost_bat5 Traffic Graph
7. #br0 -- fff-wue2
localhost_br0 Traffic Graph
8. #br3 -- fff-wue2
localhost_br3 Traffic Graph
9. #br4 -- fff-wue2
localhost_br4 Traffic Graph
10. #br5 -- fff-wue2
localhost_br5 Traffic Graph
11. #eth0 -- fff-wue2
localhost_eth0 Traffic Graph
12. #eth1 -- fff-wue2
localhost_eth1 Traffic Graph
13. #eth4 -- fff-wue2
localhost_eth4 Traffic Graph
14. #fff-wue1 -- fff-wue2
localhost_fff-wue1 Traffic Graph
15. #fffaschv2VPN -- fff-wue2
localhost_fffaschv2vpn Traffic Graph
16. #fffcrailsv2VPN -- fff-wue2
localhost_fffcrailsv2vpn Traffic Graph
17. #fffdinkelsv2VPN -- fff-wue2
localhost_fffdinkelsv2vpn Traffic Graph
18. #fffwbgv2VPN -- fff-wue2
localhost_fffwbgv2vpn Traffic Graph

MRTG Multi Router Traffic Grapher
version 2.17.7 Tobias Oetiker <tobi@oetiker.ch> and Dave Rand <dlr@bungi.com>

DHCP-Statistik

Text

Anzahl DHCP-Clients: dhcpcountgesamt
Anzahl DHCP-Clients Wuerzburg: dhcpcountwuerzburg
Anzahl DHCP-Clients Nuernberg: dhcpcountnuernberg
Anzahl DHCP-Clients Nuernberg-Land: dhcpcountnuernbergland
Anzahl DHCP-Clients Asch: dhcpcountasch
Anzahl DHCP-Clients Crailsheim: dhcpcountcrailsheim
Anzahl DHCP-Clients Dinkelsbuehl: dhcpcountdinkelsbuehl

Wird mit dhcp-lease-list gemacht.
Zur Einrichtung ln -s /var/lib/dhcp /var/db, und dann in ein Script:
#!/bin/sh
/usr/sbin/dhcp-lease-list >/tmp/dhcp-lease-list
sed s/dhcpcountgesamt/`grep : /tmp/dhcp-lease-list | wc -l`/ /var/www/html/mrtg/index.tpl.html > /var/www/html/mrtg/index.html
sed -i s/dhcpcountwuerzburg/`grep : /tmp/dhcp-lease-list | grep 10.83.129 | wc -l`/ /var/www/html/mrtg/index.html
#prefixersetzproblem...
sed -i s/dhcpcountnuernbergland/`grep : /tmp/dhcp-lease-list | grep 10.83.137 | wc -l`/ /var/www/html/mrtg/index.html
#sed -i s/dhcpcountnuernberg/`grep : /tmp/dhcp-lease-list | grep 10.50.4 | wc -l`/ /var/www/html/mrtg/index.html
sed -i s/dhcpcountasch/`grep : /tmp/dhcp-lease-list | grep 10.83.133 | wc -l`/ /var/www/html/mrtg/index.html
rm /tmp/dhcp-lease-list

Bilder















Anlegen:
mkdir -p /var/lib/rrd

rrdtool \
create /var/lib/rrd/dhcp-wue.rrd --step 60 \
DS:dhcp-wue:GAUGE:120:U:U \
RRA:AVERAGE:0.5:1:2160 \
RRA:AVERAGE:0.5:5:2016 \
RRA:AVERAGE:0.5:15:2880 \
RRA:AVERAGE:0.5:60:8760 \
RRA:MAX:0.5:1:2160 \
RRA:MAX:0.5:5:2016 \
RRA:MAX:0.5:15:2880 \
RRA:MAX:0.5:60:8760

rrdtool \
create /var/lib/rrd/dhcp-nue.rrd --step 60 \
DS:dhcp-nue:GAUGE:120:U:U \
RRA:AVERAGE:0.5:1:2160 \
RRA:AVERAGE:0.5:5:2016 \
RRA:AVERAGE:0.5:15:2880 \
RRA:AVERAGE:0.5:60:8760 \
RRA:MAX:0.5:1:2160 \
RRA:MAX:0.5:5:2016 \
RRA:MAX:0.5:15:2880 \
RRA:MAX:0.5:60:8760

rrdtool \
create /var/lib/rrd/dhcp-nbgland.rrd --step 60 \
DS:dhcp-nbgland:GAUGE:120:U:U \
RRA:AVERAGE:0.5:1:2160 \
RRA:AVERAGE:0.5:5:2016 \
RRA:AVERAGE:0.5:15:2880 \
RRA:AVERAGE:0.5:60:8760 \
RRA:MAX:0.5:1:2160 \
RRA:MAX:0.5:5:2016 \
RRA:MAX:0.5:15:2880 \
RRA:MAX:0.5:60:8760

rrdtool \
create /var/lib/rrd/dhcp-asch.rrd --step 60 \
DS:dhcp-asch:GAUGE:120:U:U \
RRA:AVERAGE:0.5:1:2160 \
RRA:AVERAGE:0.5:5:2016 \
RRA:AVERAGE:0.5:15:2880 \
RRA:AVERAGE:0.5:60:8760 \
RRA:MAX:0.5:1:2160 \
RRA:MAX:0.5:5:2016 \
RRA:MAX:0.5:15:2880 \
RRA:MAX:0.5:60:8760


rrdtool \
create /var/lib/rrd/dhcp-crailsheim.rrd --step 60 \
DS:dhcp-crailsheim:GAUGE:120:U:U \
RRA:AVERAGE:0.5:1:2160 \
RRA:AVERAGE:0.5:5:2016 \
RRA:AVERAGE:0.5:15:2880 \
RRA:AVERAGE:0.5:60:8760 \
RRA:MAX:0.5:1:2160 \
RRA:MAX:0.5:5:2016 \
RRA:MAX:0.5:15:2880 \
RRA:MAX:0.5:60:8760


rrdtool \
create /var/lib/rrd/dhcp-dinkelsbuehl.rrd --step 60 \
DS:dhcp-dinkelsbuehl:GAUGE:120:U:U \
RRA:AVERAGE:0.5:1:2160 \
RRA:AVERAGE:0.5:5:2016 \
RRA:AVERAGE:0.5:15:2880 \
RRA:AVERAGE:0.5:60:8760 \
RRA:MAX:0.5:1:2160 \
RRA:MAX:0.5:5:2016 \
RRA:MAX:0.5:15:2880 \
RRA:MAX:0.5:60:8760
Datei updaten:
dhcpcountwuerzburg=`grep : /tmp/dhcp-lease-list | grep 10.50.7 | wc -l`
sed -i s/dhcpcountwuerzburg/$dhcpcountwuerzburg/ /var/www/html/mrtg/index.html
rrdtool update /var/lib/rrd/dhcp-wue.rrd N:$dhcpcountwuerzburg

dhcpcountnuernberg=`grep : /tmp/dhcp-lease-list | grep 10.50.4 | wc -l`
sed -i s/dhcpcountnuernberg/$dhcpcountnuernberg/ /var/www/html/mrtg/index.html
rrdtool update /var/lib/rrd/dhcp-nue.rrd N:$dhcpcountnuernberg

dhcpcountnuernbergland=`grep : /tmp/dhcp-lease-list | grep 10.50.8 | wc -l`
sed -i s/dhcpcountnuernbergland/$dhcpcountnuernbergland/ /var/www/html/mrtg/index.html
rrdtool update /var/lib/rrd/dhcp-nbgland.rrd N:$dhcpcountnuernbergland

dhcpcountasch=`grep : /tmp/dhcp-lease-list | grep 10.50.9 | wc -l`
sed -i s/dhcpcountasch/$dhcpcountasch/ /var/www/html/mrtg/index.html
rrdtool update /var/lib/rrd/dhcp-asch.rrd N:$dhcpcountasch
Grafik updaten:
nice -n 19 rrdtool graph /var/www/html/mrtg/dhcp-wue.png --start -129600 \
-t "DHCP-Leases wue" --vertical-label "" -w 600 -h 100 \
DEF:dhcp-wue=/var/lib/rrd/dhcp-wue.rrd:dhcp-wue:AVERAGE LINE1:dhcp-wue#00ff00:"Anzahl" > /dev/null

nice -n 19 rrdtool graph /var/www/html/mrtg/dhcp-wuew.png --start -604800 \
-t "DHCP-Leases wue" --vertical-label "" -w 600 -h 100 \
DEF:dhcp-wue=/var/lib/rrd/dhcp-wue.rrd:dhcp-wue:AVERAGE LINE1:dhcp-wue#00ff00:"Anzahl" > /dev/null


nice -n 19 rrdtool graph /var/www/html/mrtg/dhcp-nue.png --start -129600 \
-t "DHCP-Leases nue" --vertical-label "" -w 600 -h 100 \
DEF:dhcp-nue=/var/lib/rrd/dhcp-nue.rrd:dhcp-nue:AVERAGE LINE1:dhcp-nue#00ff00:"Anzahl" > /dev/null

nice -n 19 rrdtool graph /var/www/html/mrtg/dhcp-nuew.png --start -604800 \
-t "DHCP-Leases nue" --vertical-label "" -w 600 -h 100 \
DEF:dhcp-nue=/var/lib/rrd/dhcp-nue.rrd:dhcp-nue:AVERAGE LINE1:dhcp-nue#00ff00:"Anzahl" > /dev/null


nice -n 19 rrdtool graph /var/www/html/mrtg/dhcp-nbgland.png --start -129600 \
-t "DHCP-Leases nbgland" --vertical-label "" -w 600 -h 100 \
DEF:dhcp-nue=/var/lib/rrd/dhcp-nbgland.rrd:dhcp-nbgland:AVERAGE LINE1:dhcp-nbgland#00ff00:"Anzahl" > /dev/null

nice -n 19 rrdtool graph /var/www/html/mrtg/dhcp-nbglandw.png --start -604800 \
-t "DHCP-Leases nbgland" --vertical-label "" -w 600 -h 100 \
DEF:dhcp-nue=/var/lib/rrd/dhcp-nbgland.rrd:dhcp-nbgland:AVERAGE LINE1:dhcp-nbgland#00ff00:"Anzahl" > /dev/null


nice -n 19 rrdtool graph /var/www/html/mrtg/dhcp-asch.png --start -129600 \
-t "DHCP-Leases asch" --vertical-label "" -w 600 -h 100 \
DEF:dhcp-nue=/var/lib/rrd/dhcp-asch.rrd:dhcp-asch:AVERAGE LINE1:dhcp-asch#00ff00:"Anzahl" > /dev/null

nice -n 19 rrdtool graph /var/www/html/mrtg/dhcp-nbglandw.png --start -604800 \
-t "DHCP-Leases asch" --vertical-label "" -w 600 -h 100 \
DEF:dhcp-nue=/var/lib/rrd/dhcp-asch.rrd:dhcp-asch:AVERAGE LINE1:dhcp-asch#00ff00:"Anzahl" > /dev/null

Quelle: https://wiki.freifunk-franken.de/w/Portal:Netz/Statistiken

Das Template fuer diese Datei gibt es hier.