mirror of https://github.com/mikaku/Monitorix.git
more fixes in the 'bind' graph when detecting BIND versions statistics
This commit is contained in:
parent
eeabf9da97
commit
7580d7a185
10
lib/bind.pm
10
lib/bind.pm
|
@ -259,11 +259,11 @@ sub bind_update {
|
||||||
my $data = XMLin($response->content);
|
my $data = XMLin($response->content);
|
||||||
my $value;
|
my $value;
|
||||||
|
|
||||||
# BIND v9.9+ has different statistics layout than BIND v9.5+,
|
# BIND v9.9+ has different statistics layout than BIND v9.5+.
|
||||||
# so attempt first to get stats from a BIND v9.9+
|
# we attempt first to get stats from a BIND v9.5+
|
||||||
if(!($value = $data->{'statistics version'})) {
|
if(!($value = $data->{bind}->{statistics}->{version})) {
|
||||||
# otherwise attempt it on a BIND v9.5+
|
# otherwise attempt it on a BIND v9.9+
|
||||||
$value = $data->{bind}->{statistics}->{version};
|
$value = $data->{version};
|
||||||
}
|
}
|
||||||
my ($major, $minor) = split('\.', $value);
|
my ($major, $minor) = split('\.', $value);
|
||||||
$minor =~ m/^(\d+)/;
|
$minor =~ m/^(\d+)/;
|
||||||
|
|
Loading…
Reference in New Issue