Use SNMP to get disk space from two oids and add them

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
vtadisina
Posts: 28
Joined: Thu Sep 29, 2016 9:39 am

Use SNMP to get disk space from two oids and add them

Post by vtadisina »

I want to get memory available from two oids and add those memories and compare it with a threshold to give an alert. Is there a way where i can do this.
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: Use SNMP to get disk space from two oids and add them

Post by ssax »

What type of system is it, we may have a plugin that already does what you're looking for.

If there isn't an already made plugin you would need to write your own to perform the queries and calculations.

https://assets.nagios.com/downloads/nag ... inapi.html
https://nagios-plugins.org/doc/guidelines.html

Let us know if you have any questions.


Thank you
vtadisina
Posts: 28
Joined: Thu Sep 29, 2016 9:39 am

Re: Use SNMP to get disk space from two oids and add them

Post by vtadisina »

It is a Linux system and I am using UCD-SNMP-MIB to get 2 memory statuses in kb and add them and compare against a threshold
User avatar
mcapra
Posts: 3739
Joined: Thu May 05, 2016 3:54 pm

Re: Use SNMP to get disk space from two oids and add them

Post by mcapra »

Can you share the OIDs you are referencing? I wrote a plugin that calculates disk space for a given mount using the UCD-SNMP-MIB table which might satisfy your use case:

https://github.com/mcapra/nagios-check_snmp_storage_ucd
Former Nagios employee
https://www.mcapra.com/
vtadisina
Posts: 28
Joined: Thu Sep 29, 2016 9:39 am

Re: Use SNMP to get disk space from two oids and add them

Post by vtadisina »

These are the Oids that i need the status from.

UCD-SNMP-MIB::memAvailReal.0 =.1.3.6.1.4.1.2021.4.6.0
UCD-SNMP-MIB::memCached.0 = .1.3.6.1.4.1.2021.4.15.0
User avatar
mcapra
Posts: 3739
Joined: Thu May 05, 2016 3:54 pm

Re: Use SNMP to get disk space from two oids and add them

Post by mcapra »

This plugin appears to leverage those OIDs:
https://exchange.nagios.org/directory/P ... em/details

You might give that a shot. With the understanding that this is not a plugin officially maintained by Nagios, feel free to share any issues you encounter with the plugin.
Former Nagios employee
https://www.mcapra.com/
Locked