]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/blobdiff - src/scripts/makegraphs
Hinzugefügt:
[people/pmueller/ipfire-2.x.git] / src / scripts / makegraphs
index 023925245bc320ae6f932a008c04c762b865f49b..67bacd4881890a5c556a0bf58d025ffd5a7a7659 100644 (file)
 # Copyright (C) 2004-01-19 Mark Wormgoor <mark@wormgoor.com>.              #
 #                                                                          #
 ############################################################################
-#
-# $Id: makegraphs,v 1.19.2.18 2006/01/08 13:41:04 eoberlander Exp $
-#
+
 use strict;
 #use warnings;
 
 use RRDs;
-require "CONFIG_ROOT/general-functions.pl";
+require "/var/ipfire/general-functions.pl";
 require "${General::swroot}/lang.pl";
 
 my (%settings, @ipacsum, $iface, $ERROR);
@@ -57,6 +55,8 @@ if ((${Lang::language} eq 'el') ||
 my $rrdlog = "/var/log/rrd";
 my $graphs = "/home/httpd/html/graphs";
 $ENV{PATH}="/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin";
+my $hdd_device = "/dev/harddisk";
+my $temp = '';
 
 sub gettraffic {
        my $interface = $_[0];
@@ -89,7 +89,7 @@ sub updatecpugraph {
                "--alt-y-grid", "-w 600", "-h 100", "-l 0", "-u 100", "-r",
                "--color", "SHADEA#EAE9EE",
                "--color", "SHADEB#EAE9EE",
-               "--color", "BACK#EAE9EE",
+               "--color", "BACK#FFFFFF",
                "-t $tr{'cpu usage per'} $tr{$period}",
                "DEF:user=$rrdlog/cpu.rrd:user:AVERAGE",
                "DEF:system=$rrdlog/cpu.rrd:system:AVERAGE",
@@ -156,7 +156,7 @@ sub updatememgraph {
                "--alt-y-grid", "-w 600", "-h 100", "-l 0", "-u 100", "-r",
                "--color", "SHADEA#EAE9EE",
                "--color", "SHADEB#EAE9EE",
-               "--color", "BACK#EAE9EE",
+               "--color", "BACK#FFFFFF",
                "-t $tr{'memory usage per'} $tr{$period}",
                "DEF:used=$rrdlog/mem.rrd:memused:AVERAGE",
                "DEF:free=$rrdlog/mem.rrd:memfree:AVERAGE",
@@ -198,7 +198,7 @@ sub updatememgraph {
                "--alt-y-grid", "-w 600", "-h 100", "-l 0", "-u 100", "-r",
                "--color", "SHADEA#EAE9EE",
                "--color", "SHADEB#EAE9EE",
-               "--color", "BACK#EAE9EE",
+               "--color", "BACK#FFFFFF",
                "-t $tr{'swap usage per'} $tr{$period}",
                "DEF:used=$rrdlog/mem.rrd:swapused:AVERAGE",
                "DEF:free=$rrdlog/mem.rrd:swapfree:AVERAGE",
@@ -269,7 +269,7 @@ sub updatediskgraph {
                "--alt-y-grid", "-w 600", "-h 100", "-l 0", "-r",
                "--color", "SHADEA#EAE9EE",
                "--color", "SHADEB#EAE9EE",
-               "--color", "BACK#EAE9EE",
+               "--color", "BACK#FFFFFF",
                "-t $tr{'disk access per'} $tr{$period}",
                "DEF:read=$rrdlog/disk.rrd:readsect:AVERAGE",
                "DEF:write=$rrdlog/disk.rrd:writesect:AVERAGE",
@@ -341,6 +341,107 @@ sub updatediskdata {
        }
 }
 
+sub updatediskgraphnew {
+       my $disk      = $_[0];
+       my $period    = $_[1];
+
+       RRDs::graph ("$graphs/disk-$disk-$period.png",
+               "--start", "-1$period", "-aPNG", "-i", "-z",
+               "--alt-y-grid", "-w 600", "-h 100", "-l 0", "-r",
+               "--color", "SHADEA#EAE9EE",
+               "--color", "SHADEB#EAE9EE",
+               "--color", "BACK#FFFFFF",
+               "-t $tr{'disk access per'} $tr{$period}",
+               "DEF:read=$rrdlog/disk-$disk.rrd:readsect:AVERAGE",
+               "DEF:write=$rrdlog/disk-$disk.rrd:writesect:AVERAGE",
+               "DEF:sleep=$rrdlog/disk-$disk.rrd:sleeping:AVERAGE",
+               "CDEF:sl_state=sleep,INF,*",
+
+                "AREA:sl_state#a0a0a0:disk standby\\j",
+               "AREA:read#0000FF:$tr{'sectors read from disk per second'}\\j",
+               "STACK:write#00FF00:$tr{'sectors written to disk per second'}\\j",
+       
+               "GPRINT:read:MAX:$tr{'maximal'} $tr{'read sectors'}\\:%8.0lf",
+               "GPRINT:read:AVERAGE:$tr{'average'} $tr{'read sectors'}\\:%8.0lf",
+               "GPRINT:read:LAST:$tr{'current'} $tr{'read sectors'}\\:%8.0lf\\j",
+               "GPRINT:write:MAX:$tr{'maximal'} $tr{'written sectors'}\\:%8.0lf",
+               "GPRINT:write:AVERAGE:$tr{'average'} $tr{'written sectors'}\\:%8.0lf",
+               "GPRINT:write:LAST:$tr{'current'} $tr{'written sectors'}\\:%8.0lf\\j");
+       $ERROR = RRDs::error;
+       print "Error in RRD::graph for disk-$disk: $ERROR\n" if $ERROR;
+}
+
+sub updatediskdatanew {
+       my $disk = $_[0];
+
+       my ($readwritereq, $readreq, $readsect, $writereq, $writesect);
+       if ( ! -e "$rrdlog/disk-$disk.rrd") {
+               RRDs::create ("$rrdlog/disk-$disk.rrd", "--step=300",
+                       "DS:readsect:COUNTER:600:0:5000000000",
+                       "DS:writesect:COUNTER:600:0:5000000000",
+                       "DS:sleeping:GAUGE:600:0:1",
+                       "RRA:AVERAGE:0.5:1:576",
+                       "RRA:AVERAGE:0.5:6:672",
+                       "RRA:AVERAGE:0.5:24:732",
+                       "RRA:AVERAGE:0.5:144:1460");
+               $ERROR = RRDs::error;
+               print "Error in RRD::create for disk-$disk: $ERROR\n" if $ERROR;
+       }
+
+       my ($dev, $ino, $mode, $nlink, $uid, $gid, $rdev, $size,
+               $atime, $mtime, $ctime, $blksize, $blocks) = stat("/dev/$disk");
+
+       my $major = $rdev >> 8;
+       my $minor = ($rdev & 0xFF) >>6;
+
+       open STAT, "/proc/stat";
+       my @diskstat = <STAT>;
+       close (STAT);
+       foreach my $line (@diskstat)
+       {
+               chomp ($line);
+               my @temp = split(/\:\ /,$line);
+               if ($temp[1]) {
+                       my @devicestat = split(/\ /,$temp[1]);
+                       foreach my $stats (@devicestat)
+                       {
+                               chomp ($stats);
+                               my @fields = split(/\((\d+),(\d+)\):\((\d+),(\d+),(\d+),(\d+),(\d+)/,$stats);
+                               if ($major eq $fields[1] and $minor eq $fields[2])
+                               {
+                                       $readwritereq = $fields[3];
+                                       $readreq      = $fields[4];
+                                       $readsect     = $fields[5];
+                                       $writereq     = $fields[6];
+                                       $writesect    = $fields[7];
+                               }
+                       }
+               }
+       }
+
+       my $sleeping=0;
+       my $lastsleepstate=0;
+
+       if ( -e "/tmp/hddshutdown-$disk" ) {
+               open STAT,"/tmp/hddshutdown-$disk";
+               $lastsleepstate = <STAT>;
+               close (STAT);
+               if ($lastsleepstate==$readwritereq) {
+                       $sleeping=1;
+               }
+       }       
+
+       if ($readsect && $writesect) {
+               RRDs::update ("$rrdlog/disk-$disk.rrd",
+                       "-t", "readsect:writesect:sleeping",
+                       "N:$readsect:$writesect:$sleeping");
+               $ERROR = RRDs::error;
+               print "Error in RRD::update for disk-$disk: $ERROR\n" if $ERROR;
+       } else {
+               print "Error in RRD::update for disk-$disk: no data available\n";
+       }
+}
+
 sub updateifgraph {
        my $interface = $_[0];
        my $period    = $_[1];
@@ -350,7 +451,7 @@ sub updateifgraph {
                "--alt-y-grid", "-w 600", "-h 100",
                "--color", "SHADEA#EAE9EE",
                "--color", "SHADEB#EAE9EE",
-               "--color", "BACK#EAE9EE",
+               "--color", "BACK#FFFFFF",
                "-t $tr{'traffic on'} $interface ($tr{'graph per'} $tr{$period})",
                "-v$tr{'bytes per second'}",
                "DEF:incoming=$rrdlog/$interface.rrd:incoming:AVERAGE",
@@ -390,6 +491,258 @@ sub updateifdata {
        print "Error in RRD::update for $interface: $ERROR\n" if $ERROR;
 }
 
+sub updatefwhitsgraph {
+       my $interval = $_[0];
+
+       RRDs::graph ("$graphs/firewallhits-$interval-area.png",
+               "--start", "-1$interval", "-aPNG", "-i", "-z",
+               "--alt-y-grid", "-w 600", "-h 200",
+               "--color", "SHADEA#EAE9EE",
+               "--color", "SHADEB#EAE9EE",
+               "--color", "BACK#FFFFFF",
+               "-t firewall hits over the last $interval",
+               "DEF:amount=$rrdlog/firewallhits.rrd:amount:AVERAGE",
+               "AREA:amount#6464FF:firewallhits",
+               "GPRINT:amount:MAX:   Max\\: %2.2lf %S",
+               "GPRINT:amount:AVERAGE: Avg\\: %2.2lf %S",
+               "GPRINT:amount:LAST: Current\\: %2.2lf %Shits/5 min\\n",
+               "DEF:portamount=$rrdlog/firewallhits.rrd:portamount:AVERAGE",
+               "AREA:portamount#FF6464:portscans",
+               "GPRINT:portamount:MAX:      Max\\: %2.2lf %S",
+               "GPRINT:portamount:AVERAGE: Avg\\: %2.2lf %S",
+               "GPRINT:portamount:LAST: Current\\: %2.2lf %Shits/5 min");
+       $ERROR = RRDs::error;
+       print "Error in RRD::graph for Firewallhits: $ERROR\n" if $ERROR;
+
+       RRDs::graph ("$graphs/firewallhits-$interval-line.png",
+               "--start", "-1$interval", "-aPNG", "-i", "-z",
+               "--alt-y-grid", "-w 600", "-h 200",
+               "--color", "SHADEA#EAE9EE",
+               "--color", "SHADEB#EAE9EE",
+               "--color", "BACK#FFFFFF",
+               "-t firewall hits over the last $interval",
+               "DEF:amount=$rrdlog/firewallhits.rrd:amount:AVERAGE",
+               "LINE2:amount#6464FF:firewallhits",
+               "GPRINT:amount:MAX:   Max\\: %2.2lf %S",
+               "GPRINT:amount:AVERAGE: Avg\\: %2.2lf %S",
+               "GPRINT:amount:LAST: Current\\: %2.2lf %Shits/5 min\\n",
+               "DEF:portamount=$rrdlog/firewallhits.rrd:portamount:AVERAGE",
+               "LINE2:portamount#FF6464:portscans",
+               "GPRINT:portamount:MAX:      Max\\: %2.2lf %S",
+               "GPRINT:portamount:AVERAGE: Avg\\: %2.2lf %S",
+               "GPRINT:portamount:LAST: Current\\: %2.2lf %Shits/5 min");
+       $ERROR = RRDs::error;
+       print "Error in RRD::graph for Firewallhits: $ERROR\n" if $ERROR;
+}
+
+sub updatefwhitsdata {
+       my $portamount=0;
+       my $alertaktuell=0;
+       my $aktuell=0;
+       my $portaktuell=0;
+       my $skip=0;
+
+       if (! -e "$rrdlog/firewallhits.rrd")
+       {
+               RRDs::create ("$rrdlog/firewallhits.rrd", "--step=300",
+                       "DS:amount:GAUGE:600:0:U",
+                       "DS:portamount:GAUGE:600:0:U",
+                       "RRA:AVERAGE:0.5:1:576",
+                       "RRA:AVERAGE:0.5:6:672",
+                       "RRA:AVERAGE:0.5:24:732",
+                       "RRA:AVERAGE:0.5:144:1460");
+               $ERROR = RRDs::error;
+               print "Error in RRD::create for cpu: $ERROR\n" if $ERROR;
+       }
+
+       system("logtailfwhits /var/log/messages /var/log/fwhits.messages.offset >/tmp/messages.fwhits");
+       if (!(open (FILE,'/tmp/messages.fwhits'))) {
+           $skip=1;
+       }
+       $aktuell = 0;
+       if (!$skip) {
+               while (<FILE>) {
+                       if (/kernel:.*(IN=.*)$/) {
+                               $aktuell++;
+                       }
+               }
+               close (FILE);
+       }
+
+       system("logtailfwhits /var/log/snort/alert /var/log/snort/fwhits.alert.offset >/tmp/snort.fwhits");
+       if (!(open (FILE,'/tmp/snort.fwhits'))) {
+           $skip=1;
+       }
+       $alertaktuell = 0;
+       if (!$skip) {
+               while (<FILE>) {
+                       if (/scan.*$/) {
+                               $alertaktuell++;
+                       }
+               }
+               close (FILE);
+       }
+
+       if (!(open (FILE,'/tmp/messages.fwhits'))) {
+           $skip=1;
+       }
+       $portaktuell = 0;
+       if (!$skip) {
+               while (<FILE>) {
+                       if (/kernel:.*(Scan.*)$/) {
+                               $portaktuell++;
+                       }
+               }
+               close (FILE);
+       }
+
+       system("rm /tmp/messages.fwhits");
+       system("rm /tmp/snort.fwhits");
+
+       $portamount = $portaktuell + $alertaktuell;
+       chomp($portamount);
+       RRDs::update ("$rrdlog/firewallhits.rrd",
+               "N:$aktuell:$portamount");
+       $ERROR = RRDs::error;
+       print "Error in RRD::update for Firewallhits: $ERROR\n" if $ERROR;
+}
+
+# Creates and updates a link quality database
+# -------------------------------------------
+sub updatelq {
+       if ( ! -e "$rrdlog/lq.rrd") {
+               RRDs::create ("$rrdlog/lq.rrd", "--step=300",
+                       "DS:loss:GAUGE:600:0:100",
+                       "DS:roundtrip:GAUGE:600:0:10000",
+                       "RRA:AVERAGE:0.5:1:576",
+                       "RRA:AVERAGE:0.5:6:672",
+                       "RRA:AVERAGE:0.5:24:732",
+                       "RRA:AVERAGE:0.5:144:1460");
+               $ERROR = RRDs::error;
+               print "Error in RRD::create for link: $ERROR\n" if $ERROR;
+       }
+       my $packetloss=0;
+       my $roundtrip=0;
+       my $test=0;
+#      LQ_GATEWAY is the ip of your isp's public ip facing you
+       my $LQ_GATEWAY='www.heise.de';
+       my $NUMPINGS=10;
+       my $pingoutput = `ping -c $NUMPINGS -q $LQ_GATEWAY`;
+       chomp;
+       my @temp = split (/\/|\%|\s/, $pingoutput);
+       $packetloss   = $temp[17];
+       $roundtrip    = $temp[28];
+       RRDs::update ("$rrdlog/lq.rrd", "N:$packetloss:$roundtrip");
+       $ERROR = RRDs::error;
+       print "Error in RRD::update for line quality: $ERROR\n" if $ERROR;
+} 
+
+sub updatelqgraph {
+       my $period    = $_[0];
+       RRDs::graph ("$graphs/lq-$period.png",
+               "--start", "-1$period", "-aPNG", "-i", "-z",
+               "--alt-y-grid", "-w 600", "-h 100", "-l 0", "-r",
+               "-t $tr{'linkq'} ($tr{'graph per'} $tr{$period})",
+               "--lazy", 
+               "--color", "SHADEA#EAE9EE",
+               "--color", "SHADEB#EAE9EE",
+               "--color", "BACK#FFFFFF",
+               "-v ms / pkts (% x10)",
+               "DEF:roundtrip=$rrdlog/lq.rrd:roundtrip:AVERAGE",
+               "DEF:loss=$rrdlog/lq.rrd:loss:AVERAGE",
+               "CDEF:roundavg=roundtrip,PREV(roundtrip),+,2,/",
+               "CDEF:loss10=loss,10,*",
+               "CDEF:r0=roundtrip,30,MIN",
+               "CDEF:r1=roundtrip,70,MIN",
+               "CDEF:r2=roundtrip,150,MIN",
+               "CDEF:r3=roundtrip,300,MIN",
+               "AREA:roundtrip#EE7000:>300 ms",
+               "AREA:r3#D88E1B:150-300 ms",
+               "AREA:r2#B9B63F:70-150 ms",
+               "AREA:r1#99E064:30-70 ms",
+               "AREA:r0#80FF80:<30 ms",
+               "AREA:loss10#800000:Packet loss (x10)",
+               "LINE1:roundtrip#707070:",
+               "GPRINT:roundtrip:MAX:$tr{'maximal'} $tr{'linkq'}\\:%3.2lf ms",
+               "GPRINT:roundtrip:AVERAGE:$tr{'average'} $tr{'linkq'}\\:%3.2lf ms",
+               "GPRINT:roundtrip:LAST:$tr{'current'} $tr{'linkq'}\\:%3.2lf ms\\j",
+               "GPRINT:loss:MAX:$tr{'maximal'} Loss\\:%3.2lf%%",
+               "GPRINT:loss:AVERAGE:$tr{'average'} Loss\\:%3.2lf%%",
+               "GPRINT:loss:LAST:$tr{'current'} Loss\\:%3.2lf%%\\j"
+               );
+       $ERROR = RRDs::error;
+       print "Error in RRD::graph for Link Quality: $ERROR\n" if $ERROR;
+}
+
+sub updatehdddata 
+{
+  if ( ! -e "$rrdlog/hddtemp.rrd") 
+  {
+    # database did not exist -> create
+    RRDs::create ("$rrdlog/hddtemp.rrd", "--step=300",
+      "DS:temperature:GAUGE:600:0:100",
+      "RRA:AVERAGE:0.5:1:576",
+      "RRA:AVERAGE:0.5:6:672",
+      "RRA:AVERAGE:0.5:24:732",
+      "RRA:AVERAGE:0.5:144:1460");
+    $ERROR = RRDs::error;
+    print "Error in RRD::create for hdd: $ERROR\n" if $ERROR;
+  }
+
+  my $hdd_output = `/usr/sbin/hddtemp -qn $hdd_device`;
+
+  # I know 4 response possible responses:
+  #
+  # /dev/harddisk: harddisk type: S.M.A.R.T. not available
+  # /dev/harddisk: harddisk type: no sensor
+  # /dev/harddisk: harddisk type: 37°C or °F
+  # 37
+
+  if ( index($hdd_output, "S.M.A.R.T.") != -1 )
+  {
+    $temp = 0;
+  }
+  elsif ( index($hdd_output, "no sensor") != -1 )
+  {
+    $temp = 1;
+  }
+  elsif ( index($hdd_output, "$hdd_device") != -1 )
+  {
+    $hdd_output =~ /.*:.*:\s*(\d+).*\s/;
+    $temp = $1;
+  }
+  else
+  {
+    $hdd_output =~ /(\d+)\s/;
+    $temp = $1;
+  }
+
+  RRDs::update ("$rrdlog/hddtemp.rrd", "-t", "temperature", "N:$temp");
+
+  $ERROR = RRDs::error;
+  print "Error in RRD::update for hdd: $ERROR\n" if $ERROR;
+}
+
+sub updatehddgraph {
+  my $period    = $_[0];
+
+  RRDs::graph ("$graphs/hddtemp-$period.png",
+    "--start", "-1$period", "-aPNG", "-i", "-z",
+    "--alt-y-grid", "-w 600", "-h 100",
+    "--color", "SHADEA#EAE9EE",
+    "--color", "SHADEB#EAE9EE",
+    "--color", "BACK#FFFFFF",
+    "-t $tr{'harddisk temperature'} ($tr{'graph per'} $tr{$period})",
+    "DEF:temperature=$rrdlog/hddtemp.rrd:temperature:AVERAGE",
+    "LINE2:temperature#0000FF:$tr{'hdd temperature in'} °C",
+    "GPRINT:temperature:MAX:$tr{'maximal'}\\:%3.0lf °C",
+    "GPRINT:temperature:AVERAGE:$tr{'average'}\\:%3.0lf °C",
+    "GPRINT:temperature:LAST:$tr{'current'}\\:%3.0lf °C",
+  );
+  $ERROR = RRDs::error;
+  print "Error in RRD::graph for cpu: $ERROR\n" if $ERROR;
+}
+
 ## Update ipac logs
 system ('/usr/sbin/fetchipac');
 sleep 8;
@@ -444,6 +797,138 @@ updatediskgraph ("week");
 updatediskgraph ("month");
 updatediskgraph ("year");
 
+if (open STAT,"/dev/hda") {
+  close STAT; 
+  updatediskdatanew ("hda");
+  updatediskgraphnew ("hda","day");
+  updatediskgraphnew ("hda","week");
+  updatediskgraphnew ("hda","month");
+  updatediskgraphnew ("hda","year");
+} else {
+  if (-e "$graphs/disk-hda-day.png") {
+     system("rm $graphs/disk-hda-day.png");
+  }
+}
+
+if (open STAT,"/dev/hdb") {
+  close STAT; 
+  updatediskdatanew ("hdb");
+  updatediskgraphnew ("hdb","day");
+  updatediskgraphnew ("hdb","week");
+  updatediskgraphnew ("hdb","month");
+  updatediskgraphnew ("hdb","year");
+} else {
+  if (-e "$graphs/disk-hdb-day.png") {
+     system("rm $graphs/disk-hdb-day.png");
+  }
+}
+
+if (open STAT,"/dev/hdc") {
+  close STAT; 
+  updatediskdatanew ("hdc");
+  updatediskgraphnew ("hdc","day");
+  updatediskgraphnew ("hdc","week");
+  updatediskgraphnew ("hdc","month");
+  updatediskgraphnew ("hdc","year");
+} else {
+  if (-e "$graphs/disk-hdc-day.png") {
+     system("rm $graphs/disk-hdc-day.png");
+  }
+}
+
+if (open STAT,"/dev/hdd") {
+  close STAT; 
+  updatediskdatanew ("hdd");
+  updatediskgraphnew ("hdd","day");
+  updatediskgraphnew ("hdd","week");
+  updatediskgraphnew ("hdd","month");
+  updatediskgraphnew ("hdd","year");
+} else {
+  if (-e "$graphs/disk-hdd-day.png") {
+     system("rm $graphs/disk-hdd-day.png");
+  }
+}
+
+if (open STAT,"/dev/hde") {
+  close STAT; 
+  updatediskdatanew ("hde");
+  updatediskgraphnew ("hde","day");
+  updatediskgraphnew ("hde","week");
+  updatediskgraphnew ("hde","month");
+  updatediskgraphnew ("hde","year");
+} else {
+  if (-e "$graphs/disk-hde-day.png") {
+     system("rm $graphs/disk-hde-day.png");
+  }
+}
+
+if (open STAT,"/dev/hdf") {
+  close STAT; 
+  updatediskdatanew ("hdf");
+  updatediskgraphnew ("hdf","day");
+  updatediskgraphnew ("hdf","week");
+  updatediskgraphnew ("hdf","month");
+  updatediskgraphnew ("hdf","year");
+} else {
+  if (-e "$graphs/disk-hdf-day.png") {
+     system("rm $graphs/disk-hdf-day.png");
+  }
+}
+
+if (open STAT,"/dev/hdg") {
+  close STAT; 
+  updatediskdatanew ("hdg");
+  updatediskgraphnew ("hdg","day");
+  updatediskgraphnew ("hdg","week");
+  updatediskgraphnew ("hdg","month");
+  updatediskgraphnew ("hdg","year");
+} else {
+  if (-e "$graphs/disk-hdg-day.png") {
+     system("rm $graphs/disk-hdg-day.png");
+  }
+}
+
+if (open STAT,"/dev/hdh") {
+  close STAT; 
+  updatediskdatanew ("hdh");
+  updatediskgraphnew ("hdh","day");
+  updatediskgraphnew ("hdh","week");
+  updatediskgraphnew ("hdh","month");
+  updatediskgraphnew ("hdh","year");
+} else {
+  if (-e "$graphs/disk-hdh-day.png") {
+     system("rm $graphs/disk-hdh-day.png");
+  }
+}
+
+###
+### Firewallhits
+###
+updatefwhitsdata();
+updatefwhitsgraph ("day");
+updatefwhitsgraph ("week");
+updatefwhitsgraph ("month");
+updatefwhitsgraph ("year");
+
+###
+### Link Quality
+###
+updatelq();
+sleep 2;
+updatelqgraph("day");
+updatelqgraph("week");
+updatelqgraph("month");
+updatelqgraph("year");
+
+###
+### HDDTEMP-Graphs for /dev/harddisk
+###
+updatehdddata();
+updatehddgraph ("day");
+updatehddgraph ("week");
+updatehddgraph ("month");
+updatehddgraph ("year");
+
 ###
 ### Network Graphs
 ###