Hi, I'm trying to monitor my Swap usage only, but when using NCPA memory/swap "check_xi_ncpa!-t 'token' -P 5693 -M memory/swap -u Gi -w 50 -c 80"
I'm getting the memory + swap total usage and not swap usage only.
How can I fix that so it will check swap usage only?
Thanks
NCPA memory/swap - Why does it monitor Memory + Swap?
Re: NCPA memory/swap - Why does it monitor Memory + Swap?
What is the operating system that you are currently monitoring memory on? I tested the check against CentOS 6 machine, and it seems accurate.
On the client (remote box)
On the Nagios XI server
Are you seeing some inconsistencies when you run your check?
On the client (remote box)
Code: Select all
free -h
total used free shared buffers cached
Mem: 7.8G 1.7G 6.1G 492K 181M 842M
-/+ buffers/cache: 766M 7.1G
Swap: 2.0G 0B 2.0GCode: Select all
./check_ncpa.py -H x.x.x.x -t mytoken' -M 'memory/swap' -w 50 -c 80 -u Gi
OK: Used swap was 0.00 % (Total: 2.00 GiB, Used: 0.00 GiB, Free: 2.00 GiB) | 'total'=2.00GiB;1;2; 'used'=0.00GiB;1;2; 'free'=2.00GiB;1;2;Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: NCPA memory/swap - Why does it monitor Memory + Swap?
Hi, I'm monitoring windows servers. Actually I monitor linux servers with the same command and they are fine.lmiltchev wrote:What is the operating system that you are currently monitoring memory on? I tested the check against CentOS 6 machine, and it seems accurate.
On the client (remote box)On the Nagios XI serverCode: Select all
free -h total used free shared buffers cached Mem: 7.8G 1.7G 6.1G 492K 181M 842M -/+ buffers/cache: 766M 7.1G Swap: 2.0G 0B 2.0GAre you seeing some inconsistencies when you run your check?Code: Select all
./check_ncpa.py -H x.x.x.x -t mytoken' -M 'memory/swap' -w 50 -c 80 -u Gi OK: Used swap was 0.00 % (Total: 2.00 GiB, Used: 0.00 GiB, Free: 2.00 GiB) | 'total'=2.00GiB;1;2; 'used'=0.00GiB;1;2; 'free'=2.00GiB;1;2;
So only the windows servers are not accurate with this command.
Re: NCPA memory/swap - Why does it monitor Memory + Swap?
NCPA uses values, obtained from psutls. There are probably differences on how the swap memory is calculated on Windows vs Linux machines. Here's the psutil documentation on memory checks:
https://psutil.readthedocs.io/en/latest/#memory
https://psutil.readthedocs.io/en/latest/#memory
Be sure to check out our Knowledgebase for helpful articles and solutions!