ASNMTAP

 view release on metacpan or  search on metacpan

Changes  view on Meta::CPAN

                                 BUGFIX: convert_from_KB_to_metric for GB
                                 BUGFIX: DESTROY created new reference to dead object 'ASNMTAP::Asnmtap::Plugins::Nagios' during global destruction.
                               - WebTransact.pm
                                 UPDATE: added Content_Type: 'multipart/form-data' for qs-fixed
                               - change code to use 'perfdata'
                               - UPDATE: asnmtap-3.002.003_mysql-v5.0.x-trigger-events.sql
                               - UPDATE: asnmtap-3.002.003_mysql-v5.0.x-trigger-eventsUpdate.sql
                               - runCmdOnDemand.pl & WebTransact.pm
                                 - replace <BODY onload="..."> with <BODY>
                               - SOAP.pm
                                 NEW: encodingStyle
																 NEW: error 'Missing SOAP Envelope or Body'
                                 UPDATE: soapaction
                               - create_ASNMTAP_weblogic_configuration_for_SNMP.pl
                                 UPDATE: added status to e-mail subject
                               - NEW: supportRequest template (applications/custom/supportRequest.pm-orig) integrated into comments.pl
                               - NEW: integration for SDE (applications/custom/sde-supportRequest.pm-orig) into comments.pl
                               - NEW: check_xml-monitoring-1.2.pl
                               - UPDATE: coments.pl with integration for applications/custom/supportRequest.pm
                               ASNMTAP::Asnmtap::Applications
                               - Applications.cnf

README  view on Meta::CPAN

                                 BUGFIX: convert_from_KB_to_metric for GB
                                 BUGFIX: DESTROY created new reference to dead object 'ASNMTAP::Asnmtap::Plugins::Nagios' during global destruction.
                               - WebTransact.pm
                                 UPDATE: added Content_Type: 'multipart/form-data' for qs-fixed
                               - change code to use 'perfdata'
                               - UPDATE: asnmtap-3.002.003_mysql-v5.0.x-trigger-events.sql
                               - UPDATE: asnmtap-3.002.003_mysql-v5.0.x-trigger-eventsUpdate.sql
                               - runCmdOnDemand.pl & WebTransact.pm
                                 - replace <BODY onload="..."> with <BODY>
                               - SOAP.pm
                                 NEW: encodingStyle
																 NEW: error 'Missing SOAP Envelope or Body'
                                 UPDATE soapaction
                               - create_ASNMTAP_weblogic_configuration_for_SNMP.pl
                                 UPDATE: added status to e-mail subject
                               - NEW: supportRequest template (applications/custom/supportRequest.pm-orig) integrated into comments.pl
                               - NEW: integration for SDE (applications/custom/sde-supportRequest.pm-orig) into comments.pl
                               - NEW: check_xml-monitoring-1.2.pl
                               - UPDATE: coments.pl with integration for applications/custom/supportRequest.pm
                               ASNMTAP::Asnmtap::Applications
                               - Applications.cnf

applications/custom/sde-supportRequest.pm-orig  view on Meta::CPAN

  my $tool           = 'ASNMTAP';
  my $cluster        = 'http://itiltest1.smals-mvm.be/ivwse';
  my $namespace      = 'http://itiltest1.smals-mvm.be/ivwse/';

  # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  my ($UserID, $customer, $source) = ('MonitoringOffice', "$tool MONITORING", 'Alarm');

  my %soapService_NS = ('http://schemas.xmlsoap.org/wsdl/mime/'        => 'mime',
                        'http://schemas.xmlsoap.org/wsdl/soap/'        => 'soap',
                        'http://schemas.xmlsoap.org/wsdl/soap11/'      => 'soap11',
                        'http://schemas.xmlsoap.org/soap/encoding/'    => 'soapenc',
                        'http://www.w3.org/2001/XMLSchema'             => 's',
                        'http://schemas.xmlsoap.org/wsdl/'             => 'wsdl',
                        'http://schemas.xmlsoap.org/wsdl/http/'        => 'http',

                        'http://microsoft.com/wsdl/mime/textMatching/' => 'tm',
                        'http://infravision.com/ivwse'                 => 's1'
                       );

  # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

applications/htmlroot/snmptraps/include/xml/language/DE/error.xml  view on Meta::CPAN

<?xml version="1.0" encoding="UTF-8" ?>
<error>
   <authentification>
      <message>Konnte Logdatei nicht lesen - Sie scheinen nicht die benötigten Rechte zu besitzen!</message>
         <description>
            <line1>Bitte _u_berpr_u_fen Sie die Schreib-/Leserechte des Webservers sowie die </line1>
            <line2>Authentifizierungsoptionen in den Konfigurationsdateien</line2>
         </description>
   </authentification>
   <dbConnection>
      <message>Datenbankfehler</message>

applications/htmlroot/snmptraps/include/xml/language/DE/main.xml  view on Meta::CPAN

