Simple/plugins/copy-message.pl

filter: Statementstmt 100% 13 / 13 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 4 / 4 Podpod n/a totaltotal 100% 17 / 17 CC 1 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« Simple/plugins/check-prg.pl ↑ Summary
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__
« Simple/plugins/check-prg.pl ↑ Summary