From 0a34ade95a2d49e9ee986e07fb8118ffa2d52c91 Mon Sep 17 00:00:00 2001 From: Andre Grueneberg Date: Wed, 17 May 2023 09:29:32 +0200 Subject: [PATCH] Fix to #829 Previously the counters were not reset in case the API was unreachable. After writing data to RRDs new counters need to be initialized. --- tools/runtime/sflow/sflow-to-rrd-handler | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/runtime/sflow/sflow-to-rrd-handler b/tools/runtime/sflow/sflow-to-rrd-handler index 796caaa28..569a69e35 100755 --- a/tools/runtime/sflow/sflow-to-rrd-handler +++ b/tools/runtime/sflow/sflow-to-rrd-handler @@ -210,7 +210,6 @@ while () { my $newmactable = reload_mactable($client, $macdbrest); if ($newmactable) { $mactable = $newmactable; - $matrix = matrix_init($mactable, $infraid); $mactablereloadfails = 0; } else { $mactablereloadfails++; @@ -221,6 +220,7 @@ while () { 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"; } }