« plugins/templates/check_template-IO.pl
↑ Summary
plugins/nagios/templates/check_xml-monitoring.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_xml.pl | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 6 | # ---------------------------------------------------------------------------------------------------------- | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 7 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 8 | 12 | ▶ | use strict; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 9 | 12 | ▶ | 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
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 15 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 16 | # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 17 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 18 | 12 | ▶ | use Date::Calc qw(check_date check_time); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 19 | 12 | ▶ | use Time::Local; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 20 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 21 | # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 22 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 23 | 12 | ▶ | use ASNMTAP::Asnmtap::Plugins::Nagios v3.002.003; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 24 | 12 | ▶ | use ASNMTAP::Asnmtap::Plugins::Nagios qw(:NAGIOS); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 25 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 26 | # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 27 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 28 | 12 | my $schema = "1.0"; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 29 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 30 | # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 31 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 32 | 12 | my $objectNagios = ASNMTAP::Asnmtap::Plugins::Nagios->new ( | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 33 | _programName => 'check_xml.pl', | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 34 | _programDescription => 'Check Nagios by XML', | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 35 | _programVersion => '3.002.003', | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 36 | _programUsagePrefix => '-H|--hostname <hostname> -s|--service <service> [-P|--plugin <plugin>] [-p|--parameters <parameters>] [--validation <validation>]', | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 37 | _programHelpPrefix => "-H, --hostname=<Nagios Hostname> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 38 | -s, --service=<Nagios service name> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 39 | -P, --plugin=<plugin to execute> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 40 | -p, --parameters=<parameters for the plugin to execute> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 41 | --validation=F|T | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 42 | F(alse) : dtd validation off (default) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 43 | T(true) : dtd validation on", | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 44 | _programGetOptions => ['filename|F=s', 'hostname|H=s', 'service|s=s', 'plugin|P:s', 'parameters|p:s', 'validation:s', 'interval|i=i', 'environment|e=s'], | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 45 | _timeout => 30, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 46 | _debug => 0); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 47 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 48 | # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 49 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 50 | 7 | my $filename = $objectNagios->getOptionsArgv ('filename'); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 51 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 52 | 7 | ▶ | my $hostname = $objectNagios->getOptionsArgv ('hostname') ? $objectNagios->getOptionsArgv ('hostname') : undef; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 53 | 7 | ▶ | $objectNagios->printUsage ('Missing command line argument hostname') unless (defined $hostname); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 54 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 55 | 6 | ▶ | my $service = $objectNagios->getOptionsArgv ('service') ? $objectNagios->getOptionsArgv ('service') : undef; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 56 | 6 | ▶ | $objectNagios->printUsage ('Missing command line argument service') unless ( defined $service); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 57 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 58 | 5 | ▶ | my $plugin = $objectNagios->getOptionsArgv ('plugin') ? $objectNagios->getOptionsArgv ('plugin') : undef; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 59 | 5 | ▶ | my $parameters = $objectNagios->getOptionsArgv ('parameters') ? $objectNagios->getOptionsArgv ('parameters') : ''; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 60 | 5 | ▶ | my $validateDTD = $objectNagios->getOptionsArgv ('validation') ? $objectNagios->getOptionsArgv ('validation') : 'F'; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 61 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 62 | 5 | ▶ | if (defined $validateDTD) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 63 | 5 | ▶ | $objectNagios->printUsage ('Invalid validation option: '. $validateDTD) unless ($validateDTD =~ /^[FT]$/); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 64 | 5 | ▶ | $validateDTD = ($validateDTD eq 'T') ? 1 : 0; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 65 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 66 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 67 | 5 | my $resultOutOfDate = $objectNagios->getOptionsArgv ('interval'); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 68 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 69 | 5 | ▶ | my $environment = $objectNagios->getOptionsArgv ('environment') ? $objectNagios->getOptionsArgv ('environment') : 'P'; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 70 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 71 | # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 72 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 73 | 12 | ▶ | use ASNMTAP::Asnmtap::Plugins::XML qw(&extract_XML); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 74 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 75 | 12 | ▶ | use constant HEADER => '<?xml version="1.0" encoding="UTF-8"?>'; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 76 | 12 | ▶ | use constant FOOTER => '</ServiceReports>'; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 77 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 78 | # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 79 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 80 | 5 | ▶ | if ( defined $plugin ) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 81 | 0 | ▶ | if (-s $plugin ) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 82 | 0 | ▶ | $objectNagios->exit (7) if ( $objectNagios->call_system ( $plugin .' '. $parameters, 1 ) ); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 83 | } else { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 84 | 0 | $objectNagios->pluginValues ( { stateValue => $ERRORS{UNKNOWN}, error => "The Plugin '$plugin' doesn't exist" }, $TYPE{APPEND} ); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 85 | 0 | $objectNagios->exit (7); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 86 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 87 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 88 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 89 | 5 | my ($returnCode, $xml) = extract_XML ( asnmtapInherited => \$objectNagios, filenameXML => $filename, headerXML => HEADER, footerXML => FOOTER, validateDTD => $validateDTD, filenameDTD => "dtd/nagios-$schema.dtd" ); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 90 | 5 | ▶ | $objectNagios->exit (7) if ( $returnCode ); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 91 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 92 | # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 93 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 94 | 4 | my $currentTimeslot = timelocal (0, (localtime)[1,2,3,4,5]); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 95 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 96 | 4 | ▶ | if ($xml->{Schema}{Value} eq $schema and $xml->{ServiceReport}{Host} eq $hostname and $xml->{ServiceReport}{Service} eq $service and $xml->{ServiceReport}{Environment} =~ /^$environment/i) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition88%8/9
$xml->{"Schema"}{"Value"} eq $schema and $xml->{"ServiceReport"}{"Host"} eq $hostname and $xml->{"ServiceReport"}{"Service"} eq $service and $xml->{"ServiceReport"}{"Environment"} =~ /^$environment/i
$xml->{"Schema"}{"Value"} eq $schema and $xml->{"ServiceReport"}{"Host"} eq $hostname and $xml->{"ServiceReport"}{"Service"} eq $service
$xml->{"Schema"}{"Value"} eq $schema and $xml->{"ServiceReport"}{"Host"} eq $hostname
MC/DC75%3/4
$xml->{"Schema"}{"Value"} eq $schema and $xml->{"ServiceReport"}{"Host"} eq $hostname and $xml->{"ServiceReport"}{"Service"} eq $service and $xml->{"ServiceReport"}{"Environment"} =~ /^$environment/i
$xml->{"Schema"}{"Value"} eq $schema
$xml->{"ServiceReport"}{"Host"} eq $hostname
$xml->{"ServiceReport"}{"Service"} eq $service
$xml->{"ServiceReport"}{"Environment"} =~ /^$environment/i
Truth table80%4/5
A and B and C and D
A= $xml->{"Schema"}{"Value"} eq $schemaB= $xml->{"ServiceReport"}{"Host"} eq $hostnameC= $xml->{"ServiceReport"}{"Service"} eq $serviceD= $xml->{"ServiceReport"}{"Environment"} =~ /^$environment/i
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 97 | 1 | my ($checkEpochtime, $checkDate, $checkTime) = ($xml->{ServiceReport}{Epochtime}, $xml->{ServiceReport}{Date}, $xml->{ServiceReport}{Time}); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 98 | 1 | my ($checkYear, $checkMonth, $checkDay) = split (/[\/-]/, $checkDate); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 99 | 1 | my ($checkHour, $checkMin, $checkSec) = split (/:/, $checkTime); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 100 | 1 | my $xmlEpochtime = timelocal ( $checkSec, $checkMin, $checkHour, $checkDay, ($checkMonth-1), ($checkYear-1900) ); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 101 | 1 | ▶ | print "$checkEpochtime, $xmlEpochtime ($checkDate, $checkTime), $currentTimeslot - $checkEpochtime = ". ($currentTimeslot - $checkEpochtime) ." > $resultOutOfDate\n" if ( $objectNagios->getOptionsValue ('debug') ); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 102 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 103 | 1 | ▶ | unless ( check_date ( $checkYear, $checkMonth, $checkDay) or check_time($checkHour, $checkMin, $checkSec ) ) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 3 branches
Condition33%1/3
check_date($checkYear, $checkMonth, $checkDay) or check_time($checkHour, $checkMin, $checkSec)
MC/DC0%0/2
check_date($checkYear, $checkMonth, $checkDay) or check_time($checkHour, $checkMin, $checkSec)
check_date($checkYear, $checkMonth, $checkDay)
check_time($checkHour, $checkMin, $checkSec)
Truth table33%1/3
A or B
A= check_date($checkYear, $checkMonth, $checkDay)B= check_time($checkHour, $checkMin, $checkSec)
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 104 | 0 | $objectNagios->pluginValues ( { stateValue => $ERRORS{UNKNOWN}, error => "Date or Time into XML file '$filename' are wrong: $checkDate $checkTime", result => undef }, $TYPE{APPEND} ); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 105 | } elsif ( $checkEpochtime != $xmlEpochtime ) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 106 | 1 | $objectNagios->pluginValues ( { stateValue => $ERRORS{UNKNOWN}, error => "Epochtime difference from Date and Time into XML file '$filename' are wrong: $checkEpochtime != $xmlEpochtime ($checkDate $checkTime)", result => undef }, $TYPE{APPEND} ); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 107 | } elsif ( $currentTimeslot - $checkEpochtime > $resultOutOfDate ) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 108 | 0 | $objectNagios->pluginValues ( { stateValue => $ERRORS{UNKNOWN}, error => "Result into XML file '$filename' are out of date: $checkDate $checkTime", result => undef }, $TYPE{APPEND} ); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 109 | } else { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 110 | 0 | $objectNagios->pluginValues ( { stateValue => $ERRORS{$STATE{$xml->{ServiceReport}{Status}}}, alert => $xml->{ServiceReport}{StatusMessage}, result => $xml->{ServiceReport}{content} }, $TYPE{APPEND} ); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 111 | 0 | ▶ | $objectNagios->appendPerformanceData( $xml->{ServiceReport}{PerfData} ) if ( $xml->{ServiceReport}{PerfData} ); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 112 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 113 | } else { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 114 | 3 | my $tError = 'Content Error:'; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 115 | 3 | ▶ | $tError .= ' - Schema: '. $xml->{Schema}{Value} ." ne $schema" if ($xml->{Schema}{Value} ne $schema); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 116 | 3 | ▶ | $tError .= ' - Host: '. $xml->{ServiceReport}{Host}. " ne $hostname" if ($xml->{ServiceReport}{Host} ne $hostname); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 117 | 3 | ▶ | $tError .= ' - Service: '. $xml->{ServiceReport}{Service} ." ne $service" if ($xml->{ServiceReport}{Service} ne $service); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 118 | 3 | ▶ | $tError .= ' - Environment: ' .$xml->{ServiceReport}{Environment} . " ne $environment" if ($xml->{ServiceReport}{Environment} !~ /^$environment$/i); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 119 | 3 | $objectNagios->pluginValues ( { stateValue => $ERRORS{UNKNOWN}, error => $tError, result => undef }, $TYPE{APPEND} ); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 120 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 121 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 122 | 4 | $objectNagios->exit (7); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 123 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 124 | # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 125 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 126 | __END__ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||