Question about monitoring linux with nagios snmp

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Sampath.Basireddy
Posts: 252
Joined: Wed Dec 14, 2016 12:30 pm

Question about monitoring linux with nagios snmp

Post by Sampath.Basireddy »

Hello There,

We have few Linux Servers being monitored with Nagios SNMP in our Environment. On one of the server, although it has 4GB of Memory, only 2GB is detected and it starts alerting once 2GB is utilized. Tried restarting SNMP Service, but no luck.

Code: Select all

             total       used       free     shared    buffers     cached
Mem:          4016       2063       1952          0        268        528
-/+ buffers/cache:       1266       2749
Swap:         2047          0       2047
Any thoughts.

Thank You!!
You do not have the required permissions to view the files attached to this post.
kyang

Re: Question about monitoring linux with nagios snmp

Post by kyang »

Can you show me how your service is defined for "Memory Usage"

Configure --> Core Config Manager --> Services --> Memory Usage

I want to see how your $ARG1$ is defined for that service.

Code: Select all

             total       used       free     shared    buffers     cached
Mem:          2005       1041        963          0         85        251
-/+ buffers/cache:        704       1300
Swap:         2015          0       2015
Capture.PNG
cap2.PNG
You do not have the required permissions to view the files attached to this post.
Sampath.Basireddy
Posts: 252
Joined: Wed Dec 14, 2016 12:30 pm

Re: Question about monitoring linux with nagios snmp

Post by Sampath.Basireddy »

This the $ARG1$ in the service check:

Code: Select all

 -C nXICommun!tyStr!ng --v2c -m Memory -w 95 -c 97 -f
I tried with 'Physical', but it says Unknown storage.

Code: Select all

[root@nxiserver]$ /usr/local/nagios/libexec/check_snmp_storage_wizard.pl -H <hostname> -C nXICommun!tyStr!ng --v2c -m Physical -w 95 -c 97 -f
Unknown storage : Physical : ERROR
Version of the 'check_snmp_storage' script is 1.3.3
You do not have the required permissions to view the files attached to this post.
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: Question about monitoring linux with nagios snmp

Post by tgriep »

That plugin gathers the information by doing a SNMP walk of certain OID's and the name used in the command has to match what the remote server responds to so we would have to know what OS and release number the remote system is running and possibly the snmp daemons settings that is running on that server.

The example below is what you would use for a Centos system.

Code: Select all

-C nXICommun!tyStr!ng --v2c -m 'Physical memory' -w 95 -c 97 -f
You could run a snmpwalk command against the system and see if you can search the output for the string that would return the correct results.

Code: Select all

snmpwalk xxx.xxx.xxx.xxx -c nXICommun!tyStr!ng -v2c
Be sure to check out our Knowledgebase for helpful articles and solutions!
Sampath.Basireddy
Posts: 252
Joined: Wed Dec 14, 2016 12:30 pm

Re: Question about monitoring linux with nagios snmp

Post by Sampath.Basireddy »

Below is the output when I grepped for Memory in the SNMP Walk output. As per this, we do see 4112468 KBytes Memory which is actual amount of Memory on the Server.

Code: Select all

[user@nagiosxi01 ~]$ snmpwalk 192.168.0.2 -c communitystring -v2c | grep -i Memory
HOST-RESOURCES-MIB::hrMemorySize.0 = INTEGER: 4112468 KBytes
HOST-RESOURCES-MIB::hrStorageType.102 = OID: HOST-RESOURCES-TYPES::hrStorageVirtualMemory
HOST-RESOURCES-MIB::hrStorageDescr.101 = STRING: Real Memory
HOST-RESOURCES-MIB::hrStorageDescr.103 = STRING: Memory Buffers
kyang

Re: Question about monitoring linux with nagios snmp

Post by kyang »

What OS is this on?

Have you tried running both commands?

Code: Select all

/usr/local/nagios/libexec/check_snmp_storage_wizard.pl -H <IPaddress> -C StrOngCOmmunity --v2c -m 'Real Memory' -w 95 -c 97 -f

Code: Select all

/usr/local/nagios/libexec/check_snmp_storage_wizard.pl -H 192.168.4.125 -C StrOngCOmmunity --v2c -m 'Memory Buffers' -w 95 -c 97 -f
What's the output?
Sampath.Basireddy
Posts: 252
Joined: Wed Dec 14, 2016 12:30 pm

Re: Question about monitoring linux with nagios snmp

Post by Sampath.Basireddy »

kyang wrote:What OS is this on?

Have you tried running both commands?

Code: Select all

/usr/local/nagios/libexec/check_snmp_storage_wizard.pl -H <IPaddress> -C StrOngCOmmunity --v2c -m 'Real Memory' -w 95 -c 97 -f

Code: Select all

/usr/local/nagios/libexec/check_snmp_storage_wizard.pl -H 192.168.4.125 -C StrOngCOmmunity --v2c -m 'Memory Buffers' -w 95 -c 97 -f
What's the output?

OS is pretty old Red Hat Enterprise Linux AS release 3 (Taroon)

Below are the outputs for Real Memory & Memory Buffers:

Real Memory:

Code: Select all

Real Memory: 83%used(1699MB/2048MB) (<95%) : OK | 'Real_Memory'=1699MB;1946;1987;0;2048
Memory Buffers:

Code: Select all

Memory Buffers: 0%used(0MB/0MB) (<95%) : OK | 'Memory_Buffers'=0MB;0;0;0;0
And this is for just "Memory"

Code: Select all

Real Memory: 83%used(1699MB/2048MB) Memory Buffers: 0%used(0MB/0MB) (<95%) : OK | 'Real_Memory'=1699MB;1946;1987;0;2048 'Memory_Buffers'=0MB;0;0;0;0
dwasswa

Re: Question about monitoring linux with nagios snmp

Post by dwasswa »

Hi @Sampath.Basireddy,

Its possible that plugin is not working well with old versions of Red Hat.

The version you are running,is apparently very old. You might have to update Red Hat version which would update your kernel and package versions for that plugin to work as expected.

Please let me now if you have any questions.
Sampath.Basireddy
Posts: 252
Joined: Wed Dec 14, 2016 12:30 pm

Re: Question about monitoring linux with nagios snmp

Post by Sampath.Basireddy »

Agreed, OS is really old.

I believe I will have to live with it for now until they are decommissioned.
kyang

Re: Question about monitoring linux with nagios snmp

Post by kyang »

Do you have any more questions or are we okay to close this thread?
Locked