Page 1 of 1

No % value reported when calculating memory usage

Posted: Wed Jul 01, 2020 12:47 pm
by xlin125
A Nagios XI 5.4.8 server monitors a CentOS 7 VM that has a Nagios NRPE v3.2.1 agent installed. The Nagios XI server received the memory usage from the Nagios NRPE agent on this VM but the free memory% value was not reported (%). Then a CRITICAL condition was created. It should have reported a 62% usage.

$ /usr/local/nagios/libexec/check_nrpe -H 133.3.148.99 -t 30 -c check_mem -a '-w 20 -c 10 -n'
CRITICAL - 12369 / 19916 MB (%) Free Memory, Used: 7433 MB, Shared: 352 MB, Buffers + Cached: 4183 MB | total=19916MB free=12369MB used=7433MB shared=352MB buffers_and_cached=4183MB

What caused this problem? Thanks!

Re: No % value reported when calculating memory usage

Posted: Wed Jul 01, 2020 1:03 pm
by scottwilkerson
On the CentOS 7 server is

Code: Select all

dc
installed?

Code: Select all

which dc
The plugin is expecting dc at /usr/bin/dc to calculate the percentage.

If it is not found, it can be installed with

Code: Select all

yum install bc -y

Re: No % value reported when calculating memory usage

Posted: Wed Jul 01, 2020 5:11 pm
by xlin125
@scottwilkerson, you are correct that bc RPM package was missing on this server. After installing this bc package on the server, all works fine. Thanks!

Re: No % value reported when calculating memory usage

Posted: Thu Jul 02, 2020 6:39 am
by scottwilkerson
xlin125 wrote:@scottwilkerson, you are correct that bc RPM package was missing on this server. After installing this bc package on the server, all works fine. Thanks!
Great!

Locking thread