No % value reported when calculating memory usage

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
xlin125
Posts: 172
Joined: Mon Jan 19, 2015 6:01 pm

No % value reported when calculating memory usage

Post 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!
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: No % value reported when calculating memory usage

Post 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
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
xlin125
Posts: 172
Joined: Mon Jan 19, 2015 6:01 pm

Re: No % value reported when calculating memory usage

Post 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!
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: No % value reported when calculating memory usage

Post 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
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
Locked