NCPA reading memory wrong for terabite

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
rnjie
Posts: 157
Joined: Wed Mar 20, 2019 4:59 pm

NCPA reading memory wrong for terabite

Post by rnjie »

i have a physical server with 6TB of memory, before i used snmp to monitor the memory but i always got inaccurate results, i decided to switch to ncpa client, its been working for a while but i noticed lately that it wasnt as accurate when we added a few GB of memory. please see the current memory usage of my system

free -h
total used free shared buffers cached
Mem: 5.9T 5.9T 38G 1.1T 1.0G 1.2T
-/+ buffers/cache: 4.6T 1.3T
Swap: 15G 0B 15G


as you can see i still have almost 1.5T of memory cached but Nagios keeps sending critical alerts stating memory is 98% used
User avatar
mbellerue
Posts: 1403
Joined: Fri Jul 12, 2019 11:10 am

Re: NCPA reading memory wrong for terabite

Post by mbellerue »

Can you post the full check_ncpa command that you're using for this? Also, what version of NCPA is this?
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!
rnjie
Posts: 157
Joined: Wed Mar 20, 2019 4:59 pm

Re: NCPA reading memory wrong for terabite

Post by rnjie »

my client server is rhel 6 and the version is
Agent_version was ['1.2.0']

But the nagios server ncpa wizard version is the latest 2.2.1
command on wizard is check_xi_ncpa -H (hostname) -t 'plut0' -P 5693 -M memory/virtual -u Gi -w 85 -c 95
User avatar
mbellerue
Posts: 1403
Joined: Fri Jul 12, 2019 11:10 am

Re: NCPA reading memory wrong for terabite

Post by mbellerue »

Oh wow, yeah. It's possible that the old version wasn't reading memory properly. Is upgrading the client a possibility? 1.2.0 is pretty old.
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!
rnjie
Posts: 157
Joined: Wed Mar 20, 2019 4:59 pm

Re: NCPA reading memory wrong for terabite

Post by rnjie »

you mean upgrading the client operating system or ncpa version? the applications we run on the system only requires rhel 6 so it cnt be upgraded to rhel 7, but if ncpa can be updated then il like to know how
User avatar
mbellerue
Posts: 1403
Joined: Fri Jul 12, 2019 11:10 am

Re: NCPA reading memory wrong for terabite

Post by mbellerue »

I'm sorry, yes I mean upgrade the NCPA client. You can download the RPM or use the Nagios repository. It would probably be worth a little time testing since you are upgrading from a fairly old version.
https://www.nagios.org/ncpa/#downloads

2.2.0 is the version that I was using, and it seems to measure memory in the correct fashion. Where cache is not counted as actual used memory.
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!
rnjie
Posts: 157
Joined: Wed Mar 20, 2019 4:59 pm

Re: NCPA reading memory wrong for terabite

Post by rnjie »

i just got the latest version and am still getting thesame results

ncpa-2.2.0-1

/usr/local/nagios/libexec/check_ncpa.py -H LXDODBT1 -t 'plut0' -P 5693 -M memory/virtual -u Gi -w 85 -c 95
CRITICAL: Used memory was 97.20 % (Available: 171.28 GiB, Total: 6057.84 GiB, Free: 43.91 GiB, Used: 4743.91 GiB) | 'available'=171.28GiB;5149;5755; 'total'=6057.84GiB;5149;5755; 'free'=43.91GiB;5149;5755; 'used'=4743.91GiB;5149;5755;

this is the memory usage of the server

Code: Select all

 free -h
        total       used       free     shared    buffers     cached
Mem:     5.9T       5.9T        44G       1.1T       1.0G       1.2T
-/+ buffers/cache:    4.6T       1.3T
Swap:          15G         0B        15G
User avatar
mbellerue
Posts: 1403
Joined: Fri Jul 12, 2019 11:10 am

Re: NCPA reading memory wrong for terabite

Post by mbellerue »

Does it show those same numbers in the NCPA web interface if you navigate to API, Memory, Virtual?
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!
rnjie
Posts: 157
Joined: Wed Mar 20, 2019 4:59 pm

Re: NCPA reading memory wrong for terabite

Post by rnjie »

yes.
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: NCPA reading memory wrong for terabite

Post by lmiltchev »

What is the value (from the NCPA output) that you think is incorrect? NCPA uses the psutil in order to calculate memory. Here's an explanation of how the memory is actually calculated:

https://psutil.readthedocs.io/en/latest/#memory
Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked