| 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; |
| 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 |