# Help needed to find a suitable plugin to monitor memory usage via SNMPv3

**URL:** <https://community.icinga.com/t/help-needed-to-find-a-suitable-plugin-to-monitor-memory-usage-via-snmpv3/14825>\
**Category:** Service Monitoring\
**Tags:** snmp, memory, plugins, snmpv3\
**Created:** [April 25, 2025, 4:29pm UTC](https://community.icinga.com/t/help-needed-to-find-a-suitable-plugin-to-monitor-memory-usage-via-snmpv3/14825 "2025-04-25T16:29:33Z")\
**Posts on this page:** 15\
**Page:** 1

<div class="post-metadata">

**Author:** ![jeanm](https://community.icinga.com/letter_avatar_proxy/v4/letter/j/6a8cbe/32.png) [@jeanm](https://community.icinga.com/u/jeanm)\
**Post date:** [April 25, 2025, 4:29pm UTC](https://community.icinga.com/t/help-needed-to-find-a-suitable-plugin-to-monitor-memory-usage-via-snmpv3/14825/1 "2025-04-25T16:29:33Z")

</div>

Hi,

I wish to monitor memory usage on Radware Alteon load balancer appliances. This device provides an SNMP agent with two OIDs:

- one for total memory: .1.3.6.1.4.1.1872.2.5.1.2.8.1
- one for free memory: .1.3.6.1.4.1.1872.2.5.1.2.8.3

Some other devices proceed similarly.

Would anyone know a plugin I could use to monitor the ratio (100 \* free / total), in percentage, ideally one where I could specify the OID for “free” and OID for “total” as parameters?

This plugin would need to support SNMPv3 with SHA-256 and AES-256.

Thank you in advance,

Jean

---

<div class="post-metadata">

**Author:** ![bberg](https://community.icinga.com/letter_avatar_proxy/v4/letter/b/b782af/32.png) [@bberg](https://community.icinga.com/u/bberg)\
**Post date:** [April 28, 2025, 11:12am UTC](https://community.icinga.com/t/help-needed-to-find-a-suitable-plugin-to-monitor-memory-usage-via-snmpv3/14825/2 "2025-04-28T11:12:44Z")

</div>

Have you tried check\_nwc\_health?  
Otherwise i would try either check\_snmp or the now deprecated [thola](https://github.com/inexio/thola)

Honestly, i think you could also develop a checkplugin by yourself for this. I guess if you are already having a device giving you suitable data (like your two OIDs) you just need to create an plugin that queries the appliances via SNMPv3 and calculates ratio.

---

<div class="post-metadata">

**Author:** ![jeanm](https://community.icinga.com/letter_avatar_proxy/v4/letter/j/6a8cbe/32.png) [@jeanm](https://community.icinga.com/u/jeanm)\
**Post date:** [April 29, 2025, 9:11am UTC](https://community.icinga.com/t/help-needed-to-find-a-suitable-plugin-to-monitor-memory-usage-via-snmpv3/14825/3 "2025-04-29T09:11:45Z")

</div>

Hi bberg,

Thank you for your reply!

> [@bberg](#):
>
> Have you tried check\_nwc\_health?

Yes I have, but the device is not supported.

I have also tried with `check_snmp`, but that plugin does not allow expressions to be evaluated - in this case: `100*(Total-Free)/Total`. Furthermore, I need the warning and critial thresholds to apply to the evaluated expression, not to the individual OID values.

I am busy writing my own plugin 🙂

If someone has the `bash` code to handle threshold ranges described here: [Development Guidelines · Nagios Plugins](https://nagios-plugins.org/doc/guidelines.html#THRESHOLDFORMAT), I would be interested!

Thank you,

Jean

---

<div class="post-metadata">

**Author:** ![rivad](https://community.icinga.com/user_avatar/community.icinga.com/rivad/32/5852_2.png) [@rivad](https://community.icinga.com/u/rivad)\
**Post date:** [May 5, 2025, 12:25pm UTC](https://community.icinga.com/t/help-needed-to-find-a-suitable-plugin-to-monitor-memory-usage-via-snmpv3/14825/4 "2025-05-05T12:25:59Z")

</div>

If you need to calculate then I can recommend the plugin from the Linuxfabrik.  
You provide a CSV file per OID and can use python manipulate value and thresholds.

> **[monitoring-plugins/check-plugins/snmp at main · Linuxfabrik/monitoring-plugins](https://github.com/Linuxfabrik/monitoring-plugins/tree/main/check-plugins/snmp)**
>
> 220+ check plugins for Icinga and other Nagios-compatible monitoring applications. Each plugin is a standalone command line tool (written in Python) that provides a specific type of check. - Linuxf...

---

<div class="post-metadata">

**Author:** ![jeanm](https://community.icinga.com/letter_avatar_proxy/v4/letter/j/6a8cbe/32.png) [@jeanm](https://community.icinga.com/u/jeanm)\
**Post date:** [May 14, 2025, 6:38pm UTC](https://community.icinga.com/t/help-needed-to-find-a-suitable-plugin-to-monitor-memory-usage-via-snmpv3/14825/5 "2025-05-14T18:38:03Z")

</div>

Great tip, thanks a lot, Dominik! I just took the time to test it and it works. The output is not to my taste, but it sure does the job.

Nevertheless, in the meantime, I did write my own plugin, in bash, and it also works. The main concepts are a couple of arguments:

- an OID list, whose values can be referred to as OID00, OID01, etc.
- a Linux bc expression, containing these OID00, OID01 references and evaluated to produce a numeric result compared to warning and critical thresholds

My proficiency in bash is not very high, so I would love to have some guru refactor the code to acceptable standards, after which it could be shared on Github or any other place.

---

<div class="post-metadata">

**Author:** ![rivad](https://community.icinga.com/user_avatar/community.icinga.com/rivad/32/5852_2.png) [@rivad](https://community.icinga.com/u/rivad)\
**Post date:** [May 15, 2025, 7:38am UTC](https://community.icinga.com/t/help-needed-to-find-a-suitable-plugin-to-monitor-memory-usage-via-snmpv3/14825/6 "2025-05-15T07:38:33Z")

</div>

A correction to my post from above: Multiple OIDs per CSV file are possible - one OID per line.

If the output isn’t to your liking, you could post a feature request at [GitHub · Where software is built](https://github.com/Linuxfabrik/monitoring-plugins/issues).

Try to ask an AI how your code could be improved according to [Monitoring Plugins Development Guidelines](https://www.monitoring-plugins.org/doc/guidelines.html) and bash best practices 😉

---

<div class="post-metadata">

**Author:** ![jeanm](https://community.icinga.com/letter_avatar_proxy/v4/letter/j/6a8cbe/32.png) [@jeanm](https://community.icinga.com/u/jeanm)\
**Post date:** [May 15, 2025, 8:04am UTC](https://community.icinga.com/t/help-needed-to-find-a-suitable-plugin-to-monitor-memory-usage-via-snmpv3/14825/7 "2025-05-15T08:04:29Z")

</div>

Here the content of the CSV file used to monitor the memory usage:

```auto
OID,Name,Re-Calc,Unit Label,WARN,CRIT,Show in 1st Line,Report Change as
SNMPv2-SMI::enterprises.1872.2.5.1.2.8.1.0,TotalMem,int(value),,,,,
SNMPv2-SMI::enterprises.1872.2.5.1.2.8.3.0,FreeMem,int(value),,,,,
,warnPercent,70,%,,,,
,critPercent,90,%,,,,
,UsedMem,"values['TotalMem'] - values['FreeMem']",,,,,
,Memory Usage,"round( 100.0 * values['UsedMem'] / values['TotalMem'],2)",%,value > values['warnPercent'],value > values['critPercent'],True,

```

And the `snmp` plugin output:

```auto
lb-alteon-any.csv: Memory Usage: 40.06%

Key ! Value ! State
-------------+----------+-------
TotalMem ! 65835992 ! [OK]
FreeMem ! 39465220 ! [OK]
warnPercent ! 70% ! [OK]
critPercent ! 90% ! [OK]
UsedMem ! 26370772 ! [OK]
Memory Usage ! 40.06% ! [OK]|'TotalMem'=65835992;;;0; 'FreeMem'=39465220;;;0; 'warnPercent'=70%;;;0;100 'critPercent'=90%;;;0;100 'UsedMem'=26370772;;;0; 'Memory Usage'=40.06%;;;0;100

```

---

<div class="post-metadata">

**Author:** ![rivad](https://community.icinga.com/user_avatar/community.icinga.com/rivad/32/5852_2.png) [@rivad](https://community.icinga.com/u/rivad)\
**Post date:** [May 15, 2025, 9:30am UTC](https://community.icinga.com/t/help-needed-to-find-a-suitable-plugin-to-monitor-memory-usage-via-snmpv3/14825/8 "2025-05-15T09:30:34Z")

</div>

What don’t you like about this output?

---

<div class="post-metadata">

**Author:** ![jeanm](https://community.icinga.com/letter_avatar_proxy/v4/letter/j/6a8cbe/32.png) [@jeanm](https://community.icinga.com/u/jeanm)\
**Post date:** [May 15, 2025, 2:27pm UTC](https://community.icinga.com/t/help-needed-to-find-a-suitable-plugin-to-monitor-memory-usage-via-snmpv3/14825/9 "2025-05-15T14:27:25Z")

</div>

My plugin’s command and output - same check:

```auto
$ ./check_snmp_bcexpression.bash -H 10.9.8.7 -t 10 -L authPriv -P 3 -U 'username' -x AES -X 'obfuscated' -a SHA -A 'obfuscated' -b 'scale=2;100*(OID1-OID0)/OID1' -l 'Memory utilisation' -o '.1.3.6.1.4.1.1872.2.5.1.2.8.3.0,.1.3.6.1.4.1.1872.2.5.1.2.8.1.0' -u '%' -w 70 -c 90
OK - Memory utilisation: 40.57% | 'Memory utilisation'=40.57%
$

```

I prefer this output format 🙂

---

<div class="post-metadata">

**Author:** ![rivad](https://community.icinga.com/user_avatar/community.icinga.com/rivad/32/5852_2.png) [@rivad](https://community.icinga.com/u/rivad)\
**Post date:** [May 15, 2025, 3:10pm UTC](https://community.icinga.com/t/help-needed-to-find-a-suitable-plugin-to-monitor-memory-usage-via-snmpv3/14825/10 "2025-05-15T15:10:41Z")

</div>

@jeanm just ask for a change on the plugin, as I did in [snmp: Improve Performance Data Handling · Issue #481 · Linuxfabrik/monitoring-plugins · GitHub](https://github.com/Linuxfabrik/monitoring-plugins/issues/481) or send in a pull request.

@linuxfabrik what do you think about suppressing the table via command line augment and also add a column to suppress lines in the table (like intermediate calculations and threshold definitions). Also the CSV file name in the fist line looks strange and isn’t of interest for non Icinga admins.

---

<div class="post-metadata">

**Author:** ![linuxfabrik](https://community.icinga.com/user_avatar/community.icinga.com/linuxfabrik/32/2683_2.png) [@linuxfabrik](https://community.icinga.com/u/linuxfabrik)\
**Post date:** [May 16, 2025, 6:22am UTC](https://community.icinga.com/t/help-needed-to-find-a-suitable-plugin-to-monitor-memory-usage-via-snmpv3/14825/11 "2025-05-16T06:22:00Z")

</div>

That sounds good and wouldn’t be that difficult to implement.

---

<div class="post-metadata">

**Author:** ![linuxfabrik](https://community.icinga.com/user_avatar/community.icinga.com/linuxfabrik/32/2683_2.png) [@linuxfabrik](https://community.icinga.com/u/linuxfabrik)\
**Post date:** [May 21, 2025, 2:59pm UTC](https://community.icinga.com/t/help-needed-to-find-a-suitable-plugin-to-monitor-memory-usage-via-snmpv3/14825/12 "2025-05-21T14:59:31Z")

</div>

Done.

- [refactor(snmp): make table output suppressable, streamline output](https://github.com/Linuxfabrik/monitoring-plugins/commit/063d295f704853e0a4b8d53ae638ae70dcbf774e)
- [feat(snmp): add column “skip output” to CSV definition for devices, add unit tests](https://github.com/Linuxfabrik/monitoring-plugins/commit/991dd5f10df2dd9b7888f9ba1d56587a0b5d43a5)

---

<div class="post-metadata">

**Author:** ![rivad](https://community.icinga.com/user_avatar/community.icinga.com/rivad/32/5852_2.png) [@rivad](https://community.icinga.com/u/rivad)\
**Post date:** [May 22, 2025, 7:20am UTC](https://community.icinga.com/t/help-needed-to-find-a-suitable-plugin-to-monitor-memory-usage-via-snmpv3/14825/13 "2025-05-22T07:20:58Z")

</div>

The diffs look fantastic - what a great community service!  
Can’t wait to update the plugins and clean up the output 😄

---

<div class="post-metadata">

**Author:** ![jeanm](https://community.icinga.com/letter_avatar_proxy/v4/letter/j/6a8cbe/32.png) [@jeanm](https://community.icinga.com/u/jeanm)\
**Post date:** [May 22, 2025, 7:46am UTC](https://community.icinga.com/t/help-needed-to-find-a-suitable-plugin-to-monitor-memory-usage-via-snmpv3/14825/14 "2025-05-22T07:46:28Z")

</div>

Thanks a lot for the changes!

When would these be available in the compiled zip files on [Index of /monitoring-plugins](https://download.linuxfabrik.ch/monitoring-plugins/)?

---

<div class="post-metadata">

**Author:** ![linuxfabrik](https://community.icinga.com/user_avatar/community.icinga.com/linuxfabrik/32/2683_2.png) [@linuxfabrik](https://community.icinga.com/u/linuxfabrik)\
**Post date:** [May 22, 2025, 8:05am UTC](https://community.icinga.com/t/help-needed-to-find-a-suitable-plugin-to-monitor-memory-usage-via-snmpv3/14825/15 "2025-05-22T08:05:21Z")

</div>

I don’t usually comment on release dates, but I can confirm that we are currently in the process of releasing it.
