Merge pull request #2125 from UrBnW/vservertypo

fix(netscaler) vserver accounting bug
This commit is contained in:
qgarnier 2020-07-27 09:02:44 +02:00 committed by GitHub
commit 018b64c4bc
1 changed files with 4 additions and 4 deletions

View File

@ -266,10 +266,10 @@ sub manage_selection {
foreach (keys %{$self->{vservers}}) {
my $result = $options{snmp}->map_instance(mapping => $mapping2, results => $snmp_result, instance => $_);
$self->{vservers}->{$_}->{out} = (defined($result->{vsvrTotalResponseBytes}) ? $result->{vsvrTotalResponseBytes} * 8 :
(($result->{vsvrTotalResponseBytesHigh} << 32) + $result->{vsvrTotalResponseBytesLow})) * 8;
$self->{vservers}->{$_}->{in} = (defined($result->{vsvrTotalRequestBytes}) ? $result->{vsvrTotalRequestBytes} * 8 :
(($result->{vsvrTotalRequestBytesHigh} << 32) + $result->{vsvrTotalRequestBytesLow})) * 8;
$self->{vservers}->{$_}->{out} = defined($result->{vsvrTotalResponseBytes}) ? $result->{vsvrTotalResponseBytes} * 8 :
(($result->{vsvrTotalResponseBytesHigh} << 32) + $result->{vsvrTotalResponseBytesLow}) * 8;
$self->{vservers}->{$_}->{in} = defined($result->{vsvrTotalRequestBytes}) ? $result->{vsvrTotalRequestBytes} * 8 :
(($result->{vsvrTotalRequestBytesHigh} << 32) + $result->{vsvrTotalRequestBytesLow}) * 8;
$self->{vservers}->{$_}->{health} = $result->{vsvrHealth};
$self->{vservers}->{$_}->{clients} = $result->{vsvrTotalClients};
$self->{vservers}->{$_}->{servers} = $result->{vsvrTotalServers};