Physical memory check not reporting total memory correctly
Physical memory check not reporting total memory correctly
Hello,
I'm using the following command to check physical memory on my Exchange servers and the check is not reporting the amount of memory the server has correctly.
[nagios@nagiosxi ~]$ /usr/local/nagios/libexec/check_nrpe -2 -H 10.131.10.56 -t 30 -c check_memory type=physical 'warn=used>90%' 'crit=used>95%' WARNING: committed = 15.28GB, physical = 13.423GB|'committed'=15.28021GB;14.69955;16.53699;0;18.37443 'committed %'=83%;80;90;0;100 'physical'=13.42266GB;12.79955;14.39949;0;15.99943 'physical %'=84%;80;90;0;100
It says the server only has 13.423GB of physical memory, but it has 16GB. Is there a way to get this to report accurately or perhaps there is a way to hard code the amount of memory the server has?
Thank you.
I'm using the following command to check physical memory on my Exchange servers and the check is not reporting the amount of memory the server has correctly.
[nagios@nagiosxi ~]$ /usr/local/nagios/libexec/check_nrpe -2 -H 10.131.10.56 -t 30 -c check_memory type=physical 'warn=used>90%' 'crit=used>95%' WARNING: committed = 15.28GB, physical = 13.423GB|'committed'=15.28021GB;14.69955;16.53699;0;18.37443 'committed %'=83%;80;90;0;100 'physical'=13.42266GB;12.79955;14.39949;0;15.99943 'physical %'=84%;80;90;0;100
It says the server only has 13.423GB of physical memory, but it has 16GB. Is there a way to get this to report accurately or perhaps there is a way to hard code the amount of memory the server has?
Thank you.
-
benjaminsmith
- Posts: 5324
- Joined: Wed Aug 22, 2018 4:39 pm
- Location: saint paul
Re: Physical memory check not reporting total memory correct
Hi @rferebee,
I tested this on my system and it does looks right. The plugin will return the amount of used physical memory, and that's why you're seeing the warning as you are using 13.423 GB of physical memory. The documentation for this check is on the following page:
https://docs.nsclient.org/reference/win ... eck_memory
Let me know if you have any questions.
I tested this on my system and it does looks right. The plugin will return the amount of used physical memory, and that's why you're seeing the warning as you are using 13.423 GB of physical memory. The documentation for this check is on the following page:
https://docs.nsclient.org/reference/win ... eck_memory
Let me know if you have any questions.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: Physical memory check not reporting total memory correct
So, what's 'committed'=15.28021GB?
Also, even if I set the check to Warn at 95%, it's still warning even though 13.423GB isn't 95% of 16GBs.
Also, even if I set the check to Warn at 95%, it's still warning even though 13.423GB isn't 95% of 16GBs.
Re: Physical memory check not reporting total memory correct
commited includes the pagefile (windows swap/cache), you can either use a different plugin or reach out to the nsclient++ developers to have them adjust their agent but all it does is report what it sees so you'll likely see the same in any other.
Even on a linux machine (or in the windows properties on RAM size back in the day) it shows a discrepency in the real amount, what does this show on the remote system when you run it from a powershell console?
Please send fresh output of the other command as well so that I can run the calculations.
Even on a linux machine (or in the windows properties on RAM size back in the day) it shows a discrepency in the real amount, what does this show on the remote system when you run it from a powershell console?
Code: Select all
Get-WmiObject -Class Win32_ComputerSystem TotalPhysicalMemoryRe: Physical memory check not reporting total memory correct
Here's what I get when I run the PS command:
PS C:\Users\ferebeer> Get-WmiObject -Class Win32_ComputerSystem TotalPhysicalMemory
__GENUS : 2
__CLASS : Win32_ComputerSystem
__SUPERCLASS :
__DYNASTY :
__RELPATH :
__PROPERTY_COUNT : 1
__DERIVATION : {}
__SERVER :
__NAMESPACE :
__PATH :
TotalPhysicalMemory : 17179267072
PSComputerName :
I understand that 16GBs doesn't mean exactly 16GBs, but what I'm trying to point out is that there is no reason the check should be in Warning if the system is only using 13.423GBs when the check is set to warn at 90%... it's only 83% utilized.
Here's the fresh check:
[nagios@nagiosxi ~]$ /usr/local/nagios/libexec/check_nrpe -2 -H 10.131.10.56 -t 30 -c check_memory type=physical 'warn=free<10%' 'crit=free<5%' WARNING: committed = 15.256GB, physical = 13.397GB|'committed'=15.25551GB;14.69955;16.53699;0;18.37443 'committed %'=83%;80;90;0;100 'physical'=13.39747GB;12.79955;14.39949;0;15.99943 'physical %'=84%;80;90;0;100
PS C:\Users\ferebeer> Get-WmiObject -Class Win32_ComputerSystem TotalPhysicalMemory
__GENUS : 2
__CLASS : Win32_ComputerSystem
__SUPERCLASS :
__DYNASTY :
__RELPATH :
__PROPERTY_COUNT : 1
__DERIVATION : {}
__SERVER :
__NAMESPACE :
__PATH :
TotalPhysicalMemory : 17179267072
PSComputerName :
I understand that 16GBs doesn't mean exactly 16GBs, but what I'm trying to point out is that there is no reason the check should be in Warning if the system is only using 13.423GBs when the check is set to warn at 90%... it's only 83% utilized.
Here's the fresh check:
[nagios@nagiosxi ~]$ /usr/local/nagios/libexec/check_nrpe -2 -H 10.131.10.56 -t 30 -c check_memory type=physical 'warn=free<10%' 'crit=free<5%' WARNING: committed = 15.256GB, physical = 13.397GB|'committed'=15.25551GB;14.69955;16.53699;0;18.37443 'committed %'=83%;80;90;0;100 'physical'=13.39747GB;12.79955;14.39949;0;15.99943 'physical %'=84%;80;90;0;100
Re: Physical memory check not reporting total memory correct
Actually, this seems correct. 83% utilization means that you have 7% free memory. In your check, you have the following thresholds:I understand that 16GBs doesn't mean exactly 16GBs, but what I'm trying to point out is that there is no reason the check should be in Warning if the system is only using 13.423GBs when the check is set to warn at 90%... it's only 83% utilized.
7% is less than 10%, so you get a warning. If you had a value less than 5%, you would get a critical.'warn=free<10%' 'crit=free<5%'
Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: Physical memory check not reporting total memory correct
83% utilization would mean I have 17% free memory. If the check is set to warn at 10% free and 17% is more than 10%, it shouldn't be warning.
Re: Physical memory check not reporting total memory correct
My bad. You posted before I could delete my reply... I suppose my math is awful on Monday mornings... You are correct. I don't know yet why the check returns a warning. We will have to do some more digging into this. Sorry about the previous post!
Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: Physical memory check not reporting total memory correct
It's all good, I'm just happy I'm not crazy. I thought I was transported to the Twilight Zone this wonderful Monday morning.
Do you want me to send you an update system profile so you can take a look?
Do you want me to send you an update system profile so you can take a look?
Re: Physical memory check not reporting total memory correct
Update: Looking at your command, and the output, I believe you are not passing the thresholds at all as you are missing the "-a" flag... Does your command work, when you use "-a"?
NRPE syntax:
Code: Select all
/usr/local/nagios/libexec/check_nrpe -2 -H 10.131.10.56 -t 30 -c check_memory -a type=physical 'warn=free<10%' 'crit=free<5%'Code: Select all
./check_nrpe -c <command> -a <args>Be sure to check out our Knowledgebase for helpful articles and solutions!