shinken-monitoring / pack-linux-snmp

Configuration pack for Linux hosts
4 stars 16 forks source link

Add "-OU" option to snmpget to remove "kB" unit #15

Closed mathieumd closed 8 years ago

mathieumd commented 9 years ago

Fix performance data

On my setup, by default, snmpget return this:

snmpget -v2c -c public test.example.com 1.3.6.1.4.1.2021.4.6.0
UCD-SNMP-MIB::memAvailReal.0 = INTEGER: 719252 kB

This break the performance data. Adding "-OU" resolve this problem:

snmpget -v2c -c public test.example.com 1.3.6.1.4.1.2021.4.6.0 -OU
UCD-SNMP-MIB::memAvailReal.0 = INTEGER: 719252

Fix unit case

I replaced the "Kb" (Kilo Bit; 1 kb = 1024 bits) by "kB" (Kilo Byte; 1 kB = 8 kb), as it's what is actually returned by SNMPd.

Note

I wonder if we should not output performance data in Bytes, instead of Kilo Bytes.