plugins/nagios/templates/check_template-nagios.pl

filter: Statementstmt 94.1% 16 / 17 Branchbran 50.0% 1 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 5 / 5 Podpod n/a totaltotal 91.6% 22 / 24 CC 2 SCAR 4.1
CC
2
Cov
89%
BEGIN
2.5
BEGIN
1.0
BEGIN
1.0
CRAP 1.5
« plugins/templates/check_dummy.pl ↑ Summary plugins/templates/check_template.pl »
1 #!/usr/bin/env perl
2 # ----------------------------------------------------------------------------------------------------------
3 # © Copyright 2003-2011 by Alex Peeters [alex.peeters@citap.be]
4 # ----------------------------------------------------------------------------------------------------------
5 # 2011/mm/dd, v3.002.003, check_template-nagios.pl
6 # ----------------------------------------------------------------------------------------------------------
7  
8 3 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
9 3 ▶use warnings; # Must be used in test mode only. This reduces a little process speed
Subroutine BEGIN: called CC=1 SCAR=0.0
10 #use diagnostics; # Must be used in test mode only. This reduces a lot of process speed
11  
12 # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
13  
14 0 ▶BEGIN { if ( $ENV{ASNMTAP_PERL5LIB} ) { eval 'use lib ( "$ENV{ASNMTAP_PERL5LIB}" )'; } }
Subroutine BEGIN: called CC=2 SCAR=9.2
Branch: 1 branch
BranchTrueFalseTotal
if ($ENV{"ASNMTAP_PERL5LIB"}) 0 3 3
15  
16 # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
17  
18 3 ▶use ASNMTAP::Asnmtap::Plugins::Nagios v3.002.003;
Subroutine BEGIN: called CC=1 SCAR=0.0
19 3 ▶use ASNMTAP::Asnmtap::Plugins::Nagios qw(:NAGIOS);
Subroutine BEGIN: called CC=1 SCAR=0.0
20  
21 # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
22  
23 3 my $objectNagios = ASNMTAP::Asnmtap::Plugins::Nagios->new (
24 _programName => 'check_template-nagios.pl',
25 _programDescription => 'General Nagios Template',
26 _programVersion => '3.002.003',
27 _timeout => 30,
28 _debug => 0);
29  
30 # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
31  
32 1 $objectNagios->pluginValues ( { stateValue => $ERRORS{OK}, alert => 'OKIDO' }, $TYPE{APPEND} );
33 1 $objectNagios->exit (7);
34  
35 # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
36  
37 __END__
« plugins/templates/check_dummy.pl ↑ Summary plugins/templates/check_template.pl »