[Nagiosplug-devel] [nagios-plugins] check_swap: returns OK, if no swap activated (#1193)

waja notifications at github.com
Tue Oct 1 15:35:27 CEST 2013


My swap was not activated on boot for unknown reason and nagios does not
report this as a problem. Here is an example:

[root at kecom ~]# rpm -q nagios-plugins
nagios-plugins-1.4.13-11.fc10.i386
[root at kecom ~]# /usr/lib/nagios/plugins/check_swap -w 80% -c 40% -c 1 -w 2
SWAP CRITICAL - 100% free (0 MB out of 0 MB) |swap=0MB;0;0;0;0

If there is no swap and users is trying to test percentage of free swap,
consider 0 MB free swap space as problem, or of free/total raises division
by zero, then set percentage to 0%, not to 100%.
--
Just turning attached patch of github issue #896 into a push request.
(Closes #896)
You can merge this Pull Request by running:

  git pull https://github.com/waja/nagios-plugins github896

Or you can view, comment on it, or merge it online at:

  https://github.com/nagios-plugins/nagios-plugins/pull/1193

-- Commit Summary --

  * check_swap: returns OK, if no swap activated

-- File Changes --

    M THANKS.in (1)
    M plugins/check_swap.c (2)

-- Patch Links --

https://github.com/nagios-plugins/nagios-plugins/pull/1193.patch
https://github.com/nagios-plugins/nagios-plugins/pull/1193.diff
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://nagios-plugins.org/archive/devel/attachments/20131001/e67720c8/attachment.html>


More information about the Devel mailing list