mirror of https://github.com/mikaku/Monitorix.git
fixed some possible undefined values in 'bind.pm' #374
This commit is contained in:
parent
c89f7e7b09
commit
28bae74d22
32
lib/bind.pm
32
lib/bind.pm
|
@ -518,38 +518,38 @@ sub bind_update {
|
|||
|
||||
if($major eq "2") {
|
||||
foreach my $counters ($data->findnodes('/isc/bind/statistics/memory/summary')) {
|
||||
$rrdata .= ":" . $counters->findvalue('./TotalUse');
|
||||
$rrdata .= ":" . $counters->findvalue('./InUse');
|
||||
$rrdata .= ":" . $counters->findvalue('./BlockSize');
|
||||
$rrdata .= ":" . $counters->findvalue('./ContextSize');
|
||||
$rrdata .= ":" . $counters->findvalue('./Lost');
|
||||
$rrdata .= ":" . ($counters->findvalue('./TotalUse') || 0);
|
||||
$rrdata .= ":" . ($counters->findvalue('./InUse') || 0);
|
||||
$rrdata .= ":" . ($counters->findvalue('./BlockSize') || 0);
|
||||
$rrdata .= ":" . ($counters->findvalue('./ContextSize') || 0);
|
||||
$rrdata .= ":" . ($counters->findvalue('./Lost') || 0);
|
||||
}
|
||||
$rrdata .= ":0:0:0";
|
||||
}
|
||||
if($major eq "3") {
|
||||
foreach my $counters ($data->findnodes('/statistics/memory/summary')) {
|
||||
$rrdata .= ":" . $counters->findvalue('./TotalUse');
|
||||
$rrdata .= ":" . $counters->findvalue('./InUse');
|
||||
$rrdata .= ":" . $counters->findvalue('./BlockSize');
|
||||
$rrdata .= ":" . $counters->findvalue('./ContextSize');
|
||||
$rrdata .= ":" . $counters->findvalue('./Lost');
|
||||
$rrdata .= ":" . ($counters->findvalue('./TotalUse') || 0);
|
||||
$rrdata .= ":" . ($counters->findvalue('./InUse') || 0);
|
||||
$rrdata .= ":" . ($counters->findvalue('./BlockSize') || 0);
|
||||
$rrdata .= ":" . ($counters->findvalue('./ContextSize') || 0);
|
||||
$rrdata .= ":" . ($counters->findvalue('./Lost') || 0);
|
||||
}
|
||||
$rrdata .= ":0:0:0";
|
||||
}
|
||||
|
||||
if($major eq "2") {
|
||||
foreach my $counters ($data->findnodes('/isc/bind/statistics/taskmgr/thread-model')) {
|
||||
$rrdata .= ":" . $counters->findvalue('./worker-threads');
|
||||
$rrdata .= ":" . $counters->findvalue('./default-quantum');
|
||||
$rrdata .= ":" . $counters->findvalue('./tasks-running');
|
||||
$rrdata .= ":" . ($counters->findvalue('./worker-threads') || 0);
|
||||
$rrdata .= ":" . ($counters->findvalue('./default-quantum') || 0);
|
||||
$rrdata .= ":" . ($counters->findvalue('./tasks-running') || 0);
|
||||
}
|
||||
$rrdata .= ":0:0:0";
|
||||
}
|
||||
if($major eq "3") {
|
||||
foreach my $counters ($data->findnodes('/statistics/taskmgr/thread-model')) {
|
||||
$rrdata .= ":" . $counters->findvalue('./worker-threads');
|
||||
$rrdata .= ":" . $counters->findvalue('./default-quantum');
|
||||
$rrdata .= ":" . $counters->findvalue('./tasks-running');
|
||||
$rrdata .= ":" . ($counters->findvalue('./worker-threads') || 0);
|
||||
$rrdata .= ":" . ($counters->findvalue('./default-quantum') || 0);
|
||||
$rrdata .= ":" . ($counters->findvalue('./tasks-running') || 0);
|
||||
}
|
||||
$rrdata .= ":0:0:0";
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue