From 3afae967d711f5a91cfdebfcd2041e3e1b5e95ca Mon Sep 17 00:00:00 2001 From: Eduardo Silva Date: Fri, 21 Feb 2025 21:18:01 -0300 Subject: [PATCH] Switch DS type from COUNTER to DERIVE in RRDTool setup. Changed 'tx' and 'rx' data sources to DERIVE to improve accuracy and minimize false spikes in rate calculations. This ensures better handling of resets or rollovers in the monitored data. --- containers/rrdtool/wgrrd.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/containers/rrdtool/wgrrd.py b/containers/rrdtool/wgrrd.py index 0c10d1a..a10713b 100755 --- a/containers/rrdtool/wgrrd.py +++ b/containers/rrdtool/wgrrd.py @@ -57,8 +57,8 @@ def create_peer_rrd(rrd_file): cmd = [ "rrdtool", "create", rrd_file, "--step", "300", - "DS:tx:COUNTER:600:0:U", - "DS:rx:COUNTER:600:0:U", + "DS:tx:DERIVE:600:0:U", + "DS:rx:DERIVE:600:0:U", "DS:status:GAUGE:600:0:1", "RRA:AVERAGE:0.5:1:1440", "RRA:AVERAGE:0.5:6:700", @@ -81,8 +81,8 @@ def create_instance_rrd(rrd_file): cmd = [ "rrdtool", "create", rrd_file, "--step", "300", - "DS:tx:COUNTER:600:0:U", - "DS:rx:COUNTER:600:0:U", + "DS:tx:DERIVE:600:0:U", + "DS:rx:DERIVE:600:0:U", "RRA:AVERAGE:0.5:1:1440", "RRA:AVERAGE:0.5:6:700", "RRA:AVERAGE:0.5:24:775",