<?xml version="1.0" encoding="UTF-8" ?>
<lang>
   <header>
      <infoBox>
         <currentTrapLog>Aktueller Trap Log</currentTrapLog>
         <lastUpdate>Letztes Update</lastUpdate>
         <loggedInAs>Eingeloggt als</loggedInAs>
      </infoBox>
      <filter>
         <displayFilters>Filtereinstellungen</displayFilters>
         <host>Host</host>

applications/htmlroot/snmptraps/include/xml/language/EN/error.xml  view on Meta::CPAN

<?xml version="1.0" encoding="UTF-8" ?>
<error>
   <authentification>
      <message>It appears as though you do not have permission to view the log file ...</message>
         <description>
            <line1>If you believe this is an error, check the HTTP server authentication requirements for accessing this site</line1>
            <line2>and check the authorization options in your configuration file.</line2>
         </description>
   </authentification>
   <dbConnection>
      <message>Database-Error</message>

applications/htmlroot/snmptraps/include/xml/language/EN/main.xml  view on Meta::CPAN

<?xml version="1.0" encoding="UTF-8" ?>
<lang>
   <header>
      <infoBox>
         <currentTrapLog>Current Trap Log</currentTrapLog>
         <lastUpdate>Last Update</lastUpdate>
         <loggedInAs>Logged in as</loggedInAs>
      </infoBox>
      <filter>
         <displayFilters>Display Filters</displayFilters>
         <host>Host</host>

lib/ASNMTAP/Asnmtap/Plugins/Mail.pm  view on Meta::CPAN

  $mailcfg {mime}    = $self->{_SMTP}->{mime};
  $mailcfg {tz}      = $self->{_SMTP}->{tx} if ( defined $self->{_SMTP}->{tx} );
  $mailcfg {debug}   = $$asnmtapInherited->getOptionsValue ('debug');

  my $message;

  if ( $self->{_mailType} ) {
    use Time::Local;
    my ($localYear, $localMonth, $currentYear, $currentMonth, $currentDay, $currentHour, $currentMin, $currentSec) = ((localtime)[5], (localtime)[4], ((localtime)[5] + 1900), ((localtime)[4] + 1), (localtime)[3,2,1,0]);
    my $mailEpochtime = timelocal($currentSec, $currentMin, $currentHour, $currentDay, $localMonth, $localYear);
    $message = "<?xml version=\"1.0\" encoding=\"UTF-8\"?><!DOCTYPE FingerprintEmail SYSTEM \"dtd/FingerprintEmail-1.0.dtd\"><FingerprintEmail><Schema Value=\"1.0\"/><Fingerprint From=\"". $self->{_mail}->{from} ."\" To=\"". $self->{_mail}->{to} ."\"...
  } else {
    use ASNMTAP::Time qw(&get_datetimeSignal);
    $message = $self->{_subject_} ."\n". $self->{_branding_} ."\n". $self->{_timestamp_} .' '. get_datetimeSignal() ."\n". $self->{_status_} ."\n";
  }

  $message .= $self->{_mail}->{body} ."\n";
  my %mail = ( To => $self->{_mail}->{to}, From => $self->{_mail}->{from}, Subject => $self->{_subject_}, Message => $message );

  my $returnCode = (sendmail %mail) ? $ERRORS{OK} : $ERRORS{CRITICAL};
  $$asnmtapInherited->pluginValues ( { stateValue => $returnCode, alert => ( defined $parms{perfdataLabel} ? $parms{perfdataLabel} : 'email send' ) . ( $returnCode ? ' failed' : '' ) }, $TYPE{APPEND} );

