diff options
author | Nathan Vonnahme <n8v@users.sourceforge.net> | 2006-09-07 00:53:51 +0000 |
---|---|---|
committer | Nathan Vonnahme <n8v@users.sourceforge.net> | 2006-09-07 00:53:51 +0000 |
commit | bc239b3bd5023ed2da77ab03c581e56a4772f1d4 (patch) | |
tree | 655747da3db99a6e8ed0aab03f3036827c221748 /lib/Nagios/Plugin.pm | |
parent | 31336ec620bec84d5d4db1ba69deac2157611c12 (diff) | |
download | monitoring-plugin-perl-bc239b3bd5023ed2da77ab03c581e56a4772f1d4.tar.gz |
adding example script and test for it, and fixing POD according to warnings from POD::Checker
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/Nagios-Plugin/trunk@1476 f882894a-f735-0410-b71e-b25c423dba1c
Diffstat (limited to 'lib/Nagios/Plugin.pm')
-rw-r--r-- | lib/Nagios/Plugin.pm | 26 |
1 files changed, 22 insertions, 4 deletions
diff --git a/lib/Nagios/Plugin.pm b/lib/Nagios/Plugin.pm index c14dfa6..0915571 100644 --- a/lib/Nagios/Plugin.pm +++ b/lib/Nagios/Plugin.pm | |||
@@ -86,6 +86,12 @@ This is the place for common routines when writing Nagios plugins. The idea is t | |||
86 | easy as possible for developers to conform to the plugin guidelines | 86 | easy as possible for developers to conform to the plugin guidelines |
87 | (http://nagiosplug.sourceforge.net/developer-guidelines.html). | 87 | (http://nagiosplug.sourceforge.net/developer-guidelines.html). |
88 | 88 | ||
89 | =head1 EXAMPLE SCRIPT | ||
90 | |||
91 | "Enough talk! Show me where to start!" | ||
92 | |||
93 | See the file 'check_stuff.pl' in the 't' directory for a complete working example of a plugin script. | ||
94 | |||
89 | =head1 DESIGN | 95 | =head1 DESIGN |
90 | 96 | ||
91 | To facilitate object oriented classes, there are multiple perl modules, each reflecting a type of data | 97 | To facilitate object oriented classes, there are multiple perl modules, each reflecting a type of data |
@@ -105,22 +111,30 @@ Only methods listed in the documentation for each module is public. | |||
105 | These modules are experimental and so the interfaces may change up until Nagios::Plugin | 111 | These modules are experimental and so the interfaces may change up until Nagios::Plugin |
106 | hits version 1.0, but every attempt will be made to make backwards compatible. | 112 | hits version 1.0, but every attempt will be made to make backwards compatible. |
107 | 113 | ||
108 | =over 4 | ||
109 | |||
110 | =head1 STARTING | 114 | =head1 STARTING |
111 | 115 | ||
116 | =over 4 | ||
117 | |||
112 | =item use Nagios::Plugin qw(%ERRORS) | 118 | =item use Nagios::Plugin qw(%ERRORS) |
113 | 119 | ||
114 | Imports the %ERRORS hash. This is currently the only symbol that can be imported. | 120 | Imports the %ERRORS hash. This is currently the only symbol that can be imported. |
115 | 121 | ||
122 | =back | ||
123 | |||
116 | =head1 CLASS METHODS | 124 | =head1 CLASS METHODS |
117 | 125 | ||
126 | =over 4 | ||
127 | |||
118 | =item Nagios::Plugin->new( shortname => $$ ) | 128 | =item Nagios::Plugin->new( shortname => $$ ) |
119 | 129 | ||
120 | Initializes a new Nagios::Plugin object. Can specify the shortname here. | 130 | Initializes a new Nagios::Plugin object. Can specify the shortname here. |
121 | 131 | ||
132 | =back | ||
133 | |||
122 | =head1 OBJECT METHODS | 134 | =head1 OBJECT METHODS |
123 | 135 | ||
136 | =over 4 | ||
137 | |||
124 | =item set_thresholds( warning => "10:25", critical => "~:25" ) | 138 | =item set_thresholds( warning => "10:25", critical => "~:25" ) |
125 | 139 | ||
126 | Sets the thresholds, based on the range specification at | 140 | Sets the thresholds, based on the range specification at |
@@ -147,9 +161,13 @@ http://nagiosplug.sourceforge.net | |||
147 | 161 | ||
148 | =head1 AUTHOR | 162 | =head1 AUTHOR |
149 | 163 | ||
150 | Ton Voon, E<lt>ton.voon@altinity.comE<gt> | 164 | Maintained by the Nagios Plugin development team - http://nagiosplug.sourceforge.net |
165 | |||
166 | Originally by Ton Voon, E<lt>ton.voon@altinity.comE<gt> | ||
167 | |||
168 | Nathan Vonnahme added extra tests and subsequent fixes. | ||
151 | 169 | ||
152 | Thanks to Nathan Vonnahme for loads of extra tests and subsequent fixes. | 170 | Gavin Carr contributed the Nagios::Plugin::GetOpt module. |
153 | 171 | ||
154 | =head1 COPYRIGHT AND LICENSE | 172 | =head1 COPYRIGHT AND LICENSE |
155 | 173 | ||