vmware swap file error

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
sheetzdw
Posts: 44
Joined: Tue Feb 11, 2014 10:34 am

vmware swap file error

Post by sheetzdw »

HGB of RAMI Guys - I am new to Nagios and the first thing I need to learn is how to find what an alert is looking for...example

I get an alert VMWare swap usage -check ESX3 Critical - Swap Usage is 321.57 MB

on this VM host I have 196 GB of RAM

most of the RAM is used 100% of the time

not sure where this comes from, each machine has its own swapfile and there is room for more swap usage

any ideas ?
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: vmware swap file error

Post by slansing »

You can start by looking at the check plugin you set up for your host/service. We recommend you at least look at the full usage output of a plugin before using it so you understand what you are asking it to query. In your case, I would check to see what thresholds you have set for your swap check on that host, and also look to see what that is actually running in the plugin you chose to use. If the memory is in almost 100% usage you could very well be running into swapping issues, that is something you and your system admins should look into.
sheetzdw
Posts: 44
Joined: Tue Feb 11, 2014 10:34 am

Re: vmware swap file error

Post by sheetzdw »

does this help? not sure what this is telling

Modify checkcommand
check command name check_esx3

check command line:
$USER1$/check_esx3 -H $HOSTADDRESS$ -u $USER11$ -p $USER12$ $ARG1$


I found some info here but still not sure where the threshold is set

http://exchange.nagios.org/directory/Pl ... st/details
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: vmware swap file error

Post by tmcdonald »

Do you mean the Warning and Critical thresholds? Those should just be set in $ARG1$ by the looks of it. Something like "-w 80 -c 90".
Former Nagios employee
sheetzdw
Posts: 44
Joined: Tue Feb 11, 2014 10:34 am

Re: vmware swap file error

Post by sheetzdw »

forgive the newbie question but I dont see where the args are set...where do I set the args?
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: vmware swap file error

Post by lmiltchev »

This would be set in your service definition. Can you show us how the Swap Usage check is defined?
Be sure to check out our Knowledgebase for helpful articles and solutions!
sheetzdw
Posts: 44
Joined: Tue Feb 11, 2014 10:34 am

Re: vmware swap file error

Post by sheetzdw »

ooo I found it in advanced services

-l mem -s swap -w 90 -c 95


but what should it be? vmware shows a swap for each vm server stored on the datastore with the server vmdk so I dont see a problem...
or know where I should set the limit to..

then , correct me if I am wrong, if I change it I need to rebuild the Nagios config and copy it over correct?
so maybe

-l mem -s swap -w 900 -c 950 ???
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: vmware swap file error

Post by lmiltchev »

Just change the thresholds (-w 90 -c 95) to whatever you want them to be, and restart nagios:

Code: Select all

service nagios restart
or

Code: Select all

/etc/init.d/nagios restart
Be sure to check out our Knowledgebase for helpful articles and solutions!
sheetzdw
Posts: 44
Joined: Tue Feb 11, 2014 10:34 am

Re: vmware swap file error

Post by sheetzdw »

service nagios restart
Running configuration check... CONFIG ERROR! Restart aborted. Check your Nagios configuration.


gawd I hate Linux commands so prehistoric!
LOL

i made some changes to nagios in nconf and generated a new config

now I gotta figure out how to copy the new config file over then restart Nagios!

UGH!
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: vmware swap file error

Post by tmcdonald »

Please run the following and post the output:

/usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg
Former Nagios employee
Locked