Check Swap issue

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
User avatar
BanditBBS
Posts: 2474
Joined: Tue May 31, 2011 12:57 pm
Location: Scio, OH
Contact:

Check Swap issue

Post by BanditBBS »

Anyone else monitoring OEL 7 and running into swap monitoring issue:

Code: Select all

/usr/local/nagios/libexec/check_swap -w 30% -c 20% -a
SWAP CRITICAL - 0% free (0 MB out of 0 MB) - Swap is either disabled, not present, or of zero size. |swap=0MB;0;0;0;0
but....

Code: Select all

df -Ph
Filesystem                   Size  Used Avail Use% Mounted on
/dev/mapper/vg_main-lv_root  6.0G  3.7G  2.3G  62% /
devtmpfs                     3.7G     0  3.7G   0% /dev
tmpfs                        3.7G     0  3.7G   0% /dev/shm
tmpfs                        3.7G  113M  3.6G   4% /run
tmpfs                        3.7G     0  3.7G   0% /sys/fs/cgroup
/dev/xvdb1                   497M  198M  300M  40% /boot
tmpfs                        749M     0  749M   0% /run/user/1554
tmpfs                        749M     0  749M   0% /run/user/1779
Those bottom two are the swap. How is anyone else handling this?
2 of XI5.6.14 Prod/DR/DEV - Nagios LogServer 2 Nodes
See my projects on the Exchange at BanditBBS - Also check out my Nagios stuff on my personal page at Bandit's Home and at github
User avatar
cdienger
Support Tech
Posts: 5045
Joined: Tue Feb 07, 2017 11:26 am

Re: Check Swap issue

Post by cdienger »

Hi BanditBBS,

You may need to run the swapon command for it to work. Check the output of:

cat /proc/swaps

To find swap partititions. If you see /run/user/1779 or /run/user/1554 listed you would turn them on with:

swapon /run/user/1779
swapon /run/user/1554
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Locked