check_snmp_storage* reporting incorrect memory values

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
boeingcccs2
Posts: 7
Joined: Mon Dec 11, 2017 2:25 pm

check_snmp_storage* reporting incorrect memory values

Post by boeingcccs2 »

I am attempting to utilize the snmp v3 monitoring. Everything seems to be working correctly except for the RAM usage...

Example CMD:
check_snmp_storage.pl -H <my HOST> -l <my user> -x <authentication> -X <privacy> -L SHA, AES -q Ram -m Physical -w 50 -c 80
Reporting 100% used - Reality is 7-8%

Its as if its including cached memory when it shouldn't?
Is there a way to suppress the cache in the report?

Thanks in advance
John-
jforcier

Re: check_snmp_storage* reporting incorrect memory values

Post by jforcier »

What are you trying to monitor?


Try using this command instead:

Code: Select all

./check_snmp_storage_wizard.pl -H <HOSTNAME> -C public --v2c -m "Physical" -T pl -w 10 -c 5 -f
Output:

Code: Select all

Physical memory: 79%left(1450MB/1840MB) (>10%) : OK | 'Physical_memory'=390MB;1656;1748;0;1840
https://support.nagios.com/kb/article/m ... s-774.html
boeingcccs2
Posts: 7
Joined: Mon Dec 11, 2017 2:25 pm

Re: check_snmp_storage* reporting incorrect memory values

Post by boeingcccs2 »

I have to use snmp v3.. however I used this command with the v3 credentials and it still comes back indicating that 0% left

for some reason its reporting cache with whats being used which should not be done. (if I dump the cache it reports correctly - not a good practice)

In this instance I am trying to get the Ram utilization off the server to report correctly.
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: check_snmp_storage* reporting incorrect memory values

Post by tgriep »

What OS and release is the remote server running?
What version is the plugin?
Run this to get that.

Code: Select all

./check_snmp_storage_wizard.pl -V
Can you post the full output of the plugin with verbose enabled so we can see it's output?

Code: Select all

./check_snmp_storage.pl -H <my HOST> -l <my user> -x <authentication> -X <privacy> -L SHA, AES -q Ram -m Physical -w 50 -c 80 -v
Thanks
Be sure to check out our Knowledgebase for helpful articles and solutions!
boeingcccs2
Posts: 7
Joined: Mon Dec 11, 2017 2:25 pm

Re: check_snmp_storage* reporting incorrect memory values

Post by boeingcccs2 »

The OS on the entire system is RedHat 6.6 (Monitoring and Remote servers)

The Version of the plugin is (Check_snmp_storage version: 1.3.3)

Complete output:
Alarm at 15
SNMPv3 login
SNMPv3 AuthPriv login : nagios, SHA, AES
Filter : Physical
OID : 1.3.6.1.2.1.25.2.3.1.3.46, Desc : /shared
OID : 1.3.6.1.2.1.25.2.3.1.3.40, Desc : /tmp
OID : 1.3.6.1.2.1.25.2.3.1.3.45, Desc : /logging
OID : 1.3.6.1.2.1.25.2.3.1.3.35, Desc : /dev/shm
OID : 1.3.6.1.2.1.25.2.3.1.3.6, Desc : Memory buffers
OID : 1.3.6.1.2.1.25.2.3.1.3.1, Desc : Physical memory
OID : 1.3.6.1.2.1.25.2.3.1.2.1, Storagetype: Ram ?= Ram
Name : Physical memory, Index : 1
OID : 1.3.6.1.2.1.25.2.3.1.3.41, Desc : /var/tmp
OID : 1.3.6.1.2.1.25.2.3.1.3.38, Desc : /local_data
OID : 1.3.6.1.2.1.25.2.3.1.3.44, Desc : /cm
OID : 1.3.6.1.2.1.25.2.3.1.3.36, Desc : /boot
OID : 1.3.6.1.2.1.25.2.3.1.3.7, Desc : Cached memory
OID : 1.3.6.1.2.1.25.2.3.1.3.37, Desc : /home
OID : 1.3.6.1.2.1.25.2.3.1.3.3, Desc : Virtual memory
OID : 1.3.6.1.2.1.25.2.3.1.3.10, Desc : Swap space
OID : 1.3.6.1.2.1.25.2.3.1.3.43, Desc : /c3s
OID : 1.3.6.1.2.1.25.2.3.1.3.31, Desc : /
storages selected : 1
1.3.6.1.2.1.25.2.3.1.5.1 : 65858448
1.3.6.1.2.1.25.2.3.1.6.1 : 65586068
1.3.6.1.2.1.25.2.3.1.4.1 : 1024
Descr : Physical memory
Size : 65858448
Used : 65586068
Alloc : 1024
Perf data : 'Physical_memory'=64049MB;32157;51452;0;64315
Physical memory: 100%used(64049MB/64315MB) (>80%) : CRITICAL
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: check_snmp_storage* reporting incorrect memory values

