AS-Stats
AS-Stats copied to clipboard
rrd-extractstats.pl needs sort on %knownlinks & requires statsfile to be deleted if knownlinks file has changed
- With the addition of skipifnotmodified, the stats table is no longer being re-created during every run. However, function read_knownlinks() loads all the links into a hash %knownlinks which has inconsistent sort order when it's filled into @links.
Quick fix for is to update line 41:
my @links = values %knownlinks;
to
my @links = sort values %knownlinks;
This will keep the list of links consistent across runs.
- Per above, since stats table is no longer recreated during every run, if there's a new link added (or removed) the statsfile needs to be deleted so that rrd-extractstats.pl will recreate. Ideally schema should be checked to identify if there's any new links added (or removed).
I've made a pull request for this exact issue, see #105. :-)