I'm in the process of a slow rollout of Nagios XI monitoring. As it stands right now, I am only monitoring 2 linux boxes. The memory check seems to be working correctly on one box, but not the other. As far as I can tell the check is configured the same way for each of them:
check_nrpe!check_mem!-a '-w 20 -c 10'!!!!!!
For one box, the % free memory is calculated correctly:
OK - 9431 / 12159 MB (77%) Free Memory, Used: 2728 MB, Shared: 0 MB, Buffers: 219 MB, Cached: 1044 MB
However, on the other box, it isn't even showing a value for free memory and because of that it is constantly in a warning state:
WARNING - 2315 / 4031 MB (%) Free Memory, Used: 1716 MB, Shared: 0 MB, Buffers: 136 MB, Cached: 461 MB
Anyone have any troubleshooting suggestions?
% Memory used calculation
-
tonyyarusso
- Posts: 1128
- Joined: Wed Mar 03, 2010 12:38 pm
- Location: St. Paul, MN, USA
- Contact:
Re: % Memory used calculation
The first step would be to establish exactly what command is being run on the target system, then log into that system and manually run the command yourself, as that will show more output than what is returned to Nagios.
Re: % Memory used calculation
Thanks for the reply.
As far as I can tell, the command being run is check_nrpe!check_mem!-a '-w 20 -c 10'!!!!!!
but I don't believe I can just run that at the command line.
Where do I find the exact command being run?
As far as I can tell, the command being run is check_nrpe!check_mem!-a '-w 20 -c 10'!!!!!!
but I don't believe I can just run that at the command line.
Where do I find the exact command being run?
Re: % Memory used calculation
The check is exactly the same on each server, so I don't know why it is working on one but not the other.
On the server where it is not working, it is getting valid memory data - the correct amounts for used/total/cached, etc. It's just not calculating the percentage.
On the server where it is not working, it is getting valid memory data - the correct amounts for used/total/cached, etc. It's just not calculating the percentage.
-
tonyyarusso
- Posts: 1128
- Joined: Wed Mar 03, 2010 12:38 pm
- Location: St. Paul, MN, USA
- Contact:
Re: % Memory used calculation
Just a stab in the dark: This plugin might require an external tool for calculations that is not installed on your servers. It is quite common to use the 'bc' utility, and some distros do not install that by default.
Re: % Memory used calculation
But both servers are the same distro, same build. They are even running the same internally developed application (just different components of it)
I just can't figure out why it is getting calculated on one server but not the other. At this point I haven't done any customizations of NRPE or xinetd, so even those are the same across the 2 monitored servers.
I just can't figure out why it is getting calculated on one server but not the other. At this point I haven't done any customizations of NRPE or xinetd, so even those are the same across the 2 monitored servers.
Re: % Memory used calculation
Thanks for your help (not sure where my last post went - probably user error on my part)
The server was missing bc. Not sure how that happened, since both servers were built in the same manner. But anyways, the check is working now.
Thanks!
The server was missing bc. Not sure how that happened, since both servers were built in the same manner. But anyways, the check is working now.
Thanks!
Re: % Memory used calculation
Glad to see that this is resolved and feel free to post if you have any further issues. 