| 1 | #!/usr/bin/env perl | ||
| 2 | # | ||
| 3 | # Testing plugin. It exits with the exit code given in ARGV[0] with | ||
| 4 | # the message given in ARGV[1]. | ||
| 5 | # | ||
| 6 | # Usage: copy-message.pl <exit-code> <message> | ||
| 7 | # | ||
| 8 | # The return code and STDOUT are compatible with the Nagios plugins | ||
| 9 | # (see: http://nagios.sourceforge.net/docs/3_0/quickstart.html) | ||
| 10 | # | ||
| 11 | # September 2011 | ||
| 12 | # Author: Martin Senger <martin.senger@gmail.com> | ||
| 13 | #----------------------------------------------------------------- | ||
| 14 | |||
| 15 | 12 | ▶ | use warnings; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 16 | 12 | ▶ | use strict; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 17 | |||
| 18 | 12 | ▶ | use Monitor::Simple; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 19 | #use Log::Log4perl qw(:easy); | ||
| 20 | 12 | ▶ | use constant { MY_ID => 'copy-message' }; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 21 | |||
| 22 | 12 | Monitor::Simple::Utils->report_and_exit (MY_ID, undef, $ARGV[0], $ARGV[1]); | |
| 23 | |||
| 24 | __END__ | ||