ViewVC Help
View File | Revision Log | Show Annotations | Revision Graph | Root Listing
root/i-scream/experimental/reports/graphing/watch.pl
(Generate patch)

Comparing experimental/reports/graphing/watch.pl (file contents):
Revision 1.3 by tdb, Sun Mar 10 01:43:15 2002 UTC vs.
Revision 1.7 by tdb, Sun Aug 1 10:39:49 2004 UTC

# Line 2 | Line 2
2  
3   # -----------------------------------------------------------
4   # i-scream graph generation scripts
5 < # http://www.i-scream.org.uk
5 > # http://www.i-scream.org
6   #
7   # Generates rrd databases for i-scream data by connecting to
8   # the i-scream server and collecting data.
# Line 286 | Line 286 | sub processdata() {
286                      close DEF;
287                  }
288                  my(@data) = ( "packet.queue.attributes.queue$i:size:GAUGE",
289 <                              "packet.queue.attributes.total:total:GAUGE",
289 >                              "packet.queue.attributes.total:total:COUNTER",
290                               );
291                  &updaterrd($machine, "$hash\_$i", $date, $rrdstep, \%xmlhash, @data);
292                  ++$i;
# Line 338 | Line 338 | sub updaterrd() {
338      foreach my $dataitem (@data) {
339          if($dataitem =~ /^(\S+):\S+:\S+$/) {
340              # pull the values straight out of the xmlhash
341 <            $updateparams .= ":$xmlhash{$1}";
341 >            my($value) = $xmlhash{$1};
342 >            # if it's undefined we'll set it to 0
343 >            # this probably shouldn't happen, but it'd be best to handle it "nicely" :)
344 >            $value = "0" if not defined $value;
345 >            $updateparams .= ":$value";
346          }
347      }
348      # perform the update
# Line 393 | Line 397 | sub makerrd() {
397          "RRA:MAX:0.5:60:672",
398          # 1m in 1hr samples
399          "RRA:AVERAGE:0.5:240:744",
400 <        "RRA:MAX:0.5:60:744",
400 >        "RRA:MAX:0.5:240:744",
401 >        # 1y in 12hr samples
402 >        "RRA:AVERAGE:0.5:2880:730",
403 >        "RRA:MAX:0.5:2880:730",
404      );
405      RRDs::create (@rrdcmd);
406      my($err) = RRDs::error;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines