[nagios-plugins] check_swap: returns OK, if no swap activated (#1193)
waja <notifications-9UaJU3cA/F/[email protected]> Tue, 01 Oct 2013 06:35:27 -0700
| Newsgroups | gmane.network.nagios.plugins.devel |
|---|---|
| Message-ID | <nagios-plugins/nagios-plugins/pull/[email protected]> |
--===============2621162802576902653==
Content-Type: multipart/alternative;
boundary="--==_mimepart_524acf9f4caea_5dbf583d38708c";
charset=UTF-8
Content-Transfer-Encoding: 7bit
----==_mimepart_524acf9f4caea_5dbf583d38708c
Content-Type: text/plain;
charset=UTF-8
Content-Transfer-Encoding: 7bit
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%.
--
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
----==_mimepart_524acf9f4caea_5dbf583d38708c
Content-Type: text/html;
charset=UTF-8
Content-Transfer-Encoding: 7bit
<p>My swap was not activated on boot for unknown reason and nagios does not<br>
report this as a problem. Here is an example:</p>
<p>[root@kecom ~]# rpm -q nagios-plugins<br>
nagios-plugins-1.4.13-11.fc10.i386<br>
[root@kecom ~]# /usr/lib/nagios/plugins/check_swap -w 80% -c 40% -c 1 -w 2<br>
SWAP CRITICAL - 100% free (0 MB out of 0 MB) |swap=0MB;0;0;0;0</p>
<p>If there is no swap and users is trying to test percentage of free swap,<br>
consider 0 MB free swap space as problem, or of free/total raises division</p>
<h2>by zero, then set percentage to 0%, not to 100%.</h2>
<p>Just turning attached patch of github issue <a href="https://github.com/nagios-plugins/nagios-plugins/issues/896" class="issue-link" title="check_swap returns OK, if no swap activated [sf#2823005]">#896</a> into a push request.<br>
(Closes <a href="https://github.com/nagios-plugins/nagios-plugins/issues/896" class="issue-link" title="check_swap returns OK, if no swap activated [sf#2823005]">#896</a>)</p>
<hr>
<h4>You can merge this Pull Request by running</h4>
<pre> git pull https://github.com/waja/nagios-plugins github896</pre>
<p>Or view, comment on, or merge it at:</p>
<p> <a href='https://github.com/nagios-plugins/nagios-plugins/pull/1193'>https://github.com/nagios-plugins/nagios-plugins/pull/1193</a></p>
<h4>Commit Summary</h4>
<ul>
<li>check_swap: returns OK, if no swap activated</li>
</ul>
<h4>File Changes</h4>
<ul>
<li>
<strong>M</strong>
<a href="https://github.com/nagios-plugins/nagios-plugins/pull/1193/files#diff-0">THANKS.in</a>
(1)
</li>
<li>
<strong>M</strong>
<a href="https://github.com/nagios-plugins/nagios-plugins/pull/1193/files#diff-1">plugins/check_swap.c</a>
(2)
</li>
</ul>
<h4>Patch Links:</h4>
<ul>
<li><a href='https://github.com/nagios-plugins/nagios-plugins/pull/1193.patch'>https://github.com/nagios-plugins/nagios-plugins/pull/1193.patch</a></li>
<li><a href='https://github.com/nagios-plugins/nagios-plugins/pull/1193.diff'>https://github.com/nagios-plugins/nagios-plugins/pull/1193.diff</a></li>
</ul>
----==_mimepart_524acf9f4caea_5dbf583d38708c--
--===============2621162802576902653==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60134791&iu=/4140/ostg.clktrk
--===============2621162802576902653==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
_______________________________________________________
Nagios Plugin Development Mailing List Nagiosplug-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
Unsubscribe at https://lists.sourceforge.net/lists/listinfo/nagiosplug-devel
::: Please include plugins version (-v) and OS when reporting any issue.
::: Messages without supporting info will risk being sent to /dev/null
--===============2621162802576902653==--