[Pkg-nagios-changes] [pkg-nagios-plugins-contrib] 05/08: check_memory: Update to version 1.0.1
Jan Wagner
waja at moszumanska.debian.org
Sun Mar 30 20:53:45 UTC 2014
This is an automated email from the git hooks/post-receive script.
waja pushed a commit to branch master
in repository pkg-nagios-plugins-contrib.
commit 18a708fb03b4e7aaa8ac942e915815ad74a9d1ec
Author: Jan Wagner <waja at cyconet.org>
Date: Sun Mar 30 21:24:08 2014 +0200
check_memory: Update to version 1.0.1
---
check_memory/check_memory | 13 ++++++-------
check_memory/control | 2 +-
2 files changed, 7 insertions(+), 8 deletions(-)
diff --git a/check_memory/check_memory b/check_memory/check_memory
index 092fcb2..bf46711 100644
--- a/check_memory/check_memory
+++ b/check_memory/check_memory
@@ -26,7 +26,7 @@ use vars qw($PROGNAME $VERSION $FREECMD $UNIT);
use Nagios::Plugin;
$PROGNAME = "check_memory";
-$VERSION = '1.0';
+$VERSION = '1.0.1';
$FREECMD = '/usr/bin/free';
$UNIT = 'M';
@@ -35,15 +35,14 @@ my $np = Nagios::Plugin->new(
. ' [ -u <unit> ]',
version => $VERSION,
plugin => $PROGNAME,
- shortname => uc($PROGNAME),
blurb => 'Check free(1) data against given tresholds',
timeout => 30,
);
$np->add_arg(
spec => 'warning|w=s',
- help => "-w, --warning=THRESHOLD\n"
- . " Warning threshold (in *bytes*) for free memory. See\n"
+ help => "-w, --warning=THRESHOLD[%]\n"
+ . " Warning threshold (in bytes or percent) for free memory. See\n"
. " http://nagiosplug.sourceforge.net/developer-guidelines.html#THRESHOLDFORMAT\n"
. " for the threshold format. Alternatively this can be defined as a percentage\n"
. ' of minimum free memory (warning and critical must be in the same format).',
@@ -52,8 +51,8 @@ $np->add_arg(
$np->add_arg(
spec => 'critical|c=s',
- help => "-c, --critical=THRESHOLD\n"
- . " Critical threshold (in *bytes*) for free memory. See\n"
+ help => "-c, --critical=THRESHOLD[%]\n"
+ . " Critical threshold (in bytes or percent) for free memory. See\n"
. " http://nagiosplug.sourceforge.net/developer-guidelines.html#THRESHOLDFORMAT\n"
. " for the threshold format. Alternatively this can be defined as a percentage\n"
. ' of minimum free memory (warning and critical must be in the same format).',
@@ -99,7 +98,7 @@ $np->set_thresholds(
# Better safe than sorry
alarm $np->opts->timeout;
-# We always get bytes, then calculate units ourselves (Who knows... what if $FREECMD is on an offline device)
+# We always get bytes, then calculate units ourselves
warn("Running: '$FREECMD -b'\n") if ($verbose);
open(RESULT, "$FREECMD -b |")
or $np->nagios_exit('CRITICAL', "Could not run $FREECMD");
diff --git a/check_memory/control b/check_memory/control
index 9647b23..e13d579 100644
--- a/check_memory/control
+++ b/check_memory/control
@@ -6,4 +6,4 @@ Description: plugin to check for free memory
on some system with very stable memory usage it is perfectly
normal for system cache to fill in all available memory.
Recommends: libnagios-plugin-perl (>= 0.31)
-Version: 1.0
+Version: 1.0.1
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-nagios/pkg-nagios-plugins-contrib
More information about the Pkg-nagios-changes
mailing list