report.netsnmp.swapinout uses incorrect units and scale
Description
From the MIB:
ssSwapIn OBJECT-TYPE SYNTAX Integer32 UNITS "kB" MAX-ACCESS read-only STATUS current DESCRIPTION "The average amount of memory swapped in from disk, calculated over the last minute." ::= { systemStats 3 }
Units are kB, but the report divides the number gathered by 100, when it should be 1024, the base should also be set to 1024:
This diff is for the monolithic snmp-graph.properties file, but the same diff applies to the .d equivalent.
From the MIB:
ssSwapIn OBJECT-TYPE
SYNTAX Integer32
UNITS "kB"
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"The average amount of memory swapped in from disk,
calculated over the last minute."
::= { systemStats 3 }
Units are kB, but the report divides the number gathered by 100, when it should be 1024, the base should also be set to 1024:
This diff is for the monolithic snmp-graph.properties file, but the same diff applies to the .d equivalent.
diff --git a/etc/snmp-graph.properties b/etc/snmp-graph.properties
index fefc27f..0232e2c 100644
— a/etc/snmp-graph.properties
+++ b/etc/snmp-graph.properties
@@ -7049,18 +7049,20 @@ report.netsnmp.swapinout.name=Swap
report.netsnmp.swapinout.columns=SwapIn, SwapOut
report.netsnmp.swapinout.type=nodeSnmp
report.netsnmp.swapinout.command=--title="Swap" \ + --vertical-label="Bytes" \ + --base=1024 \ DEF:swapin={rrd1}:SwapIn:AVERAGE \ DEF:minSwapin={rrd1}:SwapIn:MIN \ DEF:maxSwapin={rrd1}:SwapIn:MAX \ DEF:swapout={rrd2}:SwapOut:AVERAGE \ DEF:minSwapout={rrd2}:SwapOut:MIN \ DEF:maxSwapout={rrd2}:SwapOut:MAX \ - CDEF:floatin=swapin,100,/ \ - CDEF:minFloatin=minSwapin,100,/ \ - CDEF:maxFloatin=maxSwapin,100,/ \ - CDEF:floatout=swapout,100,/ \ - CDEF:minFloatout=minSwapout,100,/ \ - CDEF:maxFloatout=maxSwapout,100,/ \ + CDEF:floatin=swapin,1024,/ \ + CDEF:minFloatin=minSwapin,1024,/ \ + CDEF:maxFloatin=maxSwapin,1024,/ \ + CDEF:floatout=swapout,1024,/ \ + CDEF:minFloatout=minSwapout,1024,/ \ + CDEF:maxFloatout=maxSwapout,1024,/ \ LINE2:floatin#0000ff:"In " \ GPRINT:floatin:AVERAGE:"Avg
: %10.2lf %s" \ GPRINT:floatin:MIN:"Min
: %10.2lf %s" \