Skip to content

Commit

Permalink
Fix to inex#829
Browse files Browse the repository at this point in the history
Previously the counters were not reset in case the API was unreachable.
After writing data to RRDs new counters need to be initialized.
  • Loading branch information
agbcix committed May 17, 2023
1 parent bcaab7c commit 0a34ade
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tools/runtime/sflow/sflow-to-rrd-handler
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,6 @@ while (<SFLOWTOOL>) {
my $newmactable = reload_mactable($client, $macdbrest);
if ($newmactable) {
$mactable = $newmactable;
$matrix = matrix_init($mactable, $infraid);
$mactablereloadfails = 0;
} else {
$mactablereloadfails++;
Expand All @@ -221,6 +220,7 @@ while (<SFLOWTOOL>) {
die "FATAL: could not reload mactable after $mactabletimeout seconds. Aborting.\n";
}
}
$matrix = matrix_init($mactable, $infraid);
$debug && print STDERR "DEBUG: flush completed at ".time()."\n";
}
}
Expand Down

0 comments on commit 0a34ade

Please sign in to comment.