Page 1 of 2
Question about monitoring linux with nagios snmp
Posted: Wed Oct 04, 2017 11:01 am
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!!
Re: Question about monitoring linux with nagios snmp
Posted: Wed Oct 04, 2017 11:44 am
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
Re: Question about monitoring linux with nagios snmp
Posted: Thu Oct 05, 2017 12:00 am
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
Re: Question about monitoring linux with nagios snmp
Posted: Thu Oct 05, 2017 10:28 am
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
Re: Question about monitoring linux with nagios snmp
Posted: Wed Oct 11, 2017 4:42 pm
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
Re: Question about monitoring linux with nagios snmp
Posted: Thu Oct 12, 2017 9:18 am
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?
Re: Question about monitoring linux with nagios snmp
Posted: Thu Oct 12, 2017 4:56 pm
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
Re: Question about monitoring linux with nagios snmp
Posted: Fri Oct 13, 2017 1:20 pm
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.
Re: Question about monitoring linux with nagios snmp
Posted: Mon Oct 16, 2017 10:48 am
by Sampath.Basireddy
Agreed, OS is really old.
I believe I will have to live with it for now until they are decommissioned.
Re: Question about monitoring linux with nagios snmp
Posted: Mon Oct 16, 2017 10:57 am
by kyang
Do you have any more questions or are we okay to close this thread?