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 $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+)/;
|
||||
|
|
Loading…
Reference in New Issue