snmpd - can't get memory details - via LibreNMS

dvl@

Developer
FYI, as I was typing this out, I realized it's probably a LibreNMS database issue. However, not wanting this typing to go to waste, I'll keep this post and follow when I find the solution.

I'm using net-snmp-5.9.1_4,1 on FreeBSD 14.0 and I'm unable to get any memory details out of snmp. This was also a problem under previous versions of FreeBSD (e.g. 13.2).

I can get memory usage from a pfSense appliance, but none of my FreeBSD hosts have memory usage. For what it's worth, processor usage is working.

I'm using net-mgmt/librenms for displaying metrics. It has a debug mode where the output of the snmpget calls are displayed.

For pfSense, the debugging output shows the following.

Code:
#### Load poller module mempools ####
 
Module enabled: Global + | OS   | Device   | Manual   
SQL[select * from `mempools` where `mempools`.`device_id` = ? and `mempools`.`device_id` is not null [25] 0.48ms]
 
SNMP['/usr/local/bin/snmpget' '-v2c' '-c' 'COMMUNITY' '-OUQn' '-M' '/usr/local/www/librenms/mibs:/usr/local/www/librenms/mibs/pfsense' 'udp:HOSTNAME:161' '.1.3.6.1.2.1.25.2.3.1.6.1' '.1.3.6.1.2.1.25.2.3.1.6.2']
.*.*.* = 108036
.*.*.* = 10054 
 
hrstorage [system]: Real Memory Metrics: 22%  422.02 MiB / 1.91 GiB
SQL[update `mempools` set `mempool_perc` = ?, `mempool_used` = ?, `mempool_free` = ? where `mempool_id` = ? [22,442515456,1613586432,71] 1.12ms]
 
hrstorage [system]: Shared Real Memory Metrics: 2%  39.27 MiB / 1.91 GiB
SQL[update `mempools` set `mempool_used` = ?, `mempool_free` = ? where `mempool_id` = ? [41181184,2014920704,72] 0.69ms]
 
 
>> SNMP: [1/0.30s] MySQL: [3/0.02s]   
>> Runtime for poller module 'mempools': 0.3057 seconds with 95296 bytes 
#### Unload poller module mempools ####

For one of my FreeBSD hosts (r730-01, I get this. I believe the key is the lack of entries in the mempools table for this device.

Code:
#### Load poller module mempools ####
 
Module enabled: Global + | OS   | Device   | Manual   
SQL[select * from `mempools` where `mempools`.`device_id` = ? and `mempools`.`device_id` is not null [118] 0.48ms]
 
 
>> SNMP: [0/0.00s] MySQL: [1/0.00s]   
>> Runtime for poller module 'mempools': 0.0027 seconds with 84440 bytes 
#### Unload poller module mempools ####
 
Well, when discovering the FreeBSD device, we get this:

Code:
SNMP['/usr/local/bin/snmpbulkwalk' '-v3' '-l' 'authPriv' '-n' "" '-a'
 'SHA' '-A' 'PASSWORD' '-u' 'USER' '-x' 'AES' '-X' 'PASSWORD' '-OQUsetX'
  '-m' 'HOST-RESOURCES-MIB:HOST-RESOURCES-TYPES' '-M'
   '/usr/local/www/librenms/mibs' 'udp:HOSTNAME:161' 'hrStorageTable']
hrStorageTable = No Such Object available on this agent at this OID

I reckon that is the cause of the problem.

The configuration:
Code:
[0:12 r730-01 dvl ~] % ps auwwx | grep snmpd
root    51782    0.0  0.0   40220   25708  -  D    Wed17        4:18.82 /usr/local/sbin/snmpd -p /var/run/net_snmpd.pid -c /usr/local/etc/snmpd.conf -a -r


[0:12 r730-01 dvl ~] % cat /usr/local/etc/snmpd.conf
agentAddress  udp:10.55.0.141:161,tcp:10.55.0.141:161

sysLocation    BSD Cabal HQ
sysContact     dan@langille.org

extend ntp-client       /usr/local/etc/snmp/ntp-client.sh
extend smart            /usr/local/etc/snmp/smart
extend zfs              /usr/local/etc/snmp/zfs

Why no hrStorageTable OID?
 
Back
Top