diff options
Diffstat (limited to 'lib/Nagios/Plugin.pm')
-rw-r--r-- | lib/Nagios/Plugin.pm | 9 |
1 files changed, 6 insertions, 3 deletions
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; | |||
23 | our @ISA = qw(Exporter Nagios::__::Plugin); | 23 | our @ISA = qw(Exporter Nagios::__::Plugin); |
24 | our @EXPORT_OK = qw(%ERRORS); | 24 | our @EXPORT_OK = qw(%ERRORS); |
25 | 25 | ||
26 | our $VERSION = '0.12'; | 26 | our $VERSION = '0.13'; |
27 | 27 | ||
28 | sub add_perfdata { | 28 | sub add_perfdata { |
29 | my ($self, %args) = @_; | 29 | my ($self, %args) = @_; |
@@ -59,7 +59,8 @@ Nagios::Plugin - Object oriented helper routines for your Nagios plugin | |||
59 | use Nagios::Plugin qw(%ERRORS); | 59 | use Nagios::Plugin qw(%ERRORS); |
60 | $p = Nagios::Plugin->new( shortname => "PAGESIZE" ); | 60 | $p = Nagios::Plugin->new( shortname => "PAGESIZE" ); |
61 | 61 | ||
62 | $threshold = $p->set_thresholds( warning => "10:25", critical => "25:" ); | 62 | $threshold = $p->set_thresholds( warning => "10:25", critical => "~:25" ); |
63 | # Critical if outside -INF to 25, ie > 25. Warn if outside 10-25, ie < 10 | ||
63 | 64 | ||
64 | # ... collect current metric into $value | 65 | # ... collect current metric into $value |
65 | if ($trouble_getting_metric) { | 66 | if ($trouble_getting_metric) { |
@@ -120,7 +121,7 @@ Initializes a new Nagios::Plugin object. Can specify the shortname here. | |||
120 | 121 | ||
121 | =head1 OBJECT METHODS | 122 | =head1 OBJECT METHODS |
122 | 123 | ||
123 | =item set_thresholds( warning => "10:25", critical => "25:" ) | 124 | =item set_thresholds( warning => "10:25", critical => "~:25" ) |
124 | 125 | ||
125 | Sets the thresholds, based on the range specification at | 126 | Sets the thresholds, based on the range specification at |
126 | http://nagiosplug.sourceforge.net/developer-guidelines.html#THRESHOLDFORMAT. | 127 | http://nagiosplug.sourceforge.net/developer-guidelines.html#THRESHOLDFORMAT. |
@@ -148,6 +149,8 @@ http://nagiosplug.sourceforge.net | |||
148 | 149 | ||
149 | Ton Voon, E<lt>ton.voon@altinity.comE<gt> | 150 | Ton Voon, E<lt>ton.voon@altinity.comE<gt> |
150 | 151 | ||
152 | Thanks to Nathan Vonnahme for loads of extra tests and subsequent fixes. | ||
153 | |||
151 | =head1 COPYRIGHT AND LICENSE | 154 | =head1 COPYRIGHT AND LICENSE |
152 | 155 | ||
153 | Copyright (C) 2006 by Nagios Plugin Development Team | 156 | Copyright (C) 2006 by Nagios Plugin Development Team |