From 96933fd2e1f53aff9c9ef26639fafe9a84ec754e Mon Sep 17 00:00:00 2001 From: Ton Voon Date: Fri, 4 Aug 2006 20:22:31 +0000 Subject: Lots of extra tests and subsequent fixes (Nathan Vonnahme) git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/Nagios-Plugin/trunk@1466 f882894a-f735-0410-b71e-b25c423dba1c --- lib/Nagios/Plugin.pm | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'lib/Nagios/Plugin.pm') diff --git a/lib/Nagios/Plugin.pm b/lib/Nagios/Plugin.pm index 2acc6ea..4e95e98 100644 --- a/lib/Nagios/Plugin.pm +++ b/lib/Nagios/Plugin.pm @@ -23,7 +23,7 @@ use Exporter; our @ISA = qw(Exporter Nagios::__::Plugin); our @EXPORT_OK = qw(%ERRORS); -our $VERSION = '0.12'; +our $VERSION = '0.13'; sub add_perfdata { my ($self, %args) = @_; @@ -59,7 +59,8 @@ Nagios::Plugin - Object oriented helper routines for your Nagios plugin use Nagios::Plugin qw(%ERRORS); $p = Nagios::Plugin->new( shortname => "PAGESIZE" ); - $threshold = $p->set_thresholds( warning => "10:25", critical => "25:" ); + $threshold = $p->set_thresholds( warning => "10:25", critical => "~:25" ); + # Critical if outside -INF to 25, ie > 25. Warn if outside 10-25, ie < 10 # ... collect current metric into $value if ($trouble_getting_metric) { @@ -120,7 +121,7 @@ Initializes a new Nagios::Plugin object. Can specify the shortname here. =head1 OBJECT METHODS -=item set_thresholds( warning => "10:25", critical => "25:" ) +=item set_thresholds( warning => "10:25", critical => "~:25" ) Sets the thresholds, based on the range specification at http://nagiosplug.sourceforge.net/developer-guidelines.html#THRESHOLDFORMAT. @@ -148,6 +149,8 @@ http://nagiosplug.sourceforge.net Ton Voon, Eton.voon@altinity.comE +Thanks to Nathan Vonnahme for loads of extra tests and subsequent fixes. + =head1 COPYRIGHT AND LICENSE Copyright (C) 2006 by Nagios Plugin Development Team -- cgit v1.2.3-74-g34f1