Post by tgriep »

Thanks for the data. The remote server seems to be reporting that most of the memory is used.
This OID shows the amount of used memory and it almost matches the total memory.

Code: Select all

1.3.6.1.2.1.25.2.3.1.6.1 : 65586068
The Check_snmp_storage plugin does not have the ability to exclude the Cached memory from the calculations but the check_snmp_mem.pl plugin does.
Just add the -m option to exclude it.

Code: Select all

Usage: ./check_snmp_mem.pl [-v] -H <host> -C <snmp_community> [-2] | (-l login -x passwd [-X pass -L <authp>,<privp>])  [-p <port>] -w <warn level> -c <crit level> [-I|-N|-E] [-f] [-m] [-t <timeout>] [-V]
-v, --verbose
   print extra debugging information (including interface list on the system)
-h, --help
   print this help message
-H, --hostname=HOST
   name or IP address of host to check
-C, --community=COMMUNITY NAME
   community name for the host's SNMP agent (implies SNMP v1 or v2c with option)
-2, --v2c
   Use snmp v2c
-l, --login=LOGIN ; -x, --passwd=PASSWD
   Login and auth password for snmpv3 authentication
   If no priv password exists, implies AuthNoPriv
-X, --privpass=PASSWD
   Priv password for snmpv3 (AuthPriv protocol)
-L, --protocols=<authproto>,<privproto>
   <authproto> : Authentication protocol (md5|sha : default md5)
   <privproto> : Priv protocole (des|aes : default des)
-P, --port=PORT
   SNMP port (Default 161)
-w, --warn=INTEGER | INT,INT
   warning level for memory in percent (0 for no checks)
     Default (-N switch) : comma separated level for Real Memory and Swap
     -I switch : warning level
-c, --crit=INTEGER | INT,INT
   critical level for memory in percent (0 for no checks)
     Default (-N switch) : comma separated level for Real Memory and Swap
     -I switch : critical level
-N, --netsnmp (default)
   check linux memory & swap provided by Net SNMP
-m, --memcache
   include cached memory in used memory (only with Net-SNMP)
-I, --cisco
   check cisco memory (sum of all memory pools)
-E, --hp
   check HP proccurve memory
-f, --perfdata
   Performance data output
-t, --timeout=INTEGER
   timeout for SNMP in seconds (Default: 5)
-V, --version
   prints version number
Be sure to check out our Knowledgebase for helpful articles and solutions!
boeingcccs2
Posts: 7
Joined: Mon Dec 11, 2017 2:25 pm

Re: check_snmp_storage* reporting incorrect memory values

Post by boeingcccs2 »

That did the trick thank you! only have one other question... Once I added this in I don't see the performance charts available, Im guessing this is some cfg I missed?
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: check_snmp_storage* reporting incorrect memory values

Post by tgriep »

The performance data output between the plugins are different so when the change was made to the new plugin, the system stops graphing the performance data.
You would have to remove the performance data files from the system so they will be recreated with the new data.
Go to the following folder on the Nagios server (Replace hostname with the actual host name)

Code: Select all

/usr/local/nagios/share/perfdata/hostname
Then delete the .xml and .rrd files with the service name in it and within 15 minutes, they should be recreated with the new data.

Also, make sure you enabled the performance data output option in the command in Nagios XI.

Code: Select all

-f, --perfdata
   Performance data output
Be sure to check out our Knowledgebase for helpful articles and solutions!
boeingcccs2
Posts: 7
Joined: Mon Dec 11, 2017 2:25 pm

Re: check_snmp_storage* reporting incorrect memory values

Post by boeingcccs2 »

Perfect thanks for the help!
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: check_snmp_storage* reporting incorrect memory values

Post by tgriep »

Your welcome. Is it OK to lock up this post as solved for you?
Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked