RAM-Usage wrong output: monitor shows to much Ram is used

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
PeterS
Posts: 3
Joined: Mon May 19, 2014 9:32 am

RAM-Usage wrong output: monitor shows to much Ram is used

Post by PeterS »

Hello Together

I'm new here and hope I don't forget to mention important informations.
We have the following problem:
On a Windows 2008 R2 Enterprise host, we monitor also the RAM usage. The host has 32GB physical Ram and 20GB SWAP-RAM (pagefile).
When I look at the task manager, the host use all the time between 8-10GB Ram. At the moment, the task manager shows that 8.3GB is used, but the nagios shows me the following informaitons:
Memory usage: total:53219.80 Mb - used: 43113.09 Mb (81%) - free: 10106.71 Mb (19%)
I dont know, how it comes to these values? The Host never use 43113MB at the moment...?
Now I use the following Nagiosclient on the Windowshost: NSCP-0.4.1.105-x64. I updatet yesterday. Before we used the version: NSClient++-0.3.7 then I updated to the version: NSClient++-0.3.9-x64 and now I updated to the NSCP-0.4.1.105-x64. But it makes no differenz.
We also updated the nagios-plugins to the newest version: nagios-plugins-2.0.1
The Nagiosversion we use is: Nagios Core 4.0.1.

The command to monitor the RAM usage ist the following:
check_nt -H Hostname -p 12489 -v MEMUSE

The output from the Nagiosgui is the same, as when I use this command.

We monitor the ram usage in many windows servers and everywhere it works fine. Only by this host we have this problem. I tried also with the nsc.ini file from another windowshost in wich it works, to check if there could be the problem but it isn't, the problem still exist.

I was also looking for a thread, where the same problem is descriebed but I didn't find.

Has someone an idea, where the problem could be? I do not go on.... :cry:

Many thanks in advance!

Kind Regards
PeterS
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: RAM-Usage wrong output: monitor shows to much Ram is use

Post by lmiltchev »

This is a known issue. The check_nt won't show the physical memory. You will need to use the check_nrpe and checkMem with NSClient++. For example, in the nsclient.ini you may have:

Code: Select all

physical_mem=checkMem MaxWarn=80% MaxCrit=90% ShowAll=long type=physical
From the Nagios server, you can run:

Code: Select all

./check_nrpe -H <client ip> -c physical_mem
Be sure to check out our Knowledgebase for helpful articles and solutions!
PeterS
Posts: 3
Joined: Mon May 19, 2014 9:32 am

Re: RAM-Usage wrong output: monitor shows to much Ram is use

Post by PeterS »

Hello limitchev

Thanks a lot for your answer!
Perhaps you missunderstood my problem or I missunderstand your answer? ;)
I want that the SWAP and the physical memory is displayed, so the total value of 53219.80 Mb is correct (32GB physical + 20GB SWAP).
The Problem is, that only 8GB physical Memory is used on the host (I see this in the Taskmanager) but nagios shows me that 43113.09Mb is used and only 10106.71Mb is free and that is incorrect.

Do you have any idea?

Thanks a lot!

Kind Regards
PeterS
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: RAM-Usage wrong output: monitor shows to much Ram is use

Post by lmiltchev »

Would you like to see the "Available" or the "Free" memory as shown in the Windows Task Manager? It seems like, the check_nt and MEMUSE, doesn't provide the correct output. I was thinking of maybe using check_nrpe with CheckMem, but this doesn't seem to provide the info that you need.

http://nsclient.org/nscp/wiki/CheckSystem/checkMem

You could monitor the "Available" memory via NCPA, but I don't believe you can use NCPA to monitor the "Free" memory. You can probably create a custom script that does that and use it with NSClient++ (check_nrpe) or NCPA.
Be sure to check out our Knowledgebase for helpful articles and solutions!
PeterS
Posts: 3
Joined: Mon May 19, 2014 9:32 am

Re: RAM-Usage wrong output: monitor shows to much Ram is use

Post by PeterS »

Hello lmitchev

Thanks a lot for your answer!
We have solved the problem via nrpe. We check now only the physical RAM, unfortunately we found no solution to check the Pagefile and the physical RAMs with a correct response.

Thanks for supporting me!

I will close the call.

Kind Regards
Peter Spaar
liquidcool
Posts: 59
Joined: Tue Feb 21, 2012 6:08 am

Re: RAM-Usage wrong output: monitor shows to much Ram is use

Post by liquidcool »

Have you tried writing a check to poll the device's SNMP OID table - .1.3.6.1.2.1.25.2.3.1
That should give you back the description, allocation units, size and used.
Description - 1.3.6.1.2.1.25.2.3.1.3
Allocation Units - 1.3.6.1.2.1.25.2.3.1.4
Size - 1.3.6.1.2.1.25.2.3.1.5
Used - 1.3.6.1.2.1.25.2.3.1.6

With a few calculations :
Total Size GB = (size * allocation units ) / 1073741824
Used GB = (used * allocation units) / 1073741824

Total Size MB = (size * allocations units) / 1048576
Used MB = (used * allocation units) / 1048576
Locked