[Nagiosplug-checkins] Nagios-Plugin/lib/Nagios Plugin.pm,1.3,1.4

Ton Voon tonvoon at users.sourceforge.net
Fri Aug 4 22:22:33 CEST 2006


Update of /cvsroot/nagiosplug/Nagios-Plugin/lib/Nagios
In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv10683/lib/Nagios

Modified Files:
	Plugin.pm 
Log Message:
Lots of extra tests and subsequent fixes (Nathan Vonnahme)


Index: Plugin.pm
===================================================================
RCS file: /cvsroot/nagiosplug/Nagios-Plugin/lib/Nagios/Plugin.pm,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- Plugin.pm	15 Jun 2006 08:38:18 -0000	1.3
+++ Plugin.pm	4 Aug 2006 20:22:31 -0000	1.4
@@ -23,7 +23,7 @@
 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 @@
   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 @@
 
 =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 @@
 
 Ton Voon, E<lt>ton.voon at altinity.comE<gt>
 
+Thanks to Nathan Vonnahme for loads of extra tests and subsequent fixes.
+
 =head1 COPYRIGHT AND LICENSE
 
 Copyright (C) 2006 by Nagios Plugin Development Team





More information about the Commits mailing list