plugins/templates/check_template-WebTransact-Perfdata.pl

filter: Statementstmt 96.0% 24 / 25 Branchbran 50.0% 1 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 6 / 6 Podpod n/a totaltotal 93.9% 31 / 33 CC 2 SCAR 3.6
CC
2
Cov
93%
BEGIN
2.5
BEGIN
1.0
BEGIN
1.0
CRAP 1.4
« plugins/templates/check_template.pl ↑ Summary plugins/templates/check_template-WebTransact-with-client-authorization.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-WebTransact-Perfdata.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 v3.002.003;
Subroutine BEGIN: called CC=1 SCAR=0.0
19 3 ▶use ASNMTAP::Asnmtap::Plugins qw(:PLUGINS);
Subroutine BEGIN: called CC=1 SCAR=0.0
20  
21 # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
22  
23 3 my $objectPlugins = ASNMTAP::Asnmtap::Plugins->new (
24 _programName => 'check_template-WebTransact-Perfdata.pl',
25 _programDescription => "WebTransact plugin template for testing the '$APPLICATION' with Performance Data",
26 _programVersion => '3.002.003',
27 _programGetOptions => ['environment|e:s', 'proxy:s', 'timeout|t:i', 'trendline|T:i'],
28 _timeout => 30,
29 _debug => 0);
30  
31 # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
32  
33 3 ▶use ASNMTAP::Asnmtap::Plugins::WebTransact;
Subroutine BEGIN: called CC=1 SCAR=0.0
34  
35 1 my @URLS = ();
36 1 my $objectWebTransact = ASNMTAP::Asnmtap::Plugins::WebTransact->new ( \$objectPlugins, \@URLS );
37  
38 # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
39 # Start plugin - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
40 # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
41  
42 1 $objectPlugins->pluginValue ( message => 'www.citap.be/www.citap.com perfdata' );
43  
44 1 @URLS = (
45 { Method => 'GET', Url => "http://www.citap.be/", Qs_var => [], Qs_fixed => [], Exp => "Consulting Internet Technology Alex Peeters", Exp_Fault => ">>>NIHIL<<<", Msg => "Consulting Internet Technology Alex Peeters", Msg_Fault => "Consulting Internet Technology Alex Peeters" },
46 { Method => 'GET', Url => "http://www.citap.be/", Qs_var => [], Qs_fixed => [], Exp => "Consulting Internet Technology Alex Peeters", Exp_Fault => ">>>NIHIL<<<", Msg => "Consulting Internet Technology Alex Peeters", Msg_Fault => "Consulting Internet Technology Alex Peeters", Perfdata_Label => "www.citap.be" },
47  
48 { Method => 'GET', Url => "http://www.citap.com/", Qs_var => [], Qs_fixed => [], Exp => "Consulting Internet Technology Alex Peeters", Exp_Fault => ">>>NIHIL<<<", Msg => "Consulting Internet Technology Alex Peeters", Msg_Fault => "Consulting Internet Technology Alex Peeters" },
49 { Method => 'GET', Url => "http://www.citap.com/", Qs_var => [], Qs_fixed => [], Exp => "Consulting Internet Technology Alex Peeters", Exp_Fault => ">>>NIHIL<<<", Msg => "Consulting Internet Technology Alex Peeters", Msg_Fault => "Consulting Internet Technology Alex Peeters", Perfdata_Label => "www.citap.com" },
50 );
51  
52 1 $objectWebTransact->check ( { } );
53  
54 # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
55 # End plugin - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
56 # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
57  
58 1 undef $objectWebTransact;
59 1 $objectPlugins->exit (7);
60  
61 # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
62  
63 __END__
« plugins/templates/check_template.pl ↑ Summary plugins/templates/check_template-WebTransact-with-client-authorization.pl »