fix to convert the BIND's output when there is only one hit in 'incoming queries'

This commit is contained in:
Jordi Sanfeliu 2016-10-10 16:53:00 +02:00
parent 8a0b97ccc6
commit 1837db373c
1 changed files with 11 additions and 0 deletions

View File

@ -338,6 +338,17 @@ sub bind_update {
if($major eq "2") {
$value = $data->{bind}->{statistics}->{server}->{'queries-in'}->{rdtype};
# coverts BIND's output when there is only one hit
if($value->{name}) {
my $name = $value->{name};
my $counter = $value->{counter};
delete($value->{name});
delete($value->{counter});
$value->{$name}->{'counter'} = $counter;
}
foreach(keys %{$value}) {
$str = $n . "inq_$_";
$inq{$str} = $value->{$_}->{counter} - ($config->{bind_hist}->{$str} || 0);