diff options
| author | Sven Nierlein <sven@nierlein.de> | 2014-01-20 14:49:14 +0100 |
|---|---|---|
| committer | Sven Nierlein <sven@nierlein.de> | 2014-01-20 14:49:14 +0100 |
| commit | dfae38b656242898ce962c9ad93ed66be45fc3d4 (patch) | |
| tree | d781a2ff90888c08379ebcd45f8ec51dda324882 /lib | |
| parent | b418181dfe80dd75169b6e8a619ac1932155dea2 (diff) | |
| download | monitoring-plugin-perl-dfae38b656242898ce962c9ad93ed66be45fc3d4.tar.gz | |
keep the old name in copyright for more transparencyv0.37
Signed-off-by: Sven Nierlein <sven@nierlein.de>
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/Monitoring/Plugin.pm | 5 | ||||
| -rw-r--r-- | lib/Monitoring/Plugin/Config.pm | 10 | ||||
| -rw-r--r-- | lib/Monitoring/Plugin/ExitResult.pm | 9 | ||||
| -rw-r--r-- | lib/Monitoring/Plugin/Functions.pm | 9 | ||||
| -rw-r--r-- | lib/Monitoring/Plugin/Getopt.pm | 12 | ||||
| -rw-r--r-- | lib/Monitoring/Plugin/Performance.pm | 4 | ||||
| -rw-r--r-- | lib/Monitoring/Plugin/Range.pm | 4 | ||||
| -rw-r--r-- | lib/Monitoring/Plugin/Threshold.pm | 4 |
8 files changed, 36 insertions, 21 deletions
diff --git a/lib/Monitoring/Plugin.pm b/lib/Monitoring/Plugin.pm index f9eb49e..a5b51b1 100644 --- a/lib/Monitoring/Plugin.pm +++ b/lib/Monitoring/Plugin.pm | |||
| @@ -1,9 +1,9 @@ | |||
| 1 | |||
| 2 | package Monitoring::Plugin; | 1 | package Monitoring::Plugin; |
| 3 | 2 | ||
| 4 | use Monitoring::Plugin::Functions qw(:codes %ERRORS %STATUS_TEXT @STATUS_CODES); | 3 | use Monitoring::Plugin::Functions qw(:codes %ERRORS %STATUS_TEXT @STATUS_CODES); |
| 5 | use Params::Validate qw(:all); | 4 | use Params::Validate qw(:all); |
| 6 | 5 | ||
| 6 | use 5.006; | ||
| 7 | use strict; | 7 | use strict; |
| 8 | use warnings; | 8 | use warnings; |
| 9 | 9 | ||
| @@ -703,7 +703,8 @@ Originally by Ton Voon, E<lt>ton.voon@altinity.comE<gt>. | |||
| 703 | 703 | ||
| 704 | =head1 COPYRIGHT AND LICENSE | 704 | =head1 COPYRIGHT AND LICENSE |
| 705 | 705 | ||
| 706 | Copyright (C) 2006-2014 by Monitoring Plugin Team | 706 | Copyright (C) 2014 by Monitoring Plugin Team |
| 707 | Copyright (C) 2006-2014 by Nagios Plugin Development Team | ||
| 707 | 708 | ||
| 708 | This library is free software; you can redistribute it and/or modify it | 709 | This library is free software; you can redistribute it and/or modify it |
| 709 | under the same terms as Perl itself, either Perl version 5.8.4 or, at your | 710 | under the same terms as Perl itself, either Perl version 5.8.4 or, at your |
diff --git a/lib/Monitoring/Plugin/Config.pm b/lib/Monitoring/Plugin/Config.pm index 5e941d4..fe2b654 100644 --- a/lib/Monitoring/Plugin/Config.pm +++ b/lib/Monitoring/Plugin/Config.pm | |||
| @@ -1,6 +1,9 @@ | |||
| 1 | package Monitoring::Plugin::Config; | 1 | package Monitoring::Plugin::Config; |
| 2 | 2 | ||
| 3 | use 5.006; | ||
| 3 | use strict; | 4 | use strict; |
| 5 | use warnings; | ||
| 6 | |||
| 4 | use Carp; | 7 | use Carp; |
| 5 | use File::Spec; | 8 | use File::Spec; |
| 6 | use base qw(Config::Tiny); | 9 | use base qw(Config::Tiny); |
| @@ -93,10 +96,12 @@ sub read_string | |||
| 93 | sub write { croak "Write access not permitted" } | 96 | sub write { croak "Write access not permitted" } |
| 94 | 97 | ||
| 95 | # Return last file used by read(); | 98 | # Return last file used by read(); |
| 96 | sub np_getfile { return $CURRENT_FILE; } | 99 | sub mp_getfile { return $CURRENT_FILE; } |
| 97 | 100 | ||
| 98 | 1; | 101 | 1; |
| 99 | 102 | ||
| 103 | __END__ | ||
| 104 | |||
| 100 | =head1 NAME | 105 | =head1 NAME |
| 101 | 106 | ||
| 102 | Monitoring::Plugin::Config - read nagios plugin .ini style config files | 107 | Monitoring::Plugin::Config - read nagios plugin .ini style config files |
| @@ -169,7 +174,8 @@ https://monitoring-plugins.org | |||
| 169 | 174 | ||
| 170 | =head1 COPYRIGHT AND LICENSE | 175 | =head1 COPYRIGHT AND LICENSE |
| 171 | 176 | ||
| 172 | Copyright (C) 2006-2014 Monitoring Plugin Development Team | 177 | Copyright (C) 2014 by Monitoring Plugin Team |
| 178 | Copyright (C) 2006-2014 by Nagios Plugin Development Team | ||
| 173 | 179 | ||
| 174 | This library is free software; you can redistribute it and/or modify | 180 | This library is free software; you can redistribute it and/or modify |
| 175 | it under the same terms as Perl itself. | 181 | it under the same terms as Perl itself. |
diff --git a/lib/Monitoring/Plugin/ExitResult.pm b/lib/Monitoring/Plugin/ExitResult.pm index aa9f5da..ab79a19 100644 --- a/lib/Monitoring/Plugin/ExitResult.pm +++ b/lib/Monitoring/Plugin/ExitResult.pm | |||
| @@ -1,8 +1,10 @@ | |||
| 1 | # Tiny helper class to return both output and return_code when testing | ||
| 2 | |||
| 3 | package Monitoring::Plugin::ExitResult; | 1 | package Monitoring::Plugin::ExitResult; |
| 4 | 2 | ||
| 3 | # Tiny helper class to return both output and return_code when testing | ||
| 4 | |||
| 5 | use 5.006; | ||
| 5 | use strict; | 6 | use strict; |
| 7 | use warnings; | ||
| 6 | 8 | ||
| 7 | # Stringify to message | 9 | # Stringify to message |
| 8 | use overload '""' => sub { shift->{message} }; | 10 | use overload '""' => sub { shift->{message} }; |
| @@ -63,7 +65,8 @@ Originally: | |||
| 63 | 65 | ||
| 64 | =head1 COPYRIGHT AND LICENSE | 66 | =head1 COPYRIGHT AND LICENSE |
| 65 | 67 | ||
| 66 | Copyright (C) 2006-2014 Monitoring Plugin Development Team | 68 | Copyright (C) 2014 by Monitoring Plugin Team |
| 69 | Copyright (C) 2006-2014 by Nagios Plugin Development Team | ||
| 67 | 70 | ||
| 68 | This library is free software; you can redistribute it and/or modify | 71 | This library is free software; you can redistribute it and/or modify |
| 69 | it under the same terms as Perl itself. | 72 | it under the same terms as Perl itself. |
diff --git a/lib/Monitoring/Plugin/Functions.pm b/lib/Monitoring/Plugin/Functions.pm index d2856e8..d362f9c 100644 --- a/lib/Monitoring/Plugin/Functions.pm +++ b/lib/Monitoring/Plugin/Functions.pm | |||
| @@ -1,12 +1,12 @@ | |||
| 1 | package Monitoring::Plugin::Functions; | ||
| 2 | |||
| 1 | # Functional interface to basic Monitoring::Plugin constants, exports, | 3 | # Functional interface to basic Monitoring::Plugin constants, exports, |
| 2 | # and functions | 4 | # and functions |
| 3 | 5 | ||
| 4 | package Monitoring::Plugin::Functions; | ||
| 5 | |||
| 6 | use 5.006; | 6 | use 5.006; |
| 7 | |||
| 8 | use strict; | 7 | use strict; |
| 9 | use warnings; | 8 | use warnings; |
| 9 | |||
| 10 | use File::Basename; | 10 | use File::Basename; |
| 11 | use Params::Validate qw(:types validate); | 11 | use Params::Validate qw(:types validate); |
| 12 | use Math::Calc::Units; | 12 | use Math::Calc::Units; |
| @@ -437,7 +437,8 @@ https://monitoring-plugins.org | |||
| 437 | 437 | ||
| 438 | =head1 COPYRIGHT AND LICENSE | 438 | =head1 COPYRIGHT AND LICENSE |
| 439 | 439 | ||
| 440 | Copyright (C) 2006-2014 Monitoring Plugin Development Team | 440 | Copyright (C) 2014 by Monitoring Plugin Team |
| 441 | Copyright (C) 2006-2014 by Nagios Plugin Development Team | ||
| 441 | 442 | ||
| 442 | This library is free software; you can redistribute it and/or modify | 443 | This library is free software; you can redistribute it and/or modify |
| 443 | it under the same terms as Perl itself. | 444 | it under the same terms as Perl itself. |
diff --git a/lib/Monitoring/Plugin/Getopt.pm b/lib/Monitoring/Plugin/Getopt.pm index ce1c0f9..ebdd559 100644 --- a/lib/Monitoring/Plugin/Getopt.pm +++ b/lib/Monitoring/Plugin/Getopt.pm | |||
| @@ -1,11 +1,14 @@ | |||
| 1 | package Monitoring::Plugin::Getopt; | ||
| 2 | |||
| 1 | # | 3 | # |
| 2 | # Monitoring::Plugin::Getopt - OO perl module providing standardised argument | 4 | # Monitoring::Plugin::Getopt - OO perl module providing standardised argument |
| 3 | # processing for nagios plugins | 5 | # processing for nagios plugins |
| 4 | # | 6 | # |
| 5 | 7 | ||
| 6 | package Monitoring::Plugin::Getopt; | 8 | use 5.006; |
| 7 | |||
| 8 | use strict; | 9 | use strict; |
| 10 | use warnings; | ||
| 11 | |||
| 9 | use File::Basename; | 12 | use File::Basename; |
| 10 | use Getopt::Long qw(:config no_ignore_case bundling); | 13 | use Getopt::Long qw(:config no_ignore_case bundling); |
| 11 | use Carp; | 14 | use Carp; |
| @@ -249,7 +252,7 @@ sub _load_config_section | |||
| 249 | # TODO: is this check sane? Does --extra-opts=foo require a [foo] section? | 252 | # TODO: is this check sane? Does --extra-opts=foo require a [foo] section? |
| 250 | ## Nevertheless, if we die as UNKNOWN here we should do the same on default | 253 | ## Nevertheless, if we die as UNKNOWN here we should do the same on default |
| 251 | ## file *added eval/_die above*. | 254 | ## file *added eval/_die above*. |
| 252 | $file ||= $Config->np_getfile(); | 255 | $file ||= $Config->mp_getfile(); |
| 253 | $self->_die("Invalid section '$section' in config file '$file'") | 256 | $self->_die("Invalid section '$section' in config file '$file'") |
| 254 | unless exists $Config->{$section}; | 257 | unless exists $Config->{$section}; |
| 255 | 258 | ||
| @@ -861,7 +864,8 @@ Originally: | |||
| 861 | 864 | ||
| 862 | =head1 COPYRIGHT AND LICENSE | 865 | =head1 COPYRIGHT AND LICENSE |
| 863 | 866 | ||
| 864 | Copyright (C) 2006-2014 Monitoring Plugin Development Team | 867 | Copyright (C) 2014 by Monitoring Plugin Team |
| 868 | Copyright (C) 2006-2014 by Nagios Plugin Development Team | ||
| 865 | 869 | ||
| 866 | This library is free software; you can redistribute it and/or modify | 870 | This library is free software; you can redistribute it and/or modify |
| 867 | it under the same terms as Perl itself. | 871 | it under the same terms as Perl itself. |
diff --git a/lib/Monitoring/Plugin/Performance.pm b/lib/Monitoring/Plugin/Performance.pm index 90fc9f4..f1e7a16 100644 --- a/lib/Monitoring/Plugin/Performance.pm +++ b/lib/Monitoring/Plugin/Performance.pm | |||
| @@ -1,7 +1,6 @@ | |||
| 1 | package Monitoring::Plugin::Performance; | 1 | package Monitoring::Plugin::Performance; |
| 2 | 2 | ||
| 3 | use 5.006; | 3 | use 5.006; |
| 4 | |||
| 5 | use strict; | 4 | use strict; |
| 6 | use warnings; | 5 | use warnings; |
| 7 | 6 | ||
| @@ -286,7 +285,8 @@ https://monitoring-plugins.org | |||
| 286 | 285 | ||
| 287 | =head1 COPYRIGHT AND LICENSE | 286 | =head1 COPYRIGHT AND LICENSE |
| 288 | 287 | ||
| 289 | Copyright (C) 2006-2014 Monitoring Plugin Development Team | 288 | Copyright (C) 2014 by Monitoring Plugin Team |
| 289 | Copyright (C) 2006-2014 by Nagios Plugin Development Team | ||
| 290 | 290 | ||
| 291 | This library is free software; you can redistribute it and/or modify | 291 | This library is free software; you can redistribute it and/or modify |
| 292 | it under the same terms as Perl itself. | 292 | it under the same terms as Perl itself. |
diff --git a/lib/Monitoring/Plugin/Range.pm b/lib/Monitoring/Plugin/Range.pm index af19577..4cacfd4 100644 --- a/lib/Monitoring/Plugin/Range.pm +++ b/lib/Monitoring/Plugin/Range.pm | |||
| @@ -1,7 +1,6 @@ | |||
| 1 | package Monitoring::Plugin::Range; | 1 | package Monitoring::Plugin::Range; |
| 2 | 2 | ||
| 3 | use 5.006; | 3 | use 5.006; |
| 4 | |||
| 5 | use strict; | 4 | use strict; |
| 6 | use warnings; | 5 | use warnings; |
| 7 | 6 | ||
| @@ -161,7 +160,8 @@ https://monitoring-plugins.org | |||
| 161 | 160 | ||
| 162 | =head1 COPYRIGHT AND LICENSE | 161 | =head1 COPYRIGHT AND LICENSE |
| 163 | 162 | ||
| 164 | Copyright (C) 2006-2014 Monitoring Plugin Development Team | 163 | Copyright (C) 2014 by Monitoring Plugin Team |
| 164 | Copyright (C) 2006-2014 by Nagios Plugin Development Team | ||
| 165 | 165 | ||
| 166 | This library is free software; you can redistribute it and/or modify | 166 | This library is free software; you can redistribute it and/or modify |
| 167 | it under the same terms as Perl itself. | 167 | it under the same terms as Perl itself. |
diff --git a/lib/Monitoring/Plugin/Threshold.pm b/lib/Monitoring/Plugin/Threshold.pm index e71e21b..06dbf0c 100644 --- a/lib/Monitoring/Plugin/Threshold.pm +++ b/lib/Monitoring/Plugin/Threshold.pm | |||
| @@ -1,7 +1,6 @@ | |||
| 1 | package Monitoring::Plugin::Threshold; | 1 | package Monitoring::Plugin::Threshold; |
| 2 | 2 | ||
| 3 | use 5.006; | 3 | use 5.006; |
| 4 | |||
| 5 | use strict; | 4 | use strict; |
| 6 | use warnings; | 5 | use warnings; |
| 7 | 6 | ||
| @@ -126,7 +125,8 @@ https://monitoring-plugins.org | |||
| 126 | 125 | ||
| 127 | =head1 COPYRIGHT AND LICENSE | 126 | =head1 COPYRIGHT AND LICENSE |
| 128 | 127 | ||
| 129 | Copyright (C) 2006-2014 Monitoring Plugin Development Team | 128 | Copyright (C) 2014 by Monitoring Plugin Team |
| 129 | Copyright (C) 2006-2014 by Nagios Plugin Development Team | ||
| 130 | 130 | ||
| 131 | This library is free software; you can redistribute it and/or modify | 131 | This library is free software; you can redistribute it and/or modify |
| 132 | it under the same terms as Perl itself. | 132 | it under the same terms as Perl itself. |
