swap usage

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
srikanth.kallu
Posts: 243
Joined: Thu Jul 26, 2012 10:48 am

swap usage

Post by srikanth.kallu »

Hi,

I am trying to set alerts for swap usage.

I want alrets if 10 % is utilisaed as warning and 20% utilised as critical.

Now how do i set this ?

1. check_nrpe!check_swap!-a '-w 10 -c 20'

or

2. check_nrpe!check_swap!-a '-w 90 -c 80'

Thanks in advance.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: swap usage

Post by scottwilkerson »

check_nrpe!check_swap!-a '-w 90% -c 80%'
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
srikanth.kallu
Posts: 243
Joined: Thu Jul 26, 2012 10:48 am

Re: swap usage

Post by srikanth.kallu »

i set the alert like this check_nrpe!check_swap!-a '-w 90% -c 80%' (First attachment)

But it still says Ok ( Second attachment )


Please correct me i dont understand my mistake.
You do not have the required permissions to view the files attached to this post.
srikanth.kallu
Posts: 243
Joined: Thu Jul 26, 2012 10:48 am

bug in checking swwap usage

Post by srikanth.kallu »

Hi,

I think there is a bug in checking swap usage.

I have checked this on two of my servers AIX and LINUX

check_nrpe!check_swap!-a '-w 2 -c 1'

or check_nrpe!check_swap!-a '-w 100 -c 99'

but says status os Ok even if it is

SWAP OK - 81% free (820 MB out of 1023 MB)
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: swap usage

Post by lmiltchev »

We are looking into this issue as we speak. We will do some testing and get back to you as soon as we determine what is causing it.
Be sure to check out our Knowledgebase for helpful articles and solutions!
sreinhardt
-fno-stack-protector
Posts: 4366
Joined: Mon Nov 19, 2012 12:10 pm

Re: swap usage

Post by sreinhardt »

This is not a bug, without adding % after each value, it is actually looking at bytes free not percentage. Please change your command to

Code: Select all

check_nrpe!check_swap!-a '-w 90% -c 80%'
Try it out and let us know. Sorry for the confusion, scottwilkerson had it all correct in the first post.
check_nrpe!check_swap!-a '-w 90% -c 80%'
Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.
Locked