Bringing unix-agent <<< mem >>> stats into unix os devices

I’m sharing some of the frustrations of the community on the shortcomings of how linux memory is delivered in SNMP:


Linux Memory Pools reporting wrong

Making Physical Memory graphs valid and worthwile

Memory Pool

Ideally, Net-SNMP would deliver the proper “Used” memory that we are familiar with from free -h, BUT having to rewrite code in a project like that seems like a lot of work :slight_smile: . Instead, for anyone running the unix-agent (check_mk), memory stats are already being collected and sent to your LibreNMS server, but nothing is being done with it. I would like to start working on a way to include those stats.

I would like some guidance on how to include it. Looking at ./includes/polling/, there are scripts included from ./includes/polling/unix-agent/ and from ./includes/polling/applications/. Should I write an application module for “mempool”, that would show up under the Apps tab of a device, or write a unix-agent submodule to be used in another module (probably os/, similar to ‘dmi’)? I think it would be best to not write it to be included in the SNMP mempools section of the device pages, as to signify that the info is being collected differently (SNMP vs check_mk).

Thanks, and let me know any suggestions