This commit is contained in:
garnier-quentin 2019-05-19 11:04:53 +02:00
parent 324a9db527
commit b5e5d3fc1b
1 changed files with 2 additions and 1 deletions

View File

@ -57,7 +57,8 @@ sub snmp_execute {
oids => [{ oid => $mapping->{branch_sensors}->{hwgste} }, { oid => $mapping->{branch_sensors}->{hwgste2} }]
);
$self->{branch} = 'hwgste';
if (defined($self->{results}->{ $mapping->{branch_sensors}->{hwgste2} }) && scalar($self->{results}->{ $mapping->{branch_sensors}->{hwgste2} }) > 0) {
if (defined($self->{results}->{ $mapping->{branch_sensors}->{hwgste2} }) &&
scalar(keys %{$self->{results}->{ $mapping->{branch_sensors}->{hwgste2} }}) > 0) {
$self->{branch} = 'hwgste2';
}
}