more fixes in the 'bind' graph when detecting BIND versions statistics

This commit is contained in:
Jordi Sanfeliu 2013-10-04 11:45:10 +02:00
parent eeabf9da97
commit 7580d7a185
1 changed files with 5 additions and 5 deletions

View File

@ -259,11 +259,11 @@ sub bind_update {
my $data = XMLin($response->content);
my $value;
# BIND v9.9+ has different statistics layout than BIND v9.5+,
# so attempt first to get stats from a BIND v9.9+
if(!($value = $data->{'statistics version'})) {
# otherwise attempt it on a BIND v9.5+
$value = $data->{bind}->{statistics}->{version};
# BIND v9.9+ has different statistics layout than BIND v9.5+.
# we attempt first to get stats from a BIND v9.5+
if(!($value = $data->{bind}->{statistics}->{version})) {
# otherwise attempt it on a BIND v9.9+
$value = $data->{version};
}
my ($major, $minor) = split('\.', $value);
$minor =~ m/^(\d+)/;