Re: Odd values for various memory metrics via SNMP

From: Yuri <yuri_at_aetern.org>
Date: Tue, 19 Dec 2023 08:50:21 UTC
Patrick M. Hausen wrote:
> Hi all,
> 
> what's the best platform/list/forum/... to discuss issues with the SNMP implementations
> for FreeBSD? Since I started to dig deeper into Obervium I found that of all the systems
> I own only the FreeBSD based ones present some challenges regarding the interpretation
> of memory metrics.
> 
> 1. I confirmed that this is not an Observium artefact. LibreNMS and manual snmpwalk
> give the same results.
> 
> 2. This is independent of the question if you use net-snmp (FreeNAS, OPNsense) or
> bsnmpd in base (my Raspberry Pi cluster).
> 
> 3. These are the systems concerned:
> 
> - OPNsense - FreeBSD 13.2, AMD64, 8 G of RAM, net-snmp
> - FreeNAS - TrueANS CORE, FreeBSD 13.1, AMD64, 64 G of RAM, net-snmp
> - 7 Raspberry Pi CM 3+, AARCH64, 1 G of RAM, bsnmpd
> 
> 4. The "odd" metrics:
> 
> - "Real Memory"
> 
> OPNsense: 762 of 768 M (yes!) used, flagged "red" in Observium, of course
> FreeNAS: 35.9 of 36.1 G used
> All the Pis: 178 of 179 M used
> 
> All - see hardware description above - no connection to the "real real" memory installed.
> 
> For comparison: ESXi 8.0: 26.7 of 31.9 G used - the system has got 32 G of RAM installed.
> 
> - "Shared real memory"
> 
> OPNsense: 97.1 of 103 M used
> FreeNAS: 593 of 774 M used
> Pis: 11.8 of 12.4 M used
> 
> - Shared virtual memory
> 
> Only systems running net-snmp have this, bsnmpd based ones don't.
> 
> OPNsense: 166 of 233 M used
> FreeNAS: 1028.27 M of 1.49 G used
> 
> - Virtual Memory
> 
> Again, only via net-snmp.
> 
> OPNsense: 5.03 of 5.11 G used
> FreeNAS: 628 of 628 G used - that's particularly weird for a system with 64 G of RAM
> 	installed and not swapping or anything.
> 
> For comparison: my only Linux based system: 12.7 of 29.6 G used - the system has
> 	16 G of RAM plus 16 G of swap, that seems to match the "29.6".
> 
> 
> For me these numbers don't make any sense at all. The motivation to write this email:
> I am planning to use SNMP based monitoring, probably Observium, for all our data
> centres, which means > 100 FreeBSD based hosts. The point of a monitoring/management
> system is that anything flagged "red" is a real problem that needs attention and the default
> state should be "everything super green". Things flagged "red" but "everybody knows
> it can be ignored" bind a huge amount of brain capacity on behalf of the operators. Not good.
> 
> 
> So what is going on here? What do these numbers actually mean? Where do they come
> from? Are they artefacts of the SNMP implementation not taylored perfectly for FreeBSD
> or are they some real metric that ends up interpreted wrong in the NMS (Observium)?


Let's start with OIDs, which ones exactly you are looking at (numeric or
textual will do)?