lib/ASNMTAP/Asnmtap/Plugins/Mail.pm  view on Meta::CPAN

  if ( defined $numberOfMails ) {
    my $returnCode = $ERRORS{DEPENDENT};
    $self->{defaultArguments}->{numberOfMatches} = 0;

    if ( $numberOfMails ) {
      use MIME::Parser;
      my $parser = new MIME::Parser;
      $parser->output_to_core(1);
      $parser->decode_bodies(1);

      use constant HEADER => '<?xml version="1.0" encoding="UTF-8"?>';
      use constant SYSTEM => 'dtd/FingerprintEmail-1.0.dtd';
      use constant FOOTER => '</FingerprintEmail>';
      my $fingerprintXML  = HEADER .'<!DOCTYPE FingerprintEmail SYSTEM "'. SYSTEM .'"><FingerprintEmail>';

      my $debug = $$asnmtapInherited->getOptionsValue ('debug');
      my $label;

      for( my $msgnum = 1; $msgnum <= $numberOfMails; $msgnum++ ) {
        print "\n", ref ($self), "::receiving_fingerprint_mails(): message number $msgnum\n" if ( $debug );
        my ($fromNotFound, $toNotFound, $subjectNotFound, $fingerprintFound) = (1, 1, 1, 3);

lib/ASNMTAP/Asnmtap/Plugins/Mail.pm  view on Meta::CPAN

        }

        my $entity = $parser->parse_data( $msgbuffer );
        my $head = $entity->head;
        $head->unfold;

        if ( $debug >= 2 ) {
          print ref ($self), "::receiving_fingerprint_mails(): Header\n", $head->stringify, "\n\n";
          print ref ($self), "::receiving_fingerprint_mails(): MIME-Version: ", $head->get ('MIME-Version'), "\n";
          print ref ($self), "::receiving_fingerprint_mails(): MIME-Type: ", $head->mime_type, "\n";
          print ref ($self), "::receiving_fingerprint_mails(): MIME-Encoding: ", $head->mime_encoding, "\n";
          print ref ($self), "::receiving_fingerprint_mails(): Content-Type Charset: ", $head->mime_attr ('content-type.charset'), "\n"if ( $head->mime_attr('content-type.charset') );
          print ref ($self), "::receiving_fingerprint_mails(): Content-Type Name: ", $head->mime_attr('content-type.name'), "\n" if ( $head->mime_attr('content-type.name') );
          print ref ($self), "::receiving_fingerprint_mails(): Multipart Boundary: ", $head->multipart_boundary, "\n" if ( $head->multipart_boundary );
        }

        print "\n", ref ($self), "::receiving_fingerprint_mails(): HEAD\n" if ($debug);

        foreach my $msgline ( split (/[\n\r]/, $head->stringify) ) {
          next unless ( $msgline );

lib/ASNMTAP/Asnmtap/Plugins/Mail.pm  view on Meta::CPAN

          if ( defined $self->{_IMAP4}->{imap4} ) {
            use Email::Simple;
            my $mail = Email::Simple->new( join ( '', @{ $email->get ( $msgnum ) } ) );
            $msgbuffer = $mail->body;
          } elsif ( defined $self->{_POP3}->{pop3} ) {
            $msgbuffer = $email->Body ( $msgnum );
          }

          use MIME::Decoder;

          unless ( supported MIME::Decoder $head->mime_encoding ) {
            print "MIME .... : '". $head->mime_encoding ."' encoding is not supported!\n" if ($debug );
            $returnCode = $ERRORS{UNKNOWN};
            $$asnmtapInherited->pluginValues ( { stateValue => $returnCode, error => "MIME-Encoding: '". $head->mime_encoding ."' is not supported!" }, $TYPE{APPEND} );
            next;
          }

        # if ( $head->mime_encoding eq 'quoted-printable' or $head->mime_encoding eq '7bit' or $head->mime_encoding eq '8bit' ) { 
          if ( $head->mime_encoding eq '7bit' ) { 
             $msgbuffer = MIME::QuotedPrint::decode($msgbuffer); 
          } else { 
            use IO::String; 
            my $ioIN  = IO::String->new($msgbuffer); 
            my $ioOUT = IO::String->new($msgbuffer); 

            my $decoder = new MIME::Decoder $head->mime_encoding; 
            $decoder->decode($ioIN, $ioOUT); 

            $ioIN->close; 
            $ioOUT->close; 
          }

          if ( $parms{checkFingerprint} ) {
            foreach my $msgline ( split (/[\n\r]/, $msgbuffer) ) {
              next unless ( $msgline );
              last unless ( $self->{_mailType} ? $xmlNotFound : $fingerprintFound );

lib/ASNMTAP/Asnmtap/Plugins/Mail.pod  view on Meta::CPAN

optional, scalar value, default: 3;

=item delay

number of seconds to wait between retries. This delay also happens before trying the next server in the list, if the retries for the current server have been exhausted. For CGI scripts, you want few retries and short delays to return with a results p...

optional, scalar value, default: 1 (second);

=item mime

set this to 0 if you don't want any automatic MIME encoding. You normally don't need this, the module should 'Do the right thing' anyway.

optional, scalar value, default: 0

=item tz

normally, your time zone is set automatically, from the difference between time() and gmtime(). This allows you to override automatic detection in cases where your system is confused.

optional, scalar value, default: undefined (automatic detection at run-time).

=item debug

lib/ASNMTAP/Asnmtap/Plugins/Mail.pod  view on Meta::CPAN

=item XML

Each e-mail exists of an XML fingerprint. This allows us lateron only to pick up the required e-mails with pop3, because we will filter out the emails with a minimum band width the e-mails desired from the mail box. 

When the status and the header plus the first 5 lines of the e-mail agrees to these fingerprint, the e-mail is picked up, processes, and removed from the mail box.

=over 4

=item DTD for validation XML

 <?xml version="1.0" encoding="UTF-8"?>

 <!ENTITY AUTHOR  "Alex Peeters">
 <!ENTITY EMAIL   "Alex.Peeters@citap.com">
 <!ENTITY PURPOSE "2005/11/15, dtd schema v1.0 for Fingerprint Email by XML">

 <!ELEMENT FingerprintEmail (Schema, Fingerprint)>
 <!ELEMENT Schema (#PCDATA)>
 <!ATTLIST Schema Value CDATA #FIXED "1.0">
 <!ELEMENT Fingerprint (#PCDATA)>
 <!ATTLIST Fingerprint

lib/ASNMTAP/Asnmtap/Plugins/Mail.pod  view on Meta::CPAN

   Description CDATA #REQUIRED
   Environment (PROD|TEST|ACC|DEV|SIM|LOCAL) #REQUIRED
   Date CDATA #REQUIRED
   Time CDATA #REQUIRED
   Epochtime CDATA #REQUIRED
   Status CDATA #REQUIRED
 >

=item Example

<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE FingerprintEmail SYSTEM "dtd/FingerprintEmail-1.0.dtd"><FingerprintEmail><Schema Value="1.0"/><Fingerprint From="alex.peeters@citap.com" To="asnmtap@citap.com" Destination="ASNMTAP" Plugin="mail-fingerp...

=back

=back

=item _text

required textual descriptions

=over 4

lib/ASNMTAP/Asnmtap/Plugins/SOAP.pm  view on Meta::CPAN

                   proxy                => undef,
                   credentials          => undef,
                   namespace            => undef,
                   registerNamespace    => undef,
                   method               => undef,
                   soapaction           => undef,
                   xmlContent           => undef,
                   params               => undef,
                   envprefix            => 'soapenv',
                   encprefix            => 'soapenc',
                   encodingStyle        => undef,
                   readable             => 1,
                   cookies              => undef,
                   perfdataLabel        => undef,

                   PATCH_HTTP_KEEPALIVE => 0,
                   WSRF                 => 0,

                   TYPE_ERROR_RETURN    => 'REPLACE'
				 );

lib/ASNMTAP/Asnmtap/Plugins/SOAP.pm  view on Meta::CPAN

  my $xmlContent = $parms{xmlContent};

  my $params = $parms{params};

  my $readable = $parms{readable};

  my $envprefix = $parms{envprefix};

  my $encprefix = $parms{envprefix};

  my $encodingStyle = $parms{encodingStyle};

  unless ( $readable =~ /^[01]$/ ) {
    $$asnmtapInherited->pluginValues ( { stateValue => $ERRORS{UNKNOWN}, error => 'SOAP parameter readable must be 0 or 1' }, $TYPE{APPEND} );
    return ( $ERRORS{UNKNOWN} );
  }

  my $cookies = $parms{cookies};

  unless ( $cookies =~ /^[01]$/ ) {
    $$asnmtapInherited->pluginValues ( { stateValue => $ERRORS{UNKNOWN}, error => 'SOAP parameter cookies must be 0 or 1' }, $TYPE{APPEND} );

lib/ASNMTAP/Asnmtap/Plugins/SOAP.pm  view on Meta::CPAN

      -> readable   ( $readable )
      -> envprefix  ( $envprefix )
      -> encprefix  ( $encprefix )
      -> xmlschema  ( 'http://www.w3.org/2001/XMLSchema' )
      -> uri        ( $namespace )
      -> on_action  ( sub { my $uri = $_[0]; $uri =~ s/\/$//; my $method = (defined $soapaction ? ( $soapaction eq '' ? '' : $soapaction ) : $uri .'/'. $_[1]) } )
      -> on_fault   ( sub { } )
    ;
  }

  $service->serializer->encodingStyle ( $encodingStyle ) if ( defined $encodingStyle );
  $SOAP::Constants::PATCH_HTTP_KEEPALIVE = $PATCH_HTTP_KEEPALIVE;

  if ( defined $parms{registerNamespace} ) {
    while ( my ($key, $value) = each( %{ $parms{registerNamespace} } ) ) {
      $service->serializer->register_ns($key, $value);
    }
  }

  if ( defined $proxySettings ) {
    $service->proxy ( $parms{proxy}, timeout => $timeout, proxy => ['http' => "http://$proxySettings"] );

lib/ASNMTAP/Asnmtap/Plugins/SOAP.pod  view on Meta::CPAN

optional scalar, params is one SOAP::Data->name definition

=item envprefix

optional, envprefix, default 'soapenv'

=item encprefix

optional, encprefix, default 'soapenc'

=item encodingStyle

To change the encodingStyle you say encodingStyle => 'http://schemas.xmlsoap.org/soap/envelope/',

To remove the encodingStyle you say encodingStyle => '',

=item readable

This lets you specify the format for the generated XML code.
Carriage returns <CR> and indentation will be added for readability.
Useful in the case you want to see the generated code in a debugger.
By default, there are no additional characters in generated XML code.

optional, readable can be 0 or 1

lib/ASNMTAP/Asnmtap/Plugins/WebTransact.pm  view on Meta::CPAN

        } else {
          LWP::Debug::debug ("I give up.  I'm returning this '$code $message' response.");
        }
      }

      print ref ($self), '::timing_tries: ', $timing_tries, " - $url\n" if ( $onDemand );
    } else {
      $response = $ua->request ($request);
    }

    if ( defined $response->content_encoding and $response->content_encoding =~ /^gzip$/i ) {
      use Compress::Zlib;
      $response_as_content = Compress::Zlib::memGunzip ( $response->content );
    } else {
      $response_as_content = $response->content;
    }

    if ( $debug >= 3 ) {
      print "\n", ref ($self), '::request: ()', "\n", $response->as_string, "\n\n";
    } elsif ( $debug >= 2 ) {
      print "\n", ref ($self), '::content: ()', "\n", $response_as_content, "\n\n";

lib/ASNMTAP/Asnmtap/Plugins/XML.pod  view on Meta::CPAN

    _debug              => 0);

  use ASNMTAP::Asnmtap::Plugins::WebTransact;
  use ASNMTAP::Asnmtap::Plugins::XML qw(&extract_XML);

  my @URLS = ();
  my $objectWebTransact = ASNMTAP::Asnmtap::Plugins::WebTransact->new ( \$objectPlugins, \@URLS );

  $objectPlugins->pluginValue ('message', "WebTransact-XML plugin template for testing the '$APPLICATION'");

  use constant HEADER1 => '<?xml version="1.0" encoding="UTF-8" ?>';
  use constant FOOTER1 => '</testsuites>';

  use constant HEADER2 => '<?xml version="1.0" encoding="UTF-8"?>';
  use constant FOOTER2 => '</MonitoringXML>';

  my ($returnCode, $result, $xml);

  @URLS = (
    { Method => 'GET',  Url => 'http://asnmtap.citap.com/ServletTestRunner.xml', Qs_var => [], Qs_fixed => [], Exp => "\Q<testsuites>\E", Exp_Fault => ">>>NIHIL<<<", Msg => "ServletTestRunner.xml", Msg_Fault => "ServletTestRunner.xml" },
  );

  $returnCode = $objectWebTransact->check ( { } );
  undef $objectWebTransact;

lib/ASNMTAP/Asnmtap/Plugins/XML.pod  view on Meta::CPAN

=item filenameXML

a filename from where the XML need to be extracted.

resultXML and/or filenameXML are required

=item headerXML

a required XML HEADER

  XML HEADER: <?xml version="1.0" encoding="UTF-8"?>

=item footerXML

a required XML FOOTER

  XML FOOTER: </MonitoringXML>

=item validateDTD

optional, validateDTD can be 0 or 1

plugins/jUnit/check_jUnit.pl  view on Meta::CPAN

my $result      = $objectPlugins->getOptionsArgv ('result');
my $port        = $objectPlugins->getOptionsArgv ('port');
my $username    = $objectPlugins->getOptionsArgv ('username');
my $password    = $objectPlugins->getOptionsArgv ('password');

my $debug       = $objectPlugins->getOptionsValue ('debug');
my $onDemand    = $objectPlugins->getOptionsValue ('onDemand');

# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

my $XMLHEADER           = '<\?xml\s+version="1.0"\s+encoding="UTF-8"\?>';
use constant HEADER    => '<?xml version="1.0" encoding="UTF-8"?>';
use constant FOOTER    => '</testresult>';

# crinaea MySQL connection parameters
my $asnmtapServerName   = "<server>";
my $asnmtapServerPort   = "3306";
my $asnmtapServerUser   = "asnmtap";
my $asnmtapServerPass   = "<password>";
my $asnmtapServerDb     = "odbc";
my $asnmtapServerTabl   = "jUnit";

plugins/nagios/templates/check_xml-monitoring-1.2.pl  view on Meta::CPAN


my $environment = $objectNagios->getOptionsArgv ('environment') ? $objectNagios->getOptionsArgv ('environment') : 'P';
my $environmentText = $objectNagios->getOptionsValue ('environment');

my $debug = $objectNagios->getOptionsValue ('debug');

# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

use ASNMTAP::Asnmtap::Plugins::XML qw(&extract_XML);

use constant HEADER => '<?xml version="1.0" encoding="UTF-8"?>';
use constant FOOTER => '</mon:MonitoringXML>'; # use constant FOOTER => '</MonitoringXML>';

my ($reverse, $message, $result, $debugfileMessage) = ( 0, 'Check Nagios by XML Monitoring 1.2' );

# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

if ( defined $plugin ) {
  if (-s $plugin ) {
    $objectNagios->exit (3) if ( $objectNagios->call_system ( $plugin .' '. $parameters, 1 ) );
  } else {

plugins/nagios/templates/check_xml-monitoring.pl  view on Meta::CPAN

}

my $resultOutOfDate = $objectNagios->getOptionsArgv ('interval');

my $environment = $objectNagios->getOptionsArgv ('environment') ? $objectNagios->getOptionsArgv ('environment') : 'P';

# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

use ASNMTAP::Asnmtap::Plugins::XML qw(&extract_XML);

use constant HEADER => '<?xml version="1.0" encoding="UTF-8"?>';
use constant FOOTER => '</MonitoringXML>';

# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

if ( defined $plugin ) {
  if (-s $plugin ) {
    $objectNagios->exit (3) if ( $objectNagios->call_system ( $plugin .' '. $parameters, 1 ) );
  } else {
    $objectNagios->pluginValues ( { stateValue => $ERRORS{UNKNOWN}, error => "The Plugin '$plugin' doesn't exist" }, $TYPE{APPEND} );
    $objectNagios->exit (3);

plugins/nagios/templates/check_xml.pl  view on Meta::CPAN

}

my $resultOutOfDate = $objectNagios->getOptionsArgv ('interval');

my $environment = $objectNagios->getOptionsArgv ('environment') ? $objectNagios->getOptionsArgv ('environment') : 'P';

# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

use ASNMTAP::Asnmtap::Plugins::XML qw(&extract_XML);

use constant HEADER => '<?xml version="1.0" encoding="UTF-8"?>';
use constant FOOTER => '</ServiceReports>';

# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

if ( defined $plugin ) {
  if (-s $plugin ) {
    $objectNagios->exit (7) if ( $objectNagios->call_system ( $plugin .' '. $parameters, 1 ) );
  } else {
    $objectNagios->pluginValues ( { stateValue => $ERRORS{UNKNOWN}, error => "The Plugin '$plugin' doesn't exist" }, $TYPE{APPEND} );
    $objectNagios->exit (7);

plugins/nagios/templates/dtd/Monitoring-1.0.dtd  view on Meta::CPAN

<?xml version="1.0" encoding="UTF-8"?>

<!ENTITY AUTHOR  "Alex Peeters">
<!ENTITY PURPOSE "2005/12/21, DTD schema v1.0 for Monitoring by XML">

<!ELEMENT MonitoringXML (Monitoring)>
<!ELEMENT Monitoring (Schema, Results)>
<!ELEMENT Schema EMPTY>
<!ATTLIST Schema
	Value CDATA #FIXED "1.0"
>

plugins/nagios/templates/dtd/Monitoring-1.1.dtd  view on Meta::CPAN

<?xml version="1.0" encoding="UTF-8"?>

<!ENTITY AUTHOR  "Alex Peeters">
<!ENTITY PURPOSE "2008/12/10, DTD schema v1.1 for Monitoring by XML">

<!ELEMENT MonitoringXML (Monitoring)>
<!ELEMENT Monitoring (Schema, Results)>
<!ELEMENT Schema EMPTY>
<!ATTLIST Schema
	Value CDATA #FIXED "1.1"
>

plugins/nagios/templates/dtd/Monitoring-1.2.dtd  view on Meta::CPAN

<?xml version="1.0" encoding="UTF-8"?>

<!ENTITY AUTHOR  "Alex Peeters">
<!ENTITY PURPOSE "2009/09/29, DTD schema v1.2 for Monitoring by XML">

<!ELEMENT MonitoringXML (Monitoring)>
<!ELEMENT Monitoring (Schema, Results+)>
<!ELEMENT Schema EMPTY>
<!ATTLIST Schema
	Value CDATA #FIXED "1.2"
>

plugins/nagios/templates/dtd/nagios-1.0.dtd  view on Meta::CPAN

<?xml version="1.0" encoding="UTF-8"?>

<!ENTITY AUTHOR  "Alex Peeters">
<!ENTITY EMAIL   "Alex.Peeters@citap.com">
<!ENTITY PURPOSE "2005/11/15, dtd schema v1.0 for check_xml.pl, Check Nagios by XML">

<!ELEMENT ServiceReports (Schema, ServiceReport)>
<!ELEMENT Schema (#PCDATA)>
<!ATTLIST Schema Value CDATA #FIXED "1.0">
<!ELEMENT ServiceReport (#PCDATA)>
<!ATTLIST ServiceReport

plugins/nagios/templates/xml/Monitoring-1.0-doNotValidate.xml  view on Meta::CPAN

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE MonitoringXML SYSTEM "dtd/Monitoring-1.0.dtd">
<MonitoringXML>
	<Monitoring>
		<Schema Value="1.1"/>
		<Results>
		    <Details Host="Host Name ..." Service="Service Name ..." Environment="ASNMTAP" Date="2006/01/28" Time="17:27:30" Epochtime="1131121650" Status="2" StatusMessage="StatusMessage ..." PerfData="'PerfData Label 1'=99ms;0;;; 'PerfData Label n'=99ms;...
			<ErrorDetail><![CDATA[ErrorDetail .1.]]></ErrorDetail>
			<ErrorStack><![CDATA[ErrorStack .1.]]></ErrorStack>
  	        <Extension>
		        <Element eName="one integer" eDescription="description a" eType="INTEGER" eValue="1" ePerfData="'PerfData Label 1'=99ms;0;;; 'PerfData Label n'=99ms;0;;;"/>

plugins/nagios/templates/xml/Monitoring-1.0-errorParsing.xml  view on Meta::CPAN

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE MonitoringXML SYSTEM "dtd/Monitoring-1.0.dtd">
<MonitoringXML>
	<Monitoring>
		<Schema Value="1.0"/>
		<Results>
		    <Details Host="Host Name ..." Service="Service Name ..." Environment="LOCAL" Date="2006/01/28" Time="17:27:30" Epochtime="1131121650" Status="2" StatusMessage="StatusMessage ..." PerfData="'PerfData Label 1'=99ms;0;;; 'PerfData Label n'=99ms;0;...
			<ErrorDetail><![CDATA[ErrorDetail .1.]]></ErrorDetail>
			<ErrorStack><![CDATA[ErrorStack .1.]]></ErrorStack>
  	        <Extension>
		        <Element eName="one integer" eDescription="description a" eType="INTEGER" eValue="1" ePerfData="'PerfData Label 1'=99ms;0;;; 'PerfData Label n'=99ms;0;;;"/>

plugins/nagios/templates/xml/Monitoring-1.0.xml  view on Meta::CPAN

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE MonitoringXML SYSTEM "dtd/Monitoring-1.0.dtd">
<MonitoringXML>
	<Monitoring>
		<Schema Value="1.0"/>
		<Results>
		    <Details Host="Host Name ..." Service="Service Name ..." Environment="LOCAL" Date="2005/11/04" Time="17:27:30" Epochtime="1131121650" Status="2" StatusMessage="StatusMessage ..." PerfData="'PerfData Label 1'=99ms;0;;; 'PerfData Label n'=99ms;0;...
			<ErrorDetail><![CDATA[ErrorDetail .1.]]></ErrorDetail>
			<ErrorStack><![CDATA[ErrorStack .1.]]></ErrorStack>
  	        <Extension>
		        <Element eName="one integer" eDescription="description a" eType="INTEGER" eValue="1" ePerfData="'PerfData Label 1'=99ms;0;;; 'PerfData Label n'=99ms;0;;;"/>

plugins/nagios/templates/xml/Monitoring-1.1-doNotValidate.xml  view on Meta::CPAN

<?xml version="1.0" encoding="UTF-8"?>
<MonitoringXML>
	<Monitoring>
		<Schema Value="1.1"/>
		<Results>
		    <Details Host="Host Name ..." Service="Service Name ..." Environment="ASNMTAP" Date="2005/11/04" Time="17:27:30" Epochtime="1131121650" Status="2" StatusMessage="StatusMessage ..." PerfData="'PerfData Label 1'=99ms;0;;; 'PerfData Label n'=99ms;...
			<ErrorDetail><![CDATA[ErrorDetail .1.]]></ErrorDetail>
			<ErrorStack><![CDATA[ErrorStack .1.]]></ErrorStack>
            <SubResults>
		       <SubDetails Host="Host Name ..." Service="Service Name ..." Environment="LOCAL" Date="2005/11/04" Time="17:27:30" Epochtime="1131121650" Status="2" StatusMessage="StatusMessage ..." PerfData="'PerfData Label 1'=99ms;0;;; 'PerfData Label n'=9...
			   <SubErrorDetail><![CDATA[ErrorDetail .1.]]></SubErrorDetail>

plugins/nagios/templates/xml/Monitoring-1.1-errorParsing.xml  view on Meta::CPAN

<?xml version="1.0" encoding="UTF-8"?>
<MonitoringXML>
	<Monitoring>
		<Schema Value="1.1"/>
		<Results>
		    <Details Host="Host Name ..." Service="Service Name ..." Environment="LOCAL" Date="2005/11/04" Time="17:27:30" Epochtime="1131121650" Status="2" StatusMessage="StatusMessage ..." PerfData="'PerfData Label 1'=99ms;0;;; 'PerfData Label n'=99ms;0;...
			<ErrorDetail><![CDATA[ErrorDetail .1.]]></ErrorDetail>
			<ErrorStack><![CDATA[ErrorStack .1.]]></ErrorStack>
            <SubResults>
		       <SubDetails Host="Host Name ..." Service="Service Name ..." Environment="LOCAL" Date="2005/11/04" Time="17:27:30" Epochtime="1131121650" Status="2" StatusMessage="StatusMessage ..." PerfData="'PerfData Label 1'=99ms;0;;; 'PerfData Label n'=9...
			   <SubErrorDetail><![CDATA[ErrorDetail .1.]]></SubErrorDetail>

plugins/nagios/templates/xml/Monitoring-1.1.xml  view on Meta::CPAN

<?xml version="1.0" encoding="UTF-8"?>
<MonitoringXML>
	<Monitoring>
		<Schema Value="1.1"/>
		<Results>
		    <Details Host="Host Name ..." Service="Service Name ..." Environment="LOCAL" Date="2005/11/04" Time="17:27:30" Epochtime="1131121650" Status="2" StatusMessage="StatusMessage ..." PerfData="'PerfData Label 1'=99ms;0;;; 'PerfData Label n'=99ms;0;...
			<ErrorDetail><![CDATA[ErrorDetail .1.]]></ErrorDetail>
			<ErrorStack><![CDATA[ErrorStack .1.]]></ErrorStack>
            <SubResults>
		       <SubDetails Host="Host Name ..." Service="Service Name ..." Environment="LOCAL" Date="2005/11/04" Time="17:27:30" Epochtime="1131121650" Status="2" StatusMessage="StatusMessage ..." PerfData="'PerfData Label 1'=99ms;0;;; 'PerfData Label n'=9...
			   <SubErrorDetail><![CDATA[ErrorDetail .1.]]></SubErrorDetail>

plugins/nagios/templates/xml/Monitoring-1.2-doNotValidate.xml  view on Meta::CPAN

<?xml version="1.0" encoding="UTF-8"?>
<MonitoringXML>
	<Monitoring>
		<Schema Value="1.2"/>
		<Results>
		    <Details Host="Host Name ..." Service="Service Name ..." Environment="ASNMTAP" Date="2005/11/04" Time="17:27:30" Epochtime="1131121650" Status="2" StatusMessage="StatusMessage ..." PerfData="'PerfData Label 1'=99ms;0;;; 'PerfData Label n'=99ms;...
			<ErrorDetail><![CDATA[ErrorDetail .1.]]></ErrorDetail>
			<ErrorStack><![CDATA[ErrorStack .1.]]></ErrorStack>
            <SubResults>
		       <SubDetails Host="Host Name ..." Service="Service Name ..." Environment="LOCAL" Date="2005/11/04" Time="17:27:30" Epochtime="1131121650" Status="2" StatusMessage="StatusMessage ..." PerfData="'PerfData Label 1'=99ms;0;;; 'PerfData Label n'=9...
			   <SubErrorDetail><![CDATA[ErrorDetail .1.]]></SubErrorDetail>

plugins/nagios/templates/xml/Monitoring-1.2-errorParsing.xml  view on Meta::CPAN

<?xml version="1.0" encoding="UTF-8"?>
<MonitoringXML>
	<Monitoring>
		<Schema Value="1.2"/>
		<Results>
		    <Details Host="Host Name ..." Service="Service Name ..." Environment="LOCAL" Date="2005/11/04" Time="17:27:30" Epochtime="1131121650" Status="2" StatusMessage="StatusMessage ..." PerfData="'PerfData Label 1'=99ms;0;;; 'PerfData Label n'=99ms;0;...
			<ErrorDetail><![CDATA[ErrorDetail .1.]]></ErrorDetail>
			<ErrorStack><![CDATA[ErrorStack .1.]]></ErrorStack>
            <SubResults>
		       <SubDetails Host="Host Name ..." Service="Service Name ..." Environment="LOCAL" Date="2005/11/04" Time="17:27:30" Epochtime="1131121650" Status="2" StatusMessage="StatusMessage ..." PerfData="'PerfData Label 1'=99ms;0;;; 'PerfData Label n'=9...
			   <SubErrorDetail><![CDATA[ErrorDetail .1.]]></SubErrorDetail>

plugins/nagios/templates/xml/Monitoring-1.2.xml  view on Meta::CPAN

<?xml version="1.0" encoding="UTF-8"?>
<MonitoringXML>
	<Monitoring>
		<Schema Value="1.2"/>
		<Results>
		    <Details Host="Host Name ..." Service="Service Name ..." Environment="LOCAL" Date="2005/11/04" Time="17:27:30" Epochtime="1131121650" Status="2" StatusMessage="StatusMessage ..." PerfData="'PerfData Label 1'=99ms;0;;; 'PerfData Label n'=99ms;0;...
			<ErrorDetail><![CDATA[ErrorDetail .1.]]></ErrorDetail>
			<ErrorStack><![CDATA[ErrorStack .1.]]></ErrorStack>
            <SubResults>
		       <SubDetails Host="Host Name ..." Service="Service Name ..." Environment="LOCAL" Date="2005/11/04" Time="17:27:30" Epochtime="1131121650" Status="2" StatusMessage="StatusMessage ..." PerfData="'PerfData Label 1'=99ms;0;;; 'PerfData Label n'=9...
			   <SubErrorDetail><![CDATA[ErrorDetail .1.]]></SubErrorDetail>



( run in 0.394 second using v1.01-cache-2.11-cpan-4d50c553e7e )