ASNMTAP

 view release on metacpan or  search on metacpan

Changes  view on Meta::CPAN

                               -               , 'Log::Dispatch' => '2.26'
                               -               , 'Log::Dispatch::FileRotate' => '1.19'
                               -               , 'Log::Log4perl::Layout::XMLLayout' => 'x.x'

Version 3.002.003, 2011/xx/yy, by Alex Peeters
                               ASNMTAP
                               - Nagios.pm
                                 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

INSTALL  view on Meta::CPAN


  
  ASNMTAP Web Access is now possible
  ----------------------------------

  1) Server Administrator at http://asnmtap.citap.com/asnmtap/cgi-bin/sadmin/index.pl

  - Servers (to define the different application monitoring servers) 
  
  - Pagedirs (where the Display writes the different views) 
  - Resultdirs (where the Collector writes the returned data from a plugin) 
  - Display Groups (to define the group titles that are used by the Display) 
  
  - Display Daemons (to define the different daemons used for the Display) 
  - Collector Daemons (to define the different daemons used for the Collector) 
  
  - Plugins (to define the plugins that are executed by the Collector) 
  
  - Views (to define the different views used by the Display daemons) 
  - Crontabs (to define the different crontabs used by the Collector daemons) 
  

Makefile.PL  view on Meta::CPAN

    [ '/etc/ppp/resolv/ASNMTAP',  'R' ],
    [ '/usr/bin/plog',            'R' ],
    [ '/usr/bin/poff',            'R' ],
    [ '/usr/bin/pon',             'R' ],
   ]
  ],
  [ '*001104', 'SOAP support',        'ASNMTAP::Asnmtap::Plugins::SOAP',        { 'ASNMTAP::Asnmtap::Plugins' => '*0011', 'SOAP::Lite' => '0.710.08', 'WSRF::Lite' => '0.8.2.7', 'DateTime' => '0.37', 'DateTime::Format::Epoch' => '0.10', 'DateTime::For...
  [ '*001105', 'WebTransact support', 'ASNMTAP::Asnmtap::Plugins::WebTransact', { 'ASNMTAP::Asnmtap::Plugins' => '*0011', 'Bundle::LWP' => '1.11', 'CGI' => '3.37', 'Compress::Zlib' => '2.010', 'Crypt::SSLeay' => '0.56', 'Digest::MD5' => '2.36', 'IO::...
  [ '*001106', 'XML support',         'ASNMTAP::Asnmtap::Plugins::XML',         { 'ASNMTAP::Asnmtap::Plugins' => '*0011', 'XML::Parser' => '2.36', 'XML::LibXML' => '1.70', 'XML::Simple' => '2.18' }, 2, [], [] ],
  [ '*001199', 'Testing Templates',   'ASNMTAP::Asnmtap::Plugins::NPTest',      { 'ASNMTAP::Asnmtap::Plugins' => '*0011', 'Cwd' => '3.25', 'Data::Dumper' => '2.121', 'File::Basename' => '2.73', 'IO' => '1.23' }, 1, [], [] ],
  [ '', 'unbless data structure',     'Data::Structure::Util',                  { 'Test::Builder::Tester' => '1.13', 'Test::Pod' => '1.22', 'Clone' =>'0.18', 'File::Find::Rule' => '0.28', 'Data::Structure::Util' => '0.11' }, 4, [], [] ],
  [ '', 'FTP template',               'check_template-ftp.pl',                  { 'Net::FTP' => '2.75' }, 4, [], [] ],
  [ '', 'LDAP template',              'check_template-ldap.pl',                 { 'Convert::ASN1' => '0.19', 'URI::ldap' => '1.11', 'Digest::MD5' => '2.36', 'XML::Parser' => '2.36', 'Net::LDAP' => '0.34' }, 4, [], [] ],
  [ '', 'MySQL template',             'check_MySQL-database-replication.pl',    { 'Bit::Vector' => '6.3', 'Date::Calc' => '5.4', 'Bundle::DBI' => '1.604', 'Bundle::DBD::mysql' => '4.004', 'DBIx::Log4perl' => '0.18', 'Log::Log4perl' => '1.26' }, 4, []...
  [ '', 'SFTP template',              'check_template-sftp.pl',                 { 'Net::SFTP::Foreign' => '1.61' }, 4, [], [] ]
);

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

my %has_module_cache = ();

# Allow us to suppress all program installation with the -n (library only) option.
# This is for those that don't want to mess with the configuration section of this file.
use Getopt::Std;

README  view on Meta::CPAN

                               -               , 'Log::Dispatch' => '2.26'
                               -               , 'Log::Dispatch::FileRotate' => '1.19'
                               -               , 'Log::Log4perl::Layout::XMLLayout' => 'x.x'

Version 3.002.003, 2011/xx/yy, by Alex Peeters
                               ASNMTAP
                               - Nagios.pm
                                 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

applications/bin/generateReports.pl  view on Meta::CPAN

    $urlAccessParametersYear = "inputType=year&year=$yearReportYear";
  }

  if ( $debug ) { print $emailMessage; } else { print EMAILREPORT $emailMessage; }

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

  # Init parameters
  my ($rv, $dbh, $sth, $sql);

  # open connection to database and query data
  $rv  = 1;

  $dbh = DBI->connect("dbi:mysql:$DATABASE:$SERVERNAMEREADONLY:$SERVERPORTREADONLY", "$SERVERUSERREADONLY", "$SERVERPASSREADONLY" ) or $rv = DBI_error_trap(*EMAILREPORT, "Cannot connect to the database", \$logger, $debug);

  if ($dbh and $rv) {
    my ($id, $catalogID, $uKey, $reportTitle, $periode, $status, $errorDetails, $bar, $hourlyAverage, $dailyAverage, $showDetails, $showComments, $showPerfdata, $showTop20SlowTests, $printerFriendlyOutput, $formatOutput, $userPassword, $timeperiodID,...
    $sql = "select id, $SERVERTABLREPORTS.catalogID, $SERVERTABLREPORTS.uKey, concat( LTRIM(SUBSTRING_INDEX($SERVERTABLPLUGINS.title, ']', -1)), ' (', $SERVERTABLENVIRONMENT.label, ')' ), periode, status, errorDetails, bar, hourlyAverage, dailyAverag...
    $sth = $dbh->prepare( $sql ) or $rv = DBI_error_trap(*EMAILREPORT, "Cannot dbh->prepare: $sql", \$logger, $debug);
    $sth->execute() or $rv = DBI_error_trap(*EMAILREPORT, "Cannot sth->execute: $sql", \$logger, $debug) if $rv;
    $sth->bind_columns( \$id, \$catalogID, \$uKey, \$reportTitle, \$periode, \$status, \$errorDetails, \$bar, \$hourlyAverage, \$dailyAverage, \$showDetails, \$showComments, \$showPerfdata, \$showTop20SlowTests, \$printerFriendlyOutput, \$formatOutpu...

    my @commands = (); my @pdfFilenames = ();

    if ( $rv ) {
      if ( $sth->rows ) {
        while( $sth->fetch() ) {
          $emailMessage = ($debug >= 2) ? "--> $id, $catalogID, $uKey, $reportTitle, $periode, $status, $errorDetails, $bar, $hourlyAverage, $dailyAverage, $showDetails, $showComments, $showPerfdata, $showTop20SlowTests, $printerFriendlyOutput, $form...
          my ($urlAccessParameters, $periodeMessage);

          if ($periode eq 'D') {
            $periodeMessage = "Day_$arrayDays[$dayReportDayOfWeek]";
            $emailMessage .= " -> Daily\n" if ($debug >= 2);
            $urlAccessParameters = $urlAccessParametersDay if (defined $urlAccessParametersDay);
          } elsif ($periode eq 'W') {
            $periodeMessage = "Week_$weekReportWeek";
            $emailMessage .= " -> Weekly\n" if ($debug >= 2);
            $urlAccessParameters = $urlAccessParametersWeek if (defined $urlAccessParametersWeek);

applications/bin/holidayBundleSetDowntimes.pl  view on Meta::CPAN


my $logger = LOG_init_log4perl ( 'holiday::bundle::set::downtimes', undef, $debug );

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

my ($emailReport, $rvOpen) = init_email_report (*EMAILREPORT, 'holidayBundleSetDowntimes.txt', $debug);

# Init parameters
my ($rv, $dbh, $sth, $sql);

# open connection to database and query data
$rv  = 1;

$dbh = DBI->connect("dbi:mysql:$DATABASE:$SERVERNAMEREADWRITE:$SERVERPORTREADWRITE", "$SERVERUSERREADWRITE", "$SERVERPASSREADWRITE" ) or $rv = DBI_error_trap(*EMAILREPORT, "Cannot connect to the database", \$logger, $debug);

if ($dbh and $rv) {
  my ($catalogID, $holidayBundleID, $holidayBundleName, $holidayID);
  $sql = "select catalogID, holidayBundleID, holidayBundleName, holidayID from $SERVERTABLHOLIDYSBNDL where catalogID='$CATALOGID' and activated = '1' order by holidayBundleName";
  $sth = $dbh->prepare( $sql ) or $rv = DBI_error_trap(*EMAILREPORT, "Cannot dbh->prepare: $sql", \$logger, $debug);
  $sth->execute() or $rv = DBI_error_trap(*EMAILREPORT, "Cannot sth->execute: $sql", \$logger, $debug) if $rv;
  $sth->bind_columns( \$catalogID, \$holidayBundleID, \$holidayBundleName, \$holidayID ) or $rv = DBI_error_trap(*EMAILREPORT, "Cannot sth->bind_columns: $sql", \$logger, $debug) if $rv;

  if ( $rv ) {
    if ( $sth->rows ) {

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

    if ($statusMessage =~ /\+Q4\+/ ) { $break = ($errorMessage) ? '<BR>' : ''; $errorMessage .= $break . 'Q4: LOGIN.'; }
    if ($statusMessage =~ /\+Q5\+/ ) { $break = ($errorMessage) ? '<BR>' : ''; $errorMessage .= $break . 'Q5: SEARCH.'; }
    if ($statusMessage =~ /\+Q6\+/ ) { $break = ($errorMessage) ? '<BR>' : ''; $errorMessage .= $break . 'Q6: DOWNLOAD.'; }
    if ($statusMessage =~ /\+Q7\+/ ) { $break = ($errorMessage) ? '<BR>' : ''; $errorMessage .= $break . 'Q7: LOGOUT.'; }
  # ***************************************************************************
  # Error codes indicate an error with KBO-BCE WI                             *
  # ***************************************************************************
  } elsif ($statusMessage =~ /KBO-BCE WI/ ) {
    if ($statusMessage =~ /\+BIS\+/ )        { $errorMessage = 'Backend KSZ/BCSS not accessible, if needed call \'KSZ/BCSS\''; }
    if ($statusMessage =~ /\+KBO-WI-BIS\+/ ) { $break = ($errorMessage) ? '<BR>' : ''; $errorMessage .= $break . 'KBO-WI-BIS @ ACCENTURE not available, if needed call \'Accenture\''; }
    if ($statusMessage =~ /\+NIS\+/ )        { $break = ($errorMessage) ? '<BR>' : ''; $errorMessage .= $break . 'NIS database @ ACCENTURE not available, if needed call \'Accenture\''; }
    if ($statusMessage =~ /\+KBO-WI-NIS\+/ ) { $break = ($errorMessage) ? '<BR>' : ''; $errorMessage .= $break . 'KBO-WI-NIS @ ACCENTURE not available, if needed call \'Accenture\''; }
    if ($statusMessage =~ /\+RR\+/ )         { $break = ($errorMessage) ? '<BR>' : ''; $errorMessage .= $break . 'RIJKSREGISTER not available, if needed call \'RR/RN\''; }
    if ($statusMessage =~ /\+KBO-WI-RR\+/ )  { $break = ($errorMessage) ? '<BR>' : ''; $errorMessage .= $break . 'KBO-WI-RR @ ACCENTURE not available, if needed call \'Accenture\''; }
    if ($statusMessage =~ /\+KBO\+/ )        { $break = ($errorMessage) ? '<BR>' : ''; $errorMessage .= $break . 'KBO-WI problems, if needed call \'KBO/CBE\''; }
    if ($statusMessage =~ /\+KBO-WI-KBO\+/ ) { $break = ($errorMessage) ? '<BR>' : ''; $errorMessage .= $break . 'KBO-WI-KBO @ ACCENTURE not available, if needed call \'Accenture\''; }

    unless ( $errorMessage ) {
      if ($statusMessage =~ /TOKEN AUTHENTIFICATIE/ ) {
        $errorMessage = 'Problem with \'Authentification Software\' from \'Accenture\', call Accenture';
      } elsif ($statusMessage =~ /Er is een fout voorgekomen/ ) {

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

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

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

	sub _getEventsData {
    my ($catalogID, $uKey, $hash_valueEventsData, $pagedir, $pageset, $htmlTitle, $subTitle, $refresh, $onload, $sessionID, $debug) = @_;

    my $rv  = 1;
    my $dbh = DBI->connect("DBI:mysql:$DATABASE:$SERVERNAMEREADONLY:$SERVERPORTREADONLY", "$SERVERUSERREADONLY", "$SERVERPASSREADONLY") or $rv = error_trap_DBI(*STDOUT, "Cannot connect to the database", $debug, $pagedir, $pageset, $htmlTitle, $subTit...

    if ($dbh and $rv) {
      my $sql = "select SQL_NO_CACHE title, duration, timeslot, endDate, endTime, status, statusMessage, filename from $SERVERTABLEVENTSDISPLAYDT where catalogID = '$catalogID' and uKey = '$uKey' and step <> '0' order by timeslot desc limit 1";
      my $sth = $dbh->prepare( $sql ) or $rv = error_trap_DBI(*STDOUT, "Cannot dbh->prepare: $sql", $debug, $pagedir, $pageset, $htmlTitle, $subTitle, $refresh, $onload, $sessionID);
      $sth->execute or $rv = error_trap_DBI(*STDOUT, "Cannot sth->execute: $sql", $debug, $pagedir, $pageset, $htmlTitle, $subTitle, $refresh, $onload, $sessionID) if $rv;

      if ( $rv ) {
        while ( my $ref = $sth->fetchrow_hashref() ) {
          $$hash_valueEventsData{found}         = 1;
          $$hash_valueEventsData{title}         = $ref->{title}         if ( $ref->{title} );

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


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

sub getTimeperiodRelationshipsSDE {
  my ($serverName, $checklist, $hash_catalogID_uKey_timeperiodID, $debug) = @_;

  my $CARTO_DATABASE = 'carto';
  my $CARTO_TABLE = 'TestRelationships';

  my $rv  = 1;
  my $dbh = DBI->connect("DBI:mysql:$CARTO_DATABASE:$serverName:$SERVERPORTREADWRITE", "$SERVERUSERREADWRITE", "$SERVERPASSREADWRITE") or $rv = errorTrapDBI($checklist, "Cannot connect to the database");

  if ($dbh and $rv) {
    my $sql = "select SQL_NO_CACHE catalogID, uKey, priority, imw_sunday, imw_monday, imw_tuesday, imw_wednesday, imw_thursday, imw_friday, imw_saturday from $CARTO_TABLE";
    print "<", $sql, ">\n" if ($debug);

    my $sth = $dbh->prepare( $sql ) or $rv = errorTrapDBI($checklist, "Cannot dbh->prepare: $sql");
    $sth->execute or $rv = errorTrapDBI($checklist, "Cannot sth->execute: $sql") if $rv;

    if ( $rv ) {
      # (localtime)[6]: weekday Number of days since Sunday (0 - 6)

applications/display.pl  view on Meta::CPAN

  if ($opt_l eq 'F' || $opt_l eq 'T') {
    $lockMySQL = ($opt_l eq 'F') ? 0 : 1;
  } else {
    usage("Invalid lockMySQL: $opt_l\n");
  }
}

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

my ($dchecklist, $dtest, $dfetch, $tinterval, $tgroep, $resultsdir, $ttest, $firstTimeslot, $lastTimeslot, $rvOpen);
my (@fetch, $dstart, $tstart, $start, $step, $names, $data, $rows, $columns, $line, $val, @vals);
my ($command, $tstatus, $tduration, $timeValue, $prevGroep, @multiarrayFullCondensedView, @multiarrayMinimalCondensedView);
my ($rv, $dbh, $sth, $lockString, $findString, $unlockString, $doChecklist, $timeCorrectie, $timeslot);
my ($groupFullView, $groupCondensedView, $emptyFullView, $emptyCondencedView, $emptyMinimalCondencedView, $itemFullCondensedView);
my ($checkOk, $checkSkip, $configNumber, $printCondensedView, $problemSolved, $verifyNumber, $inProgressNumber);
my ($playSoundInProgress, $playSoundPreviousStatus, $playSoundStatus, %tableSoundStatusCache);
my ($prevHour, $currHour, %timeperiodID_days, %catalogID_uKey_timeperiodID) = (-1, -1);

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

my $boolean_daemonQuit    = 0;

applications/htmlroot/cgi-bin/admin/countries.pl  view on Meta::CPAN

my $urlAccessParameters = "pagedir=$pagedir&pageset=$pageset&debug=$debug&CGISESSID=$sessionID&pageNo=$pageNo&pageOffset=$pageOffset&orderBy=$orderBy&action=$action&countryID=$CcountryID&countryName=$CcountryName&activated=$Cactivated";

# Debug information
print "<pre>pagedir       : $pagedir<br>pageset       : $pageset<br>debug         : $debug<br>CGISESSID     : $sessionID<br>page no       : $pageNo<br>page offset   : $pageOffset<br>order by      : $orderBy<br>action        : $action<br>country ID   ...

if ( defined $sessionID and ! defined $errorUserAccessControl ) {
  my ($matchingCountries, $navigationBar);

  my $urlWithAccessParameters = $ENV{SCRIPT_NAME} . "?pagedir=$pagedir&amp;pageset=$pageset&amp;debug=$debug&amp;CGISESSID=$sessionID&amp;pageNo=$pageNo&amp;pageOffset=$pageOffset";

  # open connection to database and query data
  $rv  = 1;

  $dbh = DBI->connect("dbi:mysql:$DATABASE:$SERVERNAMEREADWRITE:$SERVERPORTREADWRITE", "$SERVERUSERREADWRITE", "$SERVERPASSREADWRITE" ) or $rv = error_trap_DBI(*STDOUT, "Cannot connect to the database", $debug, $pagedir, $pageset, $htmlTitle, $subTit...

  if ($dbh and $rv) {
    $formDisabledAll = $formDisabledPrimaryKey = '';

    if ($action eq 'duplicateView' or $action eq 'insertView') {
      $htmlTitle    = "Insert Country";
      $submitButton = "Insert";
      $nextAction   = "insert" if ($rv);
    } elsif ($action eq 'insert') {
      $htmlTitle    = "Check if Country $CcountryID exist before to insert";

applications/htmlroot/cgi-bin/admin/languages.pl  view on Meta::CPAN

my $urlAccessParameters = "pagedir=$pagedir&pageset=$pageset&debug=$debug&CGISESSID=$sessionID&pageNo=$pageNo&pageOffset=$pageOffset&orderBy=$orderBy&action=$action&keyLanguage=$CkeyLanguage&languageName=$ClanguageName&languageFamily=$ClanguageFamily...

# Debug information
print "<pre>pagedir       : $pagedir<br>pageset       : $pageset<br>debug         : $debug<br>CGISESSID     : $sessionID<br>page no       : $pageNo<br>page offset   : $pageOffset<br>order by      : $orderBy<br>action        : $action<br>unique key   ...

if ( defined $sessionID and ! defined $errorUserAccessControl ) {
  my ($matchingLanguages, $navigationBar);

  my $urlWithAccessParameters = $ENV{SCRIPT_NAME} . "?pagedir=$pagedir&amp;pageset=$pageset&amp;debug=$debug&amp;CGISESSID=$sessionID&amp;pageNo=$pageNo&amp;pageOffset=$pageOffset";

  # open connection to database and query data
  $rv  = 1;

  $dbh = DBI->connect("dbi:mysql:$DATABASE:$SERVERNAMEREADWRITE:$SERVERPORTREADWRITE", "$SERVERUSERREADWRITE", "$SERVERPASSREADWRITE" ) or $rv = error_trap_DBI(*STDOUT, "Cannot connect to the database", $debug, $pagedir, $pageset, $htmlTitle, $subTit...

  if ($dbh and $rv) {
    $formDisabledAll = $formDisabledPrimaryKey = '';

    if ($action eq 'duplicateView' or $action eq 'insertView') {
      $htmlTitle    = "Insert Language";
      $submitButton = "Insert";
      $nextAction   = "insert" if ($rv);
    } elsif ($action eq 'insert') {
      $htmlTitle    = "Check if Language $CkeyLanguage exist before to insert";

 view all matches for this distribution
 view release on metacpan -  search on metacpan

( run in 1.616 second using v1.00-cache-2.02-grep-82fe00e-cpan-4673cadbf75 )