Bug 512559 - check_swap returns OK, if no swap activated
Summary: check_swap returns OK, if no swap activated
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: nagios-plugins
Version: 12
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: Peter Lemenkov
QA Contact: Fedora Extras Quality Assurance
URL: http://sourceforge.net/tracker/?func=...
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2009-07-19 07:58 UTC by Jan ONDREJ
Modified: 2010-10-25 16:37 UTC (History)
5 users (show)

Fixed In Version: nagios-plugins-1.4.15-2.el4
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2010-10-15 12:39:44 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
Possible fix for this bug. (561 bytes, patch)
2009-07-19 07:58 UTC, Jan ONDREJ
no flags Details | Diff

Description Jan ONDREJ 2009-07-19 07:58:19 UTC
Created attachment 354269 [details]
Possible fix for this bug.

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

[root@kecom ~]# rpm -q nagios-plugins
nagios-plugins-1.4.13-11.fc10.i386
[root@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%.

Version-Release number of selected component (if applicable):
nagios-plugins-1.4.13-11.fc10.i386
nagios-plugins-1.4.13-14.fc11.x86_64

How reproducible:
always

Steps to Reproduce:
1. make sure, your swap is empty or it's usage is not large
2. swapoff -a
3. /usr/lib/nagios/plugins/check_swap -w 80% -c 40%
  
Actual results:
SWAP OK - 100% free (0 MB out of 0 MB) |swap=0MB;0;0;0;0

Expected results:
SWAP CRITICAL - 0% free (0 MB out of 0 MB) |swap=0MB;0;0;0;0

Additional info:
This bug was also reported on nagios-plugins bugtracker, currently without response. See URL column in this bug.

An patch, which should fix this is attached.

Comment 1 Bug Zapper 2010-04-27 15:47:01 UTC
This message is a reminder that Fedora 11 is nearing its end of life.
Approximately 30 (thirty) days from now Fedora will stop maintaining
and issuing updates for Fedora 11.  It is Fedora's policy to close all
bug reports from releases that are no longer maintained.  At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '11'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 11's end of life.

Bug Reporter: Thank you for reporting this issue and we are sorry that 
we may not be able to fix it before Fedora 11 is end of life.  If you 
would still like to see this bug fixed and are able to reproduce it 
against a later version of Fedora please change the 'version' of this 
bug to the applicable version.  If you are unable to change the version, 
please add a comment here and someone will do it for you.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events.  Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

The process we are following is described here: 
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Comment 2 Jan ONDREJ 2010-04-27 15:54:55 UTC
Same problem for F12, changing component to F12.

Comment 3 Jan ONDREJ 2010-10-05 15:12:27 UTC
Peter, can you apply also this patch with any later nagios-plugins update? Thank you.

Comment 4 Fedora Update System 2010-10-07 16:47:26 UTC
nagios-plugins-1.4.15-2.el5 has been submitted as an update for Fedora EPEL 5.
https://admin.fedoraproject.org/updates/nagios-plugins-1.4.15-2.el5

Comment 5 Fedora Update System 2010-10-07 16:47:38 UTC
nagios-plugins-1.4.15-2.fc13 has been submitted as an update for Fedora 13.
https://admin.fedoraproject.org/updates/nagios-plugins-1.4.15-2.fc13

Comment 6 Fedora Update System 2010-10-07 16:47:51 UTC
nagios-plugins-1.4.15-2.fc12 has been submitted as an update for Fedora 12.
https://admin.fedoraproject.org/updates/nagios-plugins-1.4.15-2.fc12

Comment 7 Fedora Update System 2010-10-07 16:48:02 UTC
nagios-plugins-1.4.15-2.el4 has been submitted as an update for Fedora EPEL 4.
https://admin.fedoraproject.org/updates/nagios-plugins-1.4.15-2.el4

Comment 8 Fedora Update System 2010-10-07 16:48:13 UTC
nagios-plugins-1.4.15-2.fc14 has been submitted as an update for Fedora 14.
https://admin.fedoraproject.org/updates/nagios-plugins-1.4.15-2.fc14

Comment 9 Fedora Update System 2010-10-07 19:29:08 UTC
nagios-plugins-1.4.15-2.el5 has been pushed to the Fedora EPEL 5 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update nagios-plugins'.  You can provide feedback for this update here: https://admin.fedoraproject.org/updates/nagios-plugins-1.4.15-2.el5

Comment 10 Fedora Update System 2010-10-15 12:39:34 UTC
nagios-plugins-1.4.15-2.fc14 has been pushed to the Fedora 14 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 11 Fedora Update System 2010-10-19 07:15:19 UTC
nagios-plugins-1.4.15-2.fc12 has been pushed to the Fedora 12 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 12 Fedora Update System 2010-10-19 07:20:10 UTC
nagios-plugins-1.4.15-2.fc13 has been pushed to the Fedora 13 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 13 Fedora Update System 2010-10-25 16:34:48 UTC
nagios-plugins-1.4.15-2.el5 has been pushed to the Fedora EPEL 5 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 14 Fedora Update System 2010-10-25 16:37:45 UTC
nagios-plugins-1.4.15-2.el4 has been pushed to the Fedora EPEL 4 stable repository.  If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.