ASNMTAP

 view release on metacpan or  search on metacpan

AUTHORS  view on Meta::CPAN

Yves Van den Hove <yvdhove@users.sourceforge.net>
  * htmlToPdf.pl
    FIX for 1768193 PDF issues with Adobe Acrobat 8
  * detailedStatisticsReportGenerationAndCompareResponsetimeTrends.pl
    FIX Use of uninitialized value in concatenation (.) or string at line 333
 

# TESTERS - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Testers wanted


# DOC WRITERS - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Doc writers wanted


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

Changes  view on Meta::CPAN

                                   - ALTER TABLE `events_2008_Q3` ENGINE=MERGE UNION=(`events_2008_07`, `events_2008_08`, `events_2008_09`) INSERT_METHOD=LAST;

                                   - DROP TABLE `events_2008_Q4`;
                                   - CREATE TABLE IF NOT EXISTS `events_2008_Q4` LIKE `events_2008_10`;
                                   - ALTER TABLE `events_2008_Q4` ENGINE=MERGE UNION=(`events_2008_10`, `events_2008_11`, `events_2008_12`) INSERT_METHOD=LAST;

                                   - ALTER TABLE `comments` ADD COLUMN `instability` tinyint(1) NOT NULL default '0' AFTER `remoteUser`; 
                                   - ALTER TABLE `comments_2008` ADD COLUMN `instability` tinyint(1) NOT NULL default '0' AFTER `remoteUser`; 
                               - SNMPTT making Weblogic 10 compatible: 
							     - /plugins/snmptt/
                                   - FIX create_ASNMTAP_weblogic_configuration_for_SNMP.pl: my $pluginTest = 'check_SNMPTT_weblogic.pl';
                                   - UPDATE create_ASNMTAP_weblogic_configuration_for_SNMP.pl
                                   - UPDATE create_NCPL_weblogic_configuration_for_SNMP.pl
                                   - UPDATE create_weblogic_configuration_database_with_SNMP.pl
                                   - UPDATE create_weblogic_configuration_for_SNMPTT.pl
							     - /plugins/templates/snmptt/
                                   - UPDATE check_SNMPTT_weblogic.pl
                                   - UPDATE snmptt-bea-weblogic.conf
                                 - UPDATE create_weblogic_configuration_database_with_SNMP-3.000.019.SQL
                                   - PRIMARY KEY + `trapMBeanType_MATCH`
                                 - UPDATE create_weblogic_configuration_database_with_SNMP-3.000.019_mysql-v5.0.x.SQL

Changes  view on Meta::CPAN

                               - version update Getopt::Long:                  2.37
                               - version update HTTP::Daemon::SSL:             1.04
                               - version update IO::CaptureOutput:             1.0801
                               - version update IO::Socket::SSL:               1.13
                               - version added  IO::String                     1.08
                               - version update Mail::POP3Client:              2.18
                               - version update Net::IMAP::Simple:             1.17
                               - version update Net::SSLeay:                   1.32
                               - version update Proc::ProcessTable:            0.42
                               - version update SOAP::Lite:                    0.710.05
                               - version update Test::Builder::Tester:         1.13
                               - version update Test::Simple:                  0.80
                               - version update URI:                           1.36
                               - version update XML::LibXML:                   1.66
                               - version update XML::Parser:                   2.36
                               - version update XML::Simple:                   2.18
                               ASNMTAP::Asnmtap
                               - Making Solaris 10 zone compatible
                               - UPDATE: all *.t test files
                               - UPDATE: replace '/cgi-bin' with '/asnmtap/cgi-bin'
                               - UPDATE: added <COMMAND> variable DIFF to Asnmtap.cnf
                               - UPDATE: replace '$Rsync ...' with '$Rsync --rsync-path=$RsyncPath ...'

Changes  view on Meta::CPAN

                               - version update Getopt::Long 2.35
                               - version update IO 1.23
                               - NEW IO::Socket::SSL 1.01
                               - version update MIME::Tools 5.420
                               - version update NetAddr::IP 4.004
                               - version update Net::FTP 2.75
                               - version update Net::Ifconfig::Wrapper 0.09
                               - NEW Net::SSLeay 1.30
                               - version update Proc::ProcessTable 0.41
                               - version update Sys::Hostname::Long 1.4
                               - NEW Test::Pod::Coverage 1.08
                               - version update Test::Simple 0.47
                               - version update Time::HiRes 1.94
                               - version update Time::Local 1.13
                               - version update XML::LibXML 1.61
                               - version update XML::Simple 2.16
                               - install 'ASNMTAP' with make install
                                 PM - This hash will contain a list of all ASNMTAP files
                               MANIFEST.SKIP
                               - A file full of regular expressions to exclude when using 'make manifest' to generate the MANIFEST.
                               - used by 'make manifest' to build the file MANIFEST
                               - also used by 'make skipcheck' & 'make distcheck'
                               Shared PERL & SSL support
                               - added environment variable PERL5LIB, MANPATH & LD_LIBRARY_PATH to Asnmtap.cnf
                               Windows Internet Explorer 7.0
                               - tested and did look OK
                               ASNMTAP::Asnmtap
                               - replace `::VERSION = 3.000.xxx` with `::VERSION = do { my @r = (q$Revision: 3.000.012$ =~ /\d+/g); sprintf "%d."."%03d" x $#r, @r };`
                               - replace `my $version = '3.000.xxx'` with `my $VERSION = do { my @r = (q$Revision: 3.000.012$ =~ /\d+/g); sprintf "%d."."%03d" x $#r, @r };`
                               ASNMTAP::Asnmtap::Applications
                               - NEW purge_table.pl
                               - add Environment after the Plugin Titles
                               - add our %ENVIRONMENT = ('P'=>'Production', 'S'=>'Simulation', 'A'=>'Acceptation', 'T'=>'Test', 'D'=>'Development', 'L'=>'Local');
                               - used into display.pl, comments.pl, contact.pl, getHelpPlugin.pl, info.pl, perfparse.pl, runCmdOnDemand.pl & users.pl
                               - Applications.pod updated regarding 'perl Makefile.PL INSTALL_BASE=/opt/asnmtap/cpan-shared'
                               ASNMTAP::Asnmtap::Plugins
                               - FIX replace: _programGetOptions  => [..., 'password|passwd|p=s', ...],
                                     with   : _programGetOptions  => [..., 'password|p|passwd=s', ...],
                               - FIX replace: push ( @{ $_[0]->{_programGetOptions} }, 'status|S:s', 'asnmtapEnv|A:s', 'onDemand|O:s', 'logging|L:s', 'debugfile|dumphttp|httpdump|D:s', 'debug|d:s' );
                                     with   : push ( @{ $_[0]->{_programGetOptions} }, 'status|S:s', 'asnmtapEnv|A:s', 'onDemand|O:s', 'logging|L:s', 'debugfile|D|dumphttp|httpdump:s', 'debug|d:s' );
                               - check_memory-top.pl, now also Solaris 10 compatible
                               - FIX '<environment>PROD</environment>' into check_template-mail-xml.pl & check_template-mail-xml-fingerprint-xml.pl
                               - replaced 'Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; ASNMTAP; U;' with 'Mozilla/4.7 (compatible; ASNMTAP; U;'
                               - NEW $ENV{HTTPS_VERSION} for v2, v3 and v23
                               ASNMTAP::Asnmtap::Plugins::Nagios
                               - NEW check_nagios-comments-cleanup.pl
                               - NEW EPN (Embedded Perl Nagios) compatible
                               ASNMTAP::Asnmtap::Plugins::NPTest
                               - upgrade van version NPTest v1.11 to v1.13
                               - replace NPTest->testCmd with ASNMTAP::Asnmtap::Plugins::NPTest->testCmd
                               ASNMTAP::Asnmtap::Plugins::SOAP
                               - add $SOAP::Constants::PATCH_HTTP_KEEPALIVE
                               - add ws-security through WSRF::Lite
                               ASNMTAP::Asnmtap::Plugins::WebTransact
                               - based on 'Nagios::WebTransact' v0.14.1 & v0.16 from Stanley Hopcroft [Stanley.Hopcroft@IPAustralia.Gov.AU]
             ATTENTION   -->   asnmtap-3.000.012.sql
                               - NEW table `environment`
                               - add `userPassword` varchar(15) NOT NULL default '' at table reports
                               - remove `reportTitle` varchar(100) NOT NULL default '' from table reports
                               - add `downtimeScheduling` tinyint(1) NOT NULL default '1' and `generatedReports` tinyint(1) NOT NULL default '0' at table users

Changes  view on Meta::CPAN

                                   `step` smallint(6) NOT NULL default '0',
                                   ...


Version 3.000.009, 2006/06/01, ASNMTAP::Asnmtap::Plugins::WebTransact
                               - RFC 1738 optimalisations
                               - add '500 SSL negotiation failed'
                               - add Perfdata_Label => 'IMAGE URL' to _download_images()
                               ASNMTAP::Asnmtap::Applications
                               - email SUBJECT changed to Display/Collector for the 'Application Monitoring'@HOSTNAME: ...
                               NPTest, v1.11
                               - Will die if signal received from a testCmd
                               archiver.pl
                               - FIX First day current week epoch date
                               command.pl
                               - FIX regarding date.utc() - The month (0=Jan - 11=Dec)
                                 - replaced 'suspentionDate.substring(5, 7);' with 'suspentionDate.substring(5, 7) - 1;'
                               generateCollectorDaemonSchedulingReports.pl
                               - NEW, generating automatically Collector Daemon Scheduling PDF Reports
                               - http://asnmtap.citap.be/results/_ASNMTAP/reports/yyyymmdd-collectorDaemonSchedulingReports.pl-_ASNMTAP-FQDN-Daily.pdf
                               database asnmtap, table plugins and crontab

Changes  view on Meta::CPAN

- check_memory-free.pl
- check_memory-top.pl
- check_nagios-comments-cleanup.pl
- check_snmptt_traps.pl
- check_swap.pl
- check_swap-allocated.pl

Getopt::Long::Configure ('bundling', 'pass_through')
- 'pass_through' added

Tested on:
- Cygwin
- Solaris 2.8-2.9
- Freebsd 6.1
- Linux 2.4.21-37.EL (Centos 3.x)
- Linux 2.6.9-22.0.2.EL (Centos 4.x)


Version 3.000.005, 2006/02/26

- check_MySQL-database-replication.pl (MySQL database replication)

Changes  view on Meta::CPAN


  Windows: Win32::SerialPort 0.19
           Win32::API 0.41
           Win32::RASE 1.01


Version 3.000.004, 2006/02/12, ASNMTAP CPAN module ASNMTAP::Asnmtap::Plugins::Mail added

Making ASNMTAP CPAN module perl 5.8.5 and 5.8.6 compatible

Tested on:
- Cygwin
- Solaris 5.9
- Linux 2.4.21-37.EL (Centos 3.x)
- Linux 2.6.9-22.0.2.EL (Centos 4.x)

Makefile.PL
- many dependencies checks added


Version 3.000.003, 2006/02/03, ASNMTAP CPAN module

MANIFEST  view on Meta::CPAN

lib/ASNMTAP/Asnmtap/Plugins.pm
lib/ASNMTAP/Asnmtap/Plugins.pod
lib/ASNMTAP/Asnmtap/Plugins/IO.pm
lib/ASNMTAP/Asnmtap/Plugins/IO.pod
lib/ASNMTAP/Asnmtap/Plugins/Mail.pm
lib/ASNMTAP/Asnmtap/Plugins/Mail.pod
lib/ASNMTAP/Asnmtap/Plugins/Modem.pm
lib/ASNMTAP/Asnmtap/Plugins/Modem.pod
lib/ASNMTAP/Asnmtap/Plugins/Nagios.pm
lib/ASNMTAP/Asnmtap/Plugins/Nagios.pod
lib/ASNMTAP/Asnmtap/Plugins/NPTest.pm
lib/ASNMTAP/Asnmtap/Plugins/SOAP.pm
lib/ASNMTAP/Asnmtap/Plugins/SOAP.pod
lib/ASNMTAP/Asnmtap/Plugins/WebTransact.pm
lib/ASNMTAP/Asnmtap/Plugins/WebTransact.pod
lib/ASNMTAP/Asnmtap/Plugins/XML.pm
lib/ASNMTAP/Asnmtap/Plugins/XML.pod

t/README											How to run and set up tests
t/TEST												Run tests

MANIFEST  view on Meta::CPAN

plugins/templates/xml/FingerprintEmail-1.0.xml
plugins/templates/xml/Monitoring-1.0.xml
plugins/templates/xml/Monitoring-1.0-doNotValidate.xml
plugins/templates/xml/Monitoring-1.0-errorParsing.xml
plugins/templates/xml/Monitoring-1.1.xml
plugins/templates/xml/Monitoring-1.1-doNotValidate.xml
plugins/templates/xml/Monitoring-1.1-errorParsing.xml
plugins/templates/xml/Monitoring-1.2.xml
plugins/templates/xml/Monitoring-1.2-doNotValidate.xml
plugins/templates/xml/Monitoring-1.2-errorParsing.xml
plugins/templates/xml/ServletTestRunner-FailureError.xml
plugins/templates/xml/ServletTestRunner.xml

plugins/templates/ssl/crt/alex-peeters.crt
plugins/templates/ssl/crt/server-ca.crt

plugins/templates/ssl/key/alex-peeters-nopass.key
plugins/templates/ssl/key/alex-peeters.key
plugins/templates/ssl/key/server-ca.key

etc/chatscripts/ASNMTAP
etc/ppp/pap-secrets

META.yml  view on Meta::CPAN

    Mail::POP3Client:     2.18
    Mail::Sendmail:       0.79
    MIME::Base64:         3.08
    MIME::Tools:          5.420
    Net::FTP:             2.75
    Net::Ifconfig::Wrapper:  0.09
    Net::IMAP::Simple:    1.17
    Net::SSLeay:          1.32
    SOAP::Lite:           0.710.08
    Sys::Hostname::Long:  1.4
    Test::Pod::Coverage:  1.08
    Test::Simple:         0.80
    Text::CSV:            1.16
    Time::HiRes:          1.9705
    Time::Local:          1.17
    URI:                  1.36
    WSRF::Lite:           0.8.2.7
    XML::CanonicalizeXML:  0.03
    XML::DOM:             1.44
    XML::LibXML:          1.70
    XML::Parser:          2.36
    XML::Simple:          2.18

Makefile.PL  view on Meta::CPAN

$PM{'lib/ASNMTAP/Asnmtap/Plugins.pm'}                 = '$(INST_LIBDIR)/ASNMTAP/Asnmtap/Plugins.pm';
$PM{'lib/ASNMTAP/Asnmtap/Plugins.pod'}                = '$(INST_LIBDIR)/ASNMTAP/Asnmtap/Plugins.pod';
$PM{'lib/ASNMTAP/Asnmtap/Plugins/IO.pm'}              = '$(INST_LIBDIR)/ASNMTAP/Asnmtap/Plugins/IO.pm';
$PM{'lib/ASNMTAP/Asnmtap/Plugins/IO.pod'}             = '$(INST_LIBDIR)/ASNMTAP/Asnmtap/Plugins/IO.pod';
$PM{'lib/ASNMTAP/Asnmtap/Plugins/Mail.pm'}            = '$(INST_LIBDIR)/ASNMTAP/Asnmtap/Plugins/Mail.pm';
$PM{'lib/ASNMTAP/Asnmtap/Plugins/Mail.pod'}           = '$(INST_LIBDIR)/ASNMTAP/Asnmtap/Plugins/Mail.pod';
$PM{'lib/ASNMTAP/Asnmtap/Plugins/Modem.pm'}           = '$(INST_LIBDIR)/ASNMTAP/Asnmtap/Plugins/Modem.pm';
$PM{'lib/ASNMTAP/Asnmtap/Plugins/Modem.pod'}          = '$(INST_LIBDIR)/ASNMTAP/Asnmtap/Plugins/Modem.pod';
$PM{'lib/ASNMTAP/Asnmtap/Plugins/Nagios.pm'}          = '$(INST_LIBDIR)/ASNMTAP/Asnmtap/Plugins/Nagios.pm';
$PM{'lib/ASNMTAP/Asnmtap/Plugins/Nagios.pod'}         = '$(INST_LIBDIR)/ASNMTAP/Asnmtap/Plugins/Nagios.pod';
$PM{'lib/ASNMTAP/Asnmtap/Plugins/NPTest.pm'}          = '$(INST_LIBDIR)/ASNMTAP/Asnmtap/Plugins/NPTest.pm';
$PM{'lib/ASNMTAP/Asnmtap/Plugins/SOAP.pm'}            = '$(INST_LIBDIR)/ASNMTAP/Asnmtap/Plugins/SOAP.pm';
$PM{'lib/ASNMTAP/Asnmtap/Plugins/SOAP.pod'}           = '$(INST_LIBDIR)/ASNMTAP/Asnmtap/Plugins/SOAP.pod';
$PM{'lib/ASNMTAP/Asnmtap/Plugins/WebTransact.pm'}     = '$(INST_LIBDIR)/ASNMTAP/Asnmtap/Plugins/WebTransact.pm';
$PM{'lib/ASNMTAP/Asnmtap/Plugins/WebTransact.pod'}    = '$(INST_LIBDIR)/ASNMTAP/Asnmtap/Plugins/WebTransact.pod';
$PM{'lib/ASNMTAP/Asnmtap/Plugins/XML.pod'}            = '$(INST_LIBDIR)/ASNMTAP/Asnmtap/Plugins/XML.pod';
$PM{'lib/ASNMTAP/Asnmtap/Plugins/XML.pm'}             = '$(INST_LIBDIR)/ASNMTAP/Asnmtap/Plugins/XML.pm';

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

my @man3pods = qw (

Makefile.PL  view on Meta::CPAN

  Asnmtap/Plugins/Nagios
  Asnmtap/Plugins/SOAP
  Asnmtap/Plugins/WebTransact
  Asnmtap/Plugins/XML
);

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

my @prerequisites = (
# [ '<level>', '<feature>',                '<installed module>',                  <dependency hash>, <install by default: 0 = no, 1 = yes, 2 = always, 3 = reserved and 4 = info>, [[<files>, <x|r>], ...] ];
  [ '*00',     'Package ASNMTAP::Asnmtap', 'ASNMTAP::Asnmtap',                    { 'CPAN' => '1.9205', 'CPANPLUS' => '0.84', 'Config::General' => '2.38', 'Config::General::Interpolated' => '2.07', 'Data::Dumper' => '2.121','Dumpvalue' => '1.11', 'Ge...
   [
    [ 'Changes',                        'r' ],
    [ 'AUTHORS',                        'r' ],
    [ 'INSTALL',                        'r' ],
    [ 'README',                         'r' ],
    [ 'Asnmtap.cnf',                    'R' ],
    [ 'log',                            'd' ],
    [ 'pid',                            'd' ],
   ]
  ],

Makefile.PL  view on Meta::CPAN

    [ '/etc/ppp/peers/ASNMTAP',   'R' ],
    [ '/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 = ();

README  view on Meta::CPAN


This module requires these other modules and libraries:

Base package ASNMTAP::Asnmtap
- Config::General:               2.33
- Config::General::Interpolated: 2.06
- Data::Dumper:                  2.12
- Dumpvalue:                     1.11
- Getopt::Long:                  2.36
- IO::CaptureOutput:             1.03
- Test::Simple:                  0.65
- Time::Local:                   1.17

ASNMTAP::Time
- Date::Calc:                    5.4
- Time::Local:                   1.17

ASNMTAP::Asnmtap::Applications
- ASNMTAP::Time:
- ASNMTAP::Asnmtap:
- Carp:

README  view on Meta::CPAN

- MIME::Base64:                  3.01
- Net::FTP:                      2.58
- URI:                           1.35

ASNMTAP::Asnmtap::Plugins::XML
- ASNMTAP::Asnmtap::Plugins:
- XML::Parser:                   2.34
- XML::LibXML:                   1.63
- XML::Simple:                   2.14

ASNMTAP::Asnmtap::Plugins::NPTest
- Cwd:                           3.25
- Data::Dumper:                  2.12
- File::Basename:                2.73


HOWTO:

1) How can i unbless a data structure:

use Data::Structure::Util qw(unbless);
unbless($WSListResults);

Dependencies Data::Structure::Util
- Clone
- File::Find::Rule
- Test::Builder::Tester
- Test::Pod


# COPYRIGHT AND LICENCE - - - - - - - - - - - - - - - - - - - - - - - - -

COPYRIGHT
© Copyright 2000-2007 by Alex Peeters [alex.peeters@citap.be]

Version 3.000.004, 2006/02/12, ASNMTAP CPAN module ASNMTAP::Asnmtap::Plugins::Mail and  ASNMTAP::Asnmtap::Plugins::Modem

Version 3.000.003, 2006/02/03, ASNMTAP CPAN module

applications/archive.pl  view on Meta::CPAN


      unless ( defined $uKey ) {
        $uKey = $catalogID;
        $catalogID = $CATALOGID;
        $catalogID_uKey = $catalogID .'_'. $uKey unless ( $catalogID eq 'CID' );
      }

      my ( $tWeek, $tYear ) = get_week('yesterday');
      $weekFilename = get_year('yesterday') ."w$tWeek-$command-$catalogID_uKey-csv-week.txt";
      if (-e "$path/$weekFilename") { unlink ($path.'/'.$weekFilename); }
      print "Test          : <$dtest>\n" if ($debug);

      foreach $filename (@files) {
        print "Filename      : <$filename>\n" if ($debug >= 2);
        catAllCsvFilesYesterdayWeek ($firstDayOfWeekEpoch, $yesterdayEpoch, $catalogID_uKey, $command, $path, $weekFilename, $filename);
        removeAllNokgzipCsvSqlErrorWeekFilesOlderThenAndMoveToBackupShare ($gzipEpoch, $removeAllNokEpoch, $removeGzipEpoch, $removeDebugEpoch, $removeWeeksEpoch, $catalogID_uKey, $command, $path, $filename);
      }
    }
  }
}

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


  # 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/generateReports.pl  view on Meta::CPAN

            $urlAccessParameters .= "&detailed=on";
            $urlAccessParameters .= "&statuspie=on" if($status);
            $urlAccessParameters .= "&errorpie=on" if($errorDetails);
            $urlAccessParameters .= "&bar=on" if($bar);
            $urlAccessParameters .= "&hourlyAvg=on" if($hourlyAverage);
            $urlAccessParameters .= "&dailyAvg=on" if($dailyAverage);
            $urlAccessParameters .= "&timeperiodID=$timeperiodID";
            $urlAccessParameters .= "&details=on" if($showDetails);
            $urlAccessParameters .= "&comments=on" if($showComments);
            $urlAccessParameters .= "&perfdata=on" if($showPerfdata);
            $urlAccessParameters .= "&topx=on" if($showTop20SlowTests);
            $urlAccessParameters .= "&pf=on" if($printerFriendlyOutput);

            $sql = "select test, resultsdir from $SERVERTABLPLUGINS where catalogID = '$catalogID' and ukey = '$uKey' order by uKey";
            my $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;

            if ( $rv ) {
              ($test, $resultsdir) = $sth->fetchrow_array() or $rv = DBI_error_trap(*EMAILREPORT, "Cannot sth->execute: $sql", \$logger, $debug) if $rv;
              $sth->finish() or $rv = DBI_error_trap(*EMAILREPORT, "Cannot sth->execute: $sql", \$logger, $debug);
            }

applications/collector-test.pl  view on Meta::CPAN

                $queryMySQL = 1;
                printDebugAll ("no TEST: call_system <$catalogID_uniqueKey><$command>") if ($debug eq 'T');
              }
            }

            $action = call_system ($asnmtapEnv, $currentDate, $catalogID_uniqueKey, $catalogID, $uniqueKey, $resultsdir, $title, $command, $status, int($tinterval), $instability, $persistent, $downtime, $debug, $logging, $tlogging, $httpdump, $dumpht...
          }
        }

        if ($doOffline or $downtime) {
          print "Write 'Offline/No Test' status to mysql databases on: ", get_csvfiletime(), "\n" if ($debug eq 'T');

          my ($startDate, $startTime, $endDate, $endTime, $msgCommand);
          $startDate = get_csvfiledate();
          $startTime = get_csvfiletime();
          $endDate   = $startDate;
          $endTime   = $startTime;
          ($msgCommand, undef) = split(/\.pl/, $command);

          my $insertData = 1;
          my $status = 'OFFLINE';

applications/collector-test.pl  view on Meta::CPAN

  my ($collectorlist, $error_message, $logger, $debug) = @_;

  print $collectorlist, "\n", $error_message, "\nERROR: $DBI::err ($DBI::errstr)\n";
  $$logger->error("$collectorlist:\n" .$error_message. "\nERROR: $DBI::err ($DBI::errstr)") if ( defined $$logger and $$logger->is_error() );
  return 0;
}

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

sub graphEntryDBI {
  my ($catalogID, $uniqueKey, $title, $environment, $dbiFilename, $interval, $limitTest, $xLabelStep, $withBorder, $markOrZone, $yMarkValue, $xRealtime, $debug) = @_;

  $title .= ' ('. $ENVIRONMENT{$environment} .')' if (defined $environment);
  $title .= ' from '. $catalogID;

  # $limitTest -> 241: (120*2.0)+1, x = 2.0 -> $xLabelStep = 6 * x -> 12
  #               181: (120*1.5)+1, x = 1.5 -> $xLabelStep = 6 * x ->  9
  #               121: (120*1.0)+1, x = 1.0 -> $xLabelStep = 6 * x ->  6

  my $width      = 893;
  my $hight      = 558;
  my $xOffset    = 74;
  my $yOffset    = 28;
  my $yMarkColor = 0xFFFFDC;
  my $background = 0xF7F7F7;

  print "Generating RRD alike graph\n" if ($debug eq 'T');

  my (@dataOK, @dataCritical, @dataWarning, @dataUnknown, @dataNoTest, @dataOffline, @RRDlabels);
  my ($step, $lastTimeslot, $firstTimeslot, $duration, $startTime, $status, $timeslot, $findString);

  $step          = $interval * 60;
  $lastTimeslot  = timelocal (0, (localtime)[1,2,3,4,5]);
  $firstTimeslot = $lastTimeslot - ($step * ($limitTest));
  $findString    = "select SQL_NO_CACHE duration, startTime, status, timeslot from $SERVERTABLEVENTS force index (uKey) where catalogID = '$catalogID' and uKey = '$uniqueKey' and step <> '0' and (timeslot between '$firstTimeslot' and '$lastTimeslot')...
  print "$findString\n" if ($debug eq 'T');

  # data en labels in array zetten
  my ($counter, $seconden, $ttimeslot);

  for ( $counter = 0; $counter < $limitTest; $counter++) {
    push (@dataOK,       "0");
    push (@dataWarning,  "0");
    push (@dataCritical, "0");
    push (@dataUnknown,  "0");
    push (@dataNoTest,   "0");
    push (@dataOffline,  "0");
    push (@RRDlabels,    " ");
  }

  # db connect & sql query
  my ($dbh, $rv, $alarmMessage) = DBI_connect ( $DATABASE, $serverName, $SERVERPORTREADWRITE, $SERVERUSERREADWRITE, $SERVERPASSREADWRITE, $alarm, \&errorTrapDBIgraphEntry, ["Cannot connect to the database"], \$logger, $debug, $boolean_debug_all );

  if ($dbh and $rv) {
    my $sth = $dbh->prepare( $findString ) or $rv = errorTrapDBIgraphEntry("Cannot dbh->prepare: $findString", \$logger, $debug);
    ($rv, $alarmMessage) = DBI_execute ($rv, \$sth, $alarm, \&errorTrapDBIgraphEntry, ["Cannot sth->execute: $findString"], \$logger, $debug);

applications/collector-test.pl  view on Meta::CPAN


      unless ( $rv ) {
        $title .= " - Cannot sth->bind_columns";
      } else {
        $counter = 0;
        my $limitTrendline = ($yMarkValue) ? $yMarkValue * 2.5 : 9000;

        while( $sth->fetch() ) {
          $seconden  = int(substr($duration, 6, 2)) + int(substr($duration, 3, 2)*60) + int(substr($duration, 0, 2)*3600);
          $seconden += 0.5 if ($seconden == 0); # correction for to fast testresults
          $ttimeslot = abs((($lastTimeslot - $timeslot) / $step) - $limitTest);

          if ($ttimeslot >= 0) {
            $status = 'UNKNOWN' if ($status eq '<NIHIL>');

      	    if ($status eq 'OK') {
              $dataOK[$ttimeslot] = ($seconden < $limitTrendline) ? $seconden : $limitTrendline;
            } elsif ($status eq 'CRITICAL') {
              $dataCritical[$ttimeslot] = '-5';
            } elsif ($status eq 'WARNING'){
              $dataWarning[$ttimeslot]  = '-5';
            } elsif ($status eq 'UNKNOWN'){
              $dataUnknown[$ttimeslot]  = '-5';
            } elsif ($status eq 'NO TEST') {
              $dataNoTest[$ttimeslot]   = '-5';
            } elsif ($status eq 'OFFLINE') {
              $dataOffline[$ttimeslot]  = '-5';
            }
          }

  	      $RRDlabels[int($limitTest - $counter - 1)] = substr($startTime, 0, 5) unless ( $counter % $xLabelStep );
          $counter++;
        }
      }

      $sth->finish() or $rv = errorTrapDBIgraphEntry("Cannot sth->finish: $findString", \$logger, $debug);
	}

    $dbh->disconnect or $rv = errorTrapDBIgraphEntry("Sorry, the database was unable to add your entry.", \$logger, $debug);
  } else {
    $title .= " - DBI_connect - Cannot connect to the database - alarm: $alarm - alarmMessage: $alarmMessage";

applications/collector-test.pl  view on Meta::CPAN

  my $c = new XYChart($width, $hight, $background, 0x0, 0);

  # Set the plotarea at (xOffset, yOffset) and of size $width - 95 x $hight - 78 pixels, with white background. Set border and grid line colors.
  $c->setPlotArea($xOffset, $yOffset, $width - 95, $hight - 78, 0xffffff, -1, 0xa08040, $c->dashLineColor(0x0, 0x0101), $c->dashLineColor(0x0, 0x0101))->setGridWidth(1);

  # Add a title box to the chart using 10 pts Arial Bold Italic font. The text is white (0x000000)
  $c->addText($width/2, 14, "$title", "arialbi.ttf", 10, 0x000000, 5, 0);

  # Set labels on the x axis
  unless ( $xRealtime ) {
    for ($counter = 0; $counter < $limitTest; $counter += $xLabelStep) {
      $RRDlabels[int($limitTest - $counter - 1)] = substr(scalar(localtime(($lastTimeslot - ($step * ($counter))))), 11, 5); 
    }
  }

  $c->xAxis()->setLabels(\@RRDlabels);

  for ($counter = 0; $counter < $limitTest - $xLabelStep; $counter += $xLabelStep) {
    my $labelStep = $xLabelStep / 3;
    $c->xAxis()->addMark($counter + $labelStep, $c->dashLineColor(0x0, 0x103))->setDrawOnTop(0);
    $c->xAxis()->addMark($counter + ($labelStep * 2), $c->dashLineColor(0x0, 0x103))->setDrawOnTop(0);
  }

  # Set labels on the y axis
  $c->yAxis()->setLabelFormat("{value|2,.}");

  # Add a stacked bar layer to the chart
  my $layer = $c->addBarLayer2($perlchartdir::Stack);

applications/collector-test.pl  view on Meta::CPAN


    $layer->addDataSet(\@dataOK, $layer->yZoneColor($yMarkValue, $COLORSRRD {OK}, $COLORSRRD {TRENDLINE}), " Duration");
  } else {
	$c->yAxis()->addZone(0, -6, $yMarkColor) unless ( $markOrZone );
    $layer->addDataSet(\@dataOK, $COLORSRRD {OK}, " Duration");
  }

  $layer->addDataSet(\@dataWarning,  $COLORSRRD {WARNING},   " Warning");
  $layer->addDataSet(\@dataCritical, $COLORSRRD {CRITICAL},  " Critical");
  $layer->addDataSet(\@dataUnknown,  $COLORSRRD {UNKNOWN},   " Unknown");
  $layer->addDataSet(\@dataNoTest,   $COLORSRRD {"NO TEST"}, " No test");
  $layer->addDataSet(\@dataOffline,  $COLORSRRD {OFFLINE},   " Offline");

  # Set the sub-bar gap to 0, so there is no gap between stacked bars with a group
  $layer->setBarGap(-1.7E-100, 0);

  # Set the bar border to transparent
  if ($withBorder) {
    $layer->setBorderColor(0xF0F0F0);
  } else {
    $layer->setBorderColor($perlchartdir::Transparent);

applications/collector.pl  view on Meta::CPAN

                $queryMySQL = 1;
                printDebugAll ("no TEST: call_system <$catalogID_uniqueKey><$command>") if ($debug eq 'T');
              }
            }

            $action = call_system ($asnmtapEnv, $currentDate, $catalogID_uniqueKey, $catalogID, $uniqueKey, $resultsdir, $title, $command, $status, int($tinterval), $instability, $persistent, $downtime, $debug, $logging, $tlogging, $httpdump, $dumpht...
          }
        }

        if ($doOffline or $downtime) {
          print "Write 'Offline/No Test' status to mysql databases on: ", get_csvfiletime(), "\n" if ($debug eq 'T');

          my ($startDate, $startTime, $endDate, $endTime, $msgCommand);
          $startDate = get_csvfiledate();
          $startTime = get_csvfiletime();
          $endDate   = $startDate;
          $endTime   = $startTime;
          ($msgCommand, undef) = split(/\.pl/, $command);

          my $insertData = 1;
          my $status = 'OFFLINE';

applications/collector.pl  view on Meta::CPAN

  my ($collectorlist, $error_message, $logger, $debug) = @_;

  print $collectorlist, "\n", $error_message, "\nERROR: $DBI::err ($DBI::errstr)\n";
  $$logger->error("$collectorlist:\n" .$error_message. "\nERROR: $DBI::err ($DBI::errstr)") if ( defined $$logger and $$logger->is_error() );
  return 0;
}

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

sub graphEntryDBI {
  my ($catalogID, $uniqueKey, $title, $environment, $dbiFilename, $interval, $limitTest, $xLabelStep, $withBorder, $markOrZone, $yMarkValue, $xRealtime, $debug) = @_;

  $title .= ' ('. $ENVIRONMENT{$environment} .')' if (defined $environment);
  $title .= ' from '. $catalogID;

  # $limitTest -> 241: (120*2.0)+1, x = 2.0 -> $xLabelStep = 6 * x -> 12
  #               181: (120*1.5)+1, x = 1.5 -> $xLabelStep = 6 * x ->  9
  #               121: (120*1.0)+1, x = 1.0 -> $xLabelStep = 6 * x ->  6

  my $width      = 893;
  my $hight      = 558;
  my $xOffset    = 74;
  my $yOffset    = 28;
  my $yMarkColor = 0xFFFFDC;
  my $background = 0xF7F7F7;

  print "Generating RRD alike graph\n" if ($debug eq 'T');

  my (@dataOK, @dataCritical, @dataWarning, @dataUnknown, @dataNoTest, @dataOffline, @RRDlabels);
  my ($step, $lastTimeslot, $firstTimeslot, $duration, $startTime, $status, $timeslot, $findString);

  $step          = $interval * 60;
  $lastTimeslot  = timelocal (0, (localtime)[1,2,3,4,5]);
  $firstTimeslot = $lastTimeslot - ($step * ($limitTest));
  $findString    = "select SQL_NO_CACHE duration, startTime, status, timeslot from $SERVERTABLEVENTS force index (uKey) where catalogID = '$catalogID' and uKey = '$uniqueKey' and step <> '0' and (timeslot between '$firstTimeslot' and '$lastTimeslot')...
  print "$findString\n" if ($debug eq 'T');

  # data en labels in array zetten
  my ($counter, $seconden, $ttimeslot);

  for ( $counter = 0; $counter < $limitTest; $counter++) {
    push (@dataOK,       "0");
    push (@dataWarning,  "0");
    push (@dataCritical, "0");
    push (@dataUnknown,  "0");
    push (@dataNoTest,   "0");
    push (@dataOffline,  "0");
    push (@RRDlabels,    " ");
  }

  # db connect & sql query
  my ($dbh, $rv, $alarmMessage) = DBI_connect ( $DATABASE, $serverName, $SERVERPORTREADWRITE, $SERVERUSERREADWRITE, $SERVERPASSREADWRITE, $alarm, \&errorTrapDBIgraphEntry, ["Cannot connect to the database"], \$logger, $debug, $boolean_debug_all );

  if ($dbh and $rv) {
    my $sth = $dbh->prepare( $findString ) or $rv = errorTrapDBIgraphEntry("Cannot dbh->prepare: $findString", \$logger, $debug);
    ($rv, $alarmMessage) = DBI_execute ($rv, \$sth, $alarm, \&errorTrapDBIgraphEntry, ["Cannot sth->execute: $findString"], \$logger, $debug);

applications/collector.pl  view on Meta::CPAN


      unless ( $rv ) {
        $title .= " - Cannot sth->bind_columns";
      } else {
        $counter = 0;
        my $limitTrendline = ($yMarkValue) ? $yMarkValue * 2.5 : 9000;

        while( $sth->fetch() ) {
          $seconden  = int(substr($duration, 6, 2)) + int(substr($duration, 3, 2)*60) + int(substr($duration, 0, 2)*3600);
          $seconden += 0.5 if ($seconden == 0); # correction for to fast testresults
          $ttimeslot = abs((($lastTimeslot - $timeslot) / $step) - $limitTest);

          if ($ttimeslot >= 0) {
            $status = 'UNKNOWN' if ($status eq '<NIHIL>');

      	    if ($status eq 'OK') {
              $dataOK[$ttimeslot] = ($seconden < $limitTrendline) ? $seconden : $limitTrendline;
            } elsif ($status eq 'CRITICAL') {
              $dataCritical[$ttimeslot] = '-5';
            } elsif ($status eq 'WARNING'){
              $dataWarning[$ttimeslot]  = '-5';
            } elsif ($status eq 'UNKNOWN'){
              $dataUnknown[$ttimeslot]  = '-5';
            } elsif ($status eq 'NO TEST') {
              $dataNoTest[$ttimeslot]   = '-5';
            } elsif ($status eq 'OFFLINE') {
              $dataOffline[$ttimeslot]  = '-5';
            }
          }

  	      $RRDlabels[int($limitTest - $counter - 1)] = substr($startTime, 0, 5) unless ( $counter % $xLabelStep );
          $counter++;
        }
      }

      $sth->finish() or $rv = errorTrapDBIgraphEntry("Cannot sth->finish: $findString", \$logger, $debug);
	}

    $dbh->disconnect or $rv = errorTrapDBIgraphEntry("Sorry, the database was unable to add your entry.", \$logger, $debug);
  } else {
    $title .= " - DBI_connect - Cannot connect to the database - alarm: $alarm - alarmMessage: $alarmMessage";

applications/collector.pl  view on Meta::CPAN

  my $c = new XYChart($width, $hight, $background, 0x0, 0);

  # Set the plotarea at (xOffset, yOffset) and of size $width - 95 x $hight - 78 pixels, with white background. Set border and grid line colors.
  $c->setPlotArea($xOffset, $yOffset, $width - 95, $hight - 78, 0xffffff, -1, 0xa08040, $c->dashLineColor(0x0, 0x0101), $c->dashLineColor(0x0, 0x0101))->setGridWidth(1);

  # Add a title box to the chart using 10 pts Arial Bold Italic font. The text is white (0x000000)
  $c->addText($width/2, 14, "$title", "arialbi.ttf", 10, 0x000000, 5, 0);

  # Set labels on the x axis
  unless ( $xRealtime ) {
    for ($counter = 0; $counter < $limitTest; $counter += $xLabelStep) {
      $RRDlabels[int($limitTest - $counter - 1)] = substr(scalar(localtime(($lastTimeslot - ($step * ($counter))))), 11, 5); 
    }
  }

  $c->xAxis()->setLabels(\@RRDlabels);

  for ($counter = 0; $counter < $limitTest - $xLabelStep; $counter += $xLabelStep) {
    my $labelStep = $xLabelStep / 3;
    $c->xAxis()->addMark($counter + $labelStep, $c->dashLineColor(0x0, 0x103))->setDrawOnTop(0);
    $c->xAxis()->addMark($counter + ($labelStep * 2), $c->dashLineColor(0x0, 0x103))->setDrawOnTop(0);
  }

  # Set labels on the y axis
  $c->yAxis()->setLabelFormat("{value|2,.}");

  # Add a stacked bar layer to the chart
  my $layer = $c->addBarLayer2($perlchartdir::Stack);

applications/collector.pl  view on Meta::CPAN


    $layer->addDataSet(\@dataOK, $layer->yZoneColor($yMarkValue, $COLORSRRD {OK}, $COLORSRRD {TRENDLINE}), " Duration");
  } else {
	$c->yAxis()->addZone(0, -6, $yMarkColor) unless ( $markOrZone );
    $layer->addDataSet(\@dataOK, $COLORSRRD {OK}, " Duration");
  }

  $layer->addDataSet(\@dataWarning,  $COLORSRRD {WARNING},   " Warning");
  $layer->addDataSet(\@dataCritical, $COLORSRRD {CRITICAL},  " Critical");
  $layer->addDataSet(\@dataUnknown,  $COLORSRRD {UNKNOWN},   " Unknown");
  $layer->addDataSet(\@dataNoTest,   $COLORSRRD {"NO TEST"}, " No test");
  $layer->addDataSet(\@dataOffline,  $COLORSRRD {OFFLINE},   " Offline");

  # Set the sub-bar gap to 0, so there is no gap between stacked bars with a group
  $layer->setBarGap(-1.7E-100, 0);

  # Set the bar border to transparent
  if ($withBorder) {
    $layer->setBorderColor(0xF0F0F0);
  } else {
    $layer->setBorderColor($perlchartdir::Transparent);

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

use SOAP::Lite;

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

sub webserviceSupportRequest {
  my ($catalogID, $uKey, $method, $whereClause, $fieldlist, $pagedir, $pageset, $htmlTitle, $subTitle, $refresh, $onload, $sessionID, $debug) = @_;

  # DATABASE  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  my $CARTO_SERVER   = 'crinaeadtbs01';
  my $CARTO_DATABASE = 'carto';
  my $CARTO_TABLE    = 'TestRelationships';

  # SOAP  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  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',

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


use ASNMTAP::Asnmtap::Applications::Display v3.002.003;
use ASNMTAP::Asnmtap::Applications::Display qw(:APPLICATIONS :DBDISPLAY);

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

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;

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

    $dbh->disconnect or $rv = errorTrapDBI($checklist, "Sorry, the database was unable to add your entry.") if ($dbh and $rv);
  }
}

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

sub printRelationshipsSDE {
  my ($serverName, $checklist, $catalogID, $uniqueKey) = @_;

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

  my $dataRelationshipsSDE = '';

  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 code, invoicedOrg, service, impact, priority from $CARTO_TABLE where catalogID = '$catalogID' and uKey = '$uniqueKey'";
    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;

applications/display-test.pl  view on Meta::CPAN

  my $helpfile = (defined $help and $help eq '1') ? '<A HREF="'. $HTTPSURL .'/cgi-bin/getHelpPlugin.pl?pagedir='.$pagedir.'&amp;pageset='.$pageset.'&amp;debug=F&amp;CGICOOKIE=1&amp;catalogID='.$catalogID.'&amp;uKey='.$uniqueKey.'" target="_self"><IMG...

  $checkOk = $checkSkip = $printCondensedView = $problemSolved = $verifyNumber = 0;
  $inProgressNumber = -1;

  $itemFullCondensedView = '  <TR>'."\n".'    '.$exclaim.$comments.$helpfile."\n";

  if ( $catalogID ne $CATALOGID or defined $creationTime ) {
    $itemFullCondensedView .= '    <TD class="ItemHeader">'.$groep. encode_html_entities('T', $test) .'</TD>'. "\n";
  } else {
    $itemFullCondensedView .= '    <TD class="ItemHeader">'.$groep.'<A HREF="#" class="ItemHeaderTest" onClick="openPngImage(\''. $RESULTSURL .'/'. $resultsdir .'/'. $command .'-'. $catalogID_uniqueKey ."-sql.html',912,576,null,null,'ChartDirector',1...
  }
}

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

sub printGroepCV {
  my ($title, $showGroup, $showFooter) = @_;

  if ($showGroup and $title ne '') {
    if ($groupFullView) {

applications/display.pl  view on Meta::CPAN

  my $helpfile = (defined $help and $help eq '1') ? '<A HREF="'. $HTTPSURL .'/cgi-bin/getHelpPlugin.pl?pagedir='.$pagedir.'&amp;pageset='.$pageset.'&amp;debug=F&amp;CGICOOKIE=1&amp;catalogID='.$catalogID.'&amp;uKey='.$uniqueKey.'" target="_self"><IMG...

  $checkOk = $checkSkip = $printCondensedView = $problemSolved = $verifyNumber = 0;
  $inProgressNumber = -1;

  $itemFullCondensedView = '  <TR>'."\n".'    '.$exclaim.$comments.$helpfile."\n";

  if ( $catalogID ne $CATALOGID or defined $creationTime ) {
    $itemFullCondensedView .= '    <TD class="ItemHeader">'.$groep. encode_html_entities('T', $test) .'</TD>'. "\n";
  } else {
    $itemFullCondensedView .= '    <TD class="ItemHeader">'.$groep.'<A HREF="#" class="ItemHeaderTest" onClick="openPngImage(\''. $RESULTSURL .'/'. $resultsdir .'/'. $command .'-'. $catalogID_uniqueKey ."-sql.html',912,576,null,null,'ChartDirector',1...
  }
}

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

sub printGroepCV {
  my ($title, $showGroup, $showFooter) = @_;

  if ($showGroup and $title ne '') {
    if ($groupFullView) {

applications/htmlroot/asnmtap-results.css  view on Meta::CPAN


.ItemHeader {
     font-family: Tahoma, Arial, Helvetica, sans-serif;
     font-size: -1pt;
     font-weight: normal;
     text-align: left;
     color: #D8D8BF;
     border: none;
}

.ItemHeaderTest {
     font-family: Tahoma, Arial, Helvetica, sans-serif;
     font-size: -1pt;
     font-weight: normal;
     text-align: left;
     color: #FFFFCC;
     border: none;
}

.ItemStatus {
     font-family: Tahoma, Arial, Helvetica, sans-serif;

applications/htmlroot/asnmtap.css  view on Meta::CPAN


.ItemHeader {
     font-family: Tahoma, Arial, Helvetica, sans-serif;
     font-size: -1pt;
     font-weight: normal;
     text-align: left;
     color: #D8D8BF;
     border: none;
}

.ItemHeaderTest {
     font-family: Tahoma, Arial, Helvetica, sans-serif;
     font-size: -1pt;
     font-weight: normal;
     text-align: left;
     color: #FFFFCC;
     border: none;
}

.ItemStatus {
     font-family: Tahoma, Arial, Helvetica, sans-serif;

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

        ($CcatalogID, $CuKey, $Ctest, $Cenvironment, $Carguments, $CargumentsOndemand, $Ctitle, $CshortDescription, $Ctrendline, $Cpercentage, $Ctolerance, $Cstep, $Condemand, $Cproduction, $Cpagedir, $Cresultsdir, $ChelpPluginFilename, $CholidayBund...
        $CcatalogID  = $CATALOGID if ($action eq 'duplicateView');
        $Condemand   = ($Condemand == 1) ? 'on' : 'off';
        $Cproduction = ($Cproduction == 1) ? 'on' : 'off';
        $Cactivated  = ($Cactivated == 1) ? 'on' : 'off';
        $sth->finish() or $rv = error_trap_DBI(*STDOUT, "Cannot sth->finish: $sql", $debug, $pagedir, $pageset, $htmlTitle, $subTitle, 3600, '', $sessionID);
      }
    }

    if ($action eq 'deleteView' or $action eq 'displayView' or $action eq 'duplicateView' or $action eq 'editView' or $action eq 'insertView') {
      $environmentSelect = create_combobox_from_keys_and_values_pairs ('P=>Production|A=>Acceptation|S=>Simulation|T=>Test|D=>Development|L=>Local', 'V', 0, $Cenvironment, 'environment', '', '', $formDisabledAll, '', $debug);

      $sql = "select pagedir, groupName from $SERVERTABLPAGEDIRS where catalogID = '$CcatalogID' order by groupName";
      ($rv, $pagedirsSelect) = create_combobox_multiple_from_DBI ($rv, $dbh, $sql, $action, $Cpagedir, 'pagedirs', 'Pagedirs missing.', 5, 100, $formDisabledAll, '', $pagedir, $pageset, $htmlTitle, $subTitle, $sessionID, $debug);

      $sql = "select resultsdir, groupName from $SERVERTABLRESULTSDIR where catalogID = '$CcatalogID' order by groupName";
      ($rv, $resultsdirSelect, undef) = create_combobox_from_DBI ($rv, $dbh, $sql, 1, '', $Cresultsdir, 'resultsdir', 'none', '-Select-', $formDisabledAll, '', $pagedir, $pageset, $htmlTitle, $subTitle, $sessionID, $debug);

      $sql = "select holidayBundleID, holidayBundleName from $SERVERTABLHOLIDYSBNDL where catalogID = '$CcatalogID' and activated = '1' order by holidayBundleName";
      ($rv, $holidayBundleSelect, undef) = create_combobox_from_DBI ($rv, $dbh, $sql, 1, '', $CholidayBundleID, 'holidayBundleID', '1', '+ No Holiday Bundle', $formDisabledAll, '', $pagedir, $pageset, $htmlTitle, $subTitle, $sessionID, $debug);
    }

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

my $Cperiode               = (defined $cgi->param('periode'))               ? $cgi->param('periode')               : 'none';
my $CtimeperiodID          = (defined $cgi->param('timeperiodID'))          ? $cgi->param('timeperiodID')          : 'none';
my $Cstatus                = (defined $cgi->param('status'))                ? $cgi->param('status')                : 'off';
my $CerrorDetails          = (defined $cgi->param('errorDetails'))          ? $cgi->param('errorDetails')          : 'off';
my $Cbar                   = (defined $cgi->param('bar'))                   ? $cgi->param('bar')                   : 'off';
my $ChourlyAverage         = (defined $cgi->param('hourlyAverage'))         ? $cgi->param('hourlyAverage')         : 'off';
my $CdailyAverage          = (defined $cgi->param('dailyAverage'))          ? $cgi->param('dailyAverage')          : 'off';
my $CshowDetails           = (defined $cgi->param('showDetails'))           ? $cgi->param('showDetails')           : 'off';
my $CshowComments          = (defined $cgi->param('showComments'))          ? $cgi->param('showComments')          : 'off';
my $CshowPerfdata          = (defined $cgi->param('showPerfdata'))          ? $cgi->param('showPerfdata')          : 'off';
my $CshowTop20SlowTests    = (defined $cgi->param('showTop20SlowTests'))    ? $cgi->param('showTop20SlowTests')    : 'off';
my $CprinterFriendlyOutput = (defined $cgi->param('printerFriendlyOutput')) ? $cgi->param('printerFriendlyOutput') : 'off';
my $CformatOutput          = (defined $cgi->param('formatOutput'))          ? $cgi->param('formatOutput')          : 'none';
my $CuserPassword          = (defined $cgi->param('userPassword'))          ? $cgi->param('userPassword')          : '';
my $Cactivated             = (defined $cgi->param('activated'))             ? $cgi->param('activated')             : 'off';

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

my $htmlTitle = $APPLICATION;

# Init parameters
my ($rv, $dbh, $sth, $sql, $header, $numberRecordsIntoQuery, $nextAction, $formDisabledAll, $formDisabledPrimaryKey, $submitButton, $uKeySelect);

# User Session and Access Control
my ($sessionID, $iconAdd, $iconDelete, $iconDetails, $iconEdit, $iconQuery, $iconTable, $errorUserAccessControl, undef, undef, undef, undef, undef, undef, undef, undef, undef, undef, undef, $subTitle) = user_session_and_access_control (1, 'admin', $c...

# Serialize the URL Access Parameters into a string
my $urlAccessParameters = "pagedir=$pagedir&pageset=$pageset&debug=$debug&CGISESSID=$sessionID&pageNo=$pageNo&pageOffset=$pageOffset&orderBy=$orderBy&action=$action&catalogID=$CcatalogID&catalogIDreload=$CcatalogIDreload&id=$Cid&uKey=$CuKey&reportTit...

# 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>catalog ID   ...

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

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

  # 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...

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

      } else {
        $htmlTitle    = "Report $Cid from $CcatalogID inserted";
        my $dummyStatus                = ($Cstatus eq 'on') ? 1 : 0;
        my $dummyErrorDetails          = ($CerrorDetails eq 'on') ? 1 : 0;
        my $dummyBar                   = ($Cbar eq 'on') ? 1 : 0;
        my $dummyHourlyAverage         = ($ChourlyAverage eq 'on') ? 1 : 0;
        my $dummyDailyAverage          = ($CdailyAverage eq 'on') ? 1 : 0;
        my $dummyShowDetails           = ($CshowDetails eq 'on') ? 1 : 0;
        my $dummyShowComments          = ($CshowComments eq 'on') ? 1 : 0;
        my $dummyShowPerfdata          = ($CshowPerfdata eq 'on') ? 1 : 0;
        my $dummyShowTop20SlowTests    = ($CshowTop20SlowTests eq 'on') ? 1 : 0;
        my $dummyPrinterFriendlyOutput = ($CprinterFriendlyOutput eq 'on') ? 1 : 0;
        my $dummyActivated             = ($Cactivated eq 'on') ? 1 : 0;
        $sql = 'INSERT INTO ' .$SERVERTABLREPORTS. ' SET catalogID="' .$CcatalogID. '", uKey="' .$CuKey. '", reportTitle="' .$CreportTitle. '", periode="' .$Cperiode. '", timeperiodID="' .$CtimeperiodID. '", status="' .$dummyStatus. '", errorDetails=...
        $dbh->do ( $sql ) or $rv = error_trap_DBI(*STDOUT, "Cannot dbh->do: $sql", $debug, $pagedir, $pageset, $htmlTitle, $subTitle, 3600, '', $sessionID);
        $nextAction   = "listView" if ($rv);
      }
    } elsif ($action eq 'deleteView') {
      $formDisabledAll = "disabled";
      $htmlTitle    = "Delete Report $Cid from $CcatalogID";
      $submitButton = "Delete";
      $nextAction   = "delete" if ($rv);
    } elsif ($action eq 'delete') {
      $sql = "select id, $SERVERTABLREPORTS.uKey from $SERVERTABLREPORTS, $SERVERTABLREPORTSPRFDT where $SERVERTABLREPORTS.catalogID = '$CcatalogID' and id = '$Cid' and $SERVERTABLREPORTS.catalogID = $SERVERTABLREPORTSPRFDT.catalogID and $SERVERTABLR...

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

    } elsif ($action eq 'edit') {
      $htmlTitle    = "Report $Cid from updated $CcatalogID";
      my $dummyStatus                = ($Cstatus eq 'on') ? 1 : 0;
      my $dummyErrorDetails          = ($CerrorDetails eq 'on') ? 1 : 0;
      my $dummyBar                   = ($Cbar eq 'on') ? 1 : 0;
      my $dummyHourlyAverage         = ($ChourlyAverage eq 'on') ? 1 : 0;
      my $dummyDailyAverage          = ($CdailyAverage eq 'on') ? 1 : 0;
      my $dummyShowDetails           = ($CshowDetails eq 'on') ? 1 : 0;
      my $dummyShowComments          = ($CshowComments eq 'on') ? 1 : 0;
      my $dummyShowPerfdata          = ($CshowPerfdata eq 'on') ? 1 : 0;
      my $dummyShowTop20SlowTests    = ($CshowTop20SlowTests eq 'on') ? 1 : 0;
      my $dummyPrinterFriendlyOutput = ($CprinterFriendlyOutput eq 'on') ? 1 : 0;
      my $dummyActivated             = ($Cactivated eq 'on') ? 1 : 0;
      $sql = 'UPDATE ' .$SERVERTABLREPORTS. ' SET catalogID="' .$CcatalogID. '", uKey="' .$CuKey. '", reportTitle="' .$CreportTitle. '", periode="' .$Cperiode. '", timeperiodID="' .$CtimeperiodID. '", status="' .$dummyStatus. '", errorDetails="' .$du...
      $dbh->do ( $sql ) or $rv = error_trap_DBI(*STDOUT, "Cannot dbh->do: $sql", $debug, $pagedir, $pageset, $htmlTitle, $subTitle, 3600, '', $sessionID);
      $nextAction   = "listView" if ($rv);
    } elsif ($action eq 'listView') {
      $htmlTitle    = "All reports listed";
      $formDisabledPrimaryKey = '';

      if ( $CcatalogIDreload ) {
        $pageNo = 1;
        $pageOffset = 0;
      }

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


      $navigationBar .= record_navigation_bar_alpha ($rv, $dbh, $SERVERTABLREPORTS, 'reportTitle', "catalogID = '$CcatalogID'", $numberRecordsIntoQuery, $RECORDSONPAGE, $ENV{SCRIPT_NAME} . "?pagedir=$pagedir&amp;pageset=$pageset&amp;debug=$debug&amp;...

      $sql = "select $SERVERTABLREPORTS.catalogID, $SERVERTABLREPORTS.id, $SERVERTABLREPORTS.uKey, $SERVERTABLREPORTS.reportTitle, $SERVERTABLREPORTS.periode, $SERVERTABLTIMEPERIODS.timeperiodName, $SERVERTABLREPORTS.formatOutput, $SERVERTABLREPORTS....
      $header = "<th><a href=\"$urlWithAccessParameters&amp;action=listView&amp;orderBy=catalogID desc, reportTitle desc\"><IMG SRC=\"$IMAGESURL/$ICONSRECORD{up}\" ALT=\"Up\" BORDER=0></a> Catalog ID <a href=\"$urlWithAccessParameters&amp;action=list...
      $header .= "<th><a href=\"$urlWithAccessParameters&amp;action=listView&amp;orderBy=timeperiodName desc, reportTitle asc\"><IMG SRC=\"$IMAGESURL/$ICONSRECORD{up}\" ALT=\"Up\" BORDER=0></a> SLA Window <a href=\"$urlWithAccessParameters&amp;action...
      ($rv, $matchingReports, $nextAction) = record_navigation_table ($rv, $dbh, $sql, 'Report', 'catalogID|id', '0|1', '1|2', '4#N=>Never|D=>Daily|W=>Weekly|M=>Monthly|Q=>Quarterly|Y=>Yearly', '', $orderBy, $header, $navigationBar, $iconAdd, $iconDe...
    }

    if ($action eq 'deleteView' or $action eq 'displayView' or $action eq 'duplicateView' or $action eq 'editView') {
      $sql = "select catalogID, id, uKey, reportTitle, periode, timeperiodID, status, errorDetails, bar, hourlyAverage, dailyAverage, showDetails, showComments, showPerfdata, showTop20SlowTests, printerFriendlyOutput, formatOutput, userPassword, acti...
      $sth = $dbh->prepare( $sql ) or $rv = error_trap_DBI(*STDOUT, "Cannot dbh->prepare: $sql", $debug, $pagedir, $pageset, $htmlTitle, $subTitle, 3600, '', $sessionID);
      $sth->execute() or $rv = error_trap_DBI(*STDOUT, "Cannot sth->execute: $sql", $debug, $pagedir, $pageset, $htmlTitle, $subTitle, 3600, '', $sessionID) if $rv;

      if ( $rv ) {
        ($CcatalogID, $Cid, $CuKey, $CreportTitle, $Cperiode, $CtimeperiodID, $Cstatus, $CerrorDetails, $Cbar, $ChourlyAverage, $CdailyAverage, $CshowDetails, $CshowComments, $CshowPerfdata, $CshowTop20SlowTests, $CprinterFriendlyOutput, $CformatOutp...

        if ($action eq 'duplicateView') {
          $CcatalogID = $CATALOGID;
          $Cid = 'new';
        }

        $Cstatus                = ($Cstatus == 1) ? 'on' : 'off';
        $CerrorDetails          = ($CerrorDetails == 1) ? 'on' : 'off';
        $Cbar                   = ($Cbar == 1) ? 'on' : 'off';
        $ChourlyAverage         = ($ChourlyAverage == 1) ? 'on' : 'off';
        $CdailyAverage          = ($CdailyAverage == 1) ? 'on' : 'off';
        $CshowDetails           = ($CshowDetails == 1) ? 'on' : 'off';
        $CshowComments          = ($CshowComments == 1) ? 'on' : 'off';
        $CshowPerfdata          = ($CshowPerfdata == 1) ? 'on' : 'off';
        $CshowTop20SlowTests    = ($CshowTop20SlowTests == 1) ? 'on' : 'off';
        $CprinterFriendlyOutput = ($CprinterFriendlyOutput == 1) ? 'on' : 'off';
        $Cactivated             = ($Cactivated == 1) ? 'on' : 'off';
        $sth->finish() or $rv = error_trap_DBI(*STDOUT, "Cannot sth->finish: $sql", $debug, $pagedir, $pageset, $htmlTitle, $subTitle, 3600, '', $sessionID);
      }
    }

    if ($action eq 'insertView' or $action eq 'deleteView' or $action eq 'duplicateView' or $action eq 'displayView' or $action eq 'editView') {
      if ($CuKey eq 'none' or $action eq 'insertView' or $action eq 'duplicateView' or $action eq 'editView') {
        $sql = "select uKey, concat( LTRIM(SUBSTRING_INDEX(title, ']', -1)), ' (', $SERVERTABLENVIRONMENT.label, ')' ) as optionValueTitle from $SERVERTABLPLUGINS, $SERVERTABLENVIRONMENT where $SERVERTABLPLUGINS.catalogID = '$CcatalogID' and $SERVERT...
      } else {

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


    if ($action eq 'deleteView' or $action eq 'displayView' or $action eq 'duplicateView' or $action eq 'editView' or $action eq 'insertView') {
      my $statusChecked                = ($Cstatus eq 'on') ? " checked" : '';
      my $errorDetailsChecked          = ($CerrorDetails eq 'on') ? " checked" : '';
      my $barChecked                   = ($Cbar eq 'on') ? " checked" : '';
      my $hourlyAverageChecked         = ($ChourlyAverage eq 'on') ? " checked" : '';
      my $dailyAverageChecked          = ($CdailyAverage eq 'on') ? " checked" : '';
      my $showDetailsChecked           = ($CshowDetails eq 'on') ? " checked" : '';
      my $showCommentsChecked          = ($CshowComments eq 'on') ? " checked" : '';
      my $showPerfdataChecked          = ($CshowPerfdata eq 'on') ? " checked" : '';
      my $showTop20SlowTestsChecked    = ($CshowTop20SlowTests eq 'on') ? " checked" : '';
      my $printerFriendlyOutputChecked = ($CprinterFriendlyOutput eq 'on') ? " checked" : '';
      my $activatedChecked             = ($Cactivated eq 'on') ? " checked" : '';

      my $formatPeriodeSelect = create_combobox_from_keys_and_values_pairs ('N=>Never|D=>Daily|W=>Weekly|M=>Monthly|Q=>Quarterly|Y=>Yearly', 'K', 0, $Cperiode, 'periode', 'none', '-Select-', $formDisabledAll, 'onChange="javascript:enableDisableFields...

      my $slaWindowSelect = '';
      ($rv, $slaWindowSelect, undef) = create_combobox_from_DBI ($rv, $dbh, "select timeperiodID, timeperiodName from $SERVERTABLTIMEPERIODS where catalogID = '$CcatalogID' and activated = 1 order by timeperiodName", 1, '', $CtimeperiodID, 'timeperio...

      my $formatOutputSelect = create_combobox_from_keys_and_values_pairs ('pdf=>PDF', 'V', 0, $CformatOutput, 'formatOutput', 'none', '-Select-', $formDisabledAll, '', $debug);

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

        </td></tr>
		<tr><td>Show Details: </td><td>
          <input type="checkbox" name="showDetails" $showDetailsChecked $formDisabledAll>
        </td></tr>
		<tr><td>Show Comments: </td><td>
          <input type="checkbox" name="showComments" $showCommentsChecked $formDisabledAll>
        </td></tr>
		<tr><td>Show Performance Data: </td><td>
          <input type="checkbox" name="showPerfdata" $showPerfdataChecked $formDisabledAll>
        </td></tr>
		<tr><td>Show Top 20 Slow Tests: </td><td>
          <input type="checkbox" name="showTop20SlowTests" $showTop20SlowTestsChecked $formDisabledAll>
        </td></tr>
		<tr><td>Printer Friendly Output: </td><td>
          <input type="checkbox" name="printerFriendlyOutput" $printerFriendlyOutputChecked $formDisabledAll>
        </td></tr>
		<tr><td><b>Format Output: </b></td><td>
          $formatOutputSelect
        </td></tr>
		<tr><td><b>User Password: </b></td><td>
          <input type="password" name="userPassword" value="$CuserPassword" size="15" maxlength="15" $formDisabledAll>
        </td></tr>

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

</BODY>
</HTML>
EndOfHtml

    exit;
  }

  my ($rv, $dbh, $sth, $uKey, $sqlQuery, $sqlSelect, $sqlAverage, $sqlInfo, $sqlErrors, $sqlWhere, $sqlPeriode);
  my ($printerFriendlyOutputBox, $formatOutputSelect, $catalogIDSelect, $uKeySelect1, $uKeySelect2, $uKeySelect3, $images);
  my ($subtime, $endTime, $duration, $seconden, $status, $statusMessage, $title, $Title, $shortDescription, $rest, $dummy, $count);
  my ($averageQ, $numbersOfTestsQ, $startDateQ, $stepQ, $endDateQ, $errorMessage, $chartOrTableChecked);
  my ($checkbox, $tables, $shortDescriptionTextArea, $infoTable, $topxTable, $errorList, $errorDetailList, $commentDetailList, $perfdataDetailList, $responseTable, $goodDate);
  my ($fromto, $years, $weeks, $months, $quarters, $slaWindows, $selectedYear, $selectedWeek, $selectedMonth, $selectedQuarter, $slaWindow, $i);
  my @arrMonths = qw(January Februari March April May June July August September October November December);

  # open connection to database and query data
  $rv  = 1;
  $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, $subTitle, ...

  if ( $dbh and $rv ) {
    $uKey1 = $uKey2 = $uKey3 = 'none' if ( $CcatalogIDreload );

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


        # Sql init & Query's  - - - - - - - - - - - - - - - - - - - - - -
        if ((($details eq 'on') or ($comments eq 'on') or ($perfdata eq 'on') or ($topx eq 'on')) and ! defined $errorMessage) {
          $sqlSelect  = "select SQL_NO_CACHE startDate as startDateQ, startTime, endDate as endDateQ, endTime, duration, status, statusMessage";
          $sqlAverage = "select SQL_NO_CACHE avg(time_to_sec(duration)) as average";
          $sqlErrors  = "select SQL_NO_CACHE statusmessage, count(statusmessage) as aantal";
          $sqlWhere   = "WHERE catalogID='$CcatalogID' and uKey = '$uKey1'";
          $sqlPeriode = "AND startDate BETWEEN '$sqlStartDate' AND '$sqlEndDate' $sqlPeriode " if (defined $sqlStartDate and defined $sqlEndDate);
        }

        my ($numbersOfTests, $step, $average);
        my $forceIndex = "force index (key_startDate)"; $forceIndex = '';

        # Short Description - - - - - - - - - - - - - - - - - - - - - - - -
        if ( $uKey1 ne 'none' ) {
          $sqlQuery = "select SQL_NO_CACHE shortDescription from $SERVERTABLPLUGINS WHERE catalogID = '$CcatalogID' and uKey = '$uKey1'";
          $sth = $dbh->prepare( $sqlQuery ) or $rv = error_trap_DBI("", "Cannot dbh->prepare: $sqlQuery", $debug, '', "", '', "", -1, '', $sessionID);
          $sth->execute() or $rv = error_trap_DBI("", "Cannot sth->execute: $sqlQuery", $debug, '', "", '', "", -1, '', $sessionID) if $rv;

          if ( $rv ) {
            ($shortDescription) = $sth->fetchrow_array() or $rv = error_trap_DBI("", "Cannot sth->execute: $sqlQuery", $debug, '', "", '', "", -1, '', $sessionID) if $rv;

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


            if ( $rv and defined $shortDescription and $shortDescription ) {
              $shortDescriptionTextArea = "<H1>Short Description</H1>\n";
              $shortDescriptionTextArea .= "<table border=\"0\" cellpadding=\"1\" cellspacing=\"1\" bgcolor=\"$COLORSTABLE{TABLE}\"><tr><td>$shortDescription</td></tr></table>\n";
            }
          }
        }

        if ($details eq 'on' and ! defined $errorMessage) {
          # Details: General information  - - - - - - - - - - - - - - - - -
          $sqlInfo  = "select SQL_NO_CACHE count(id) as numbersOfTests, max(step) as step";
          $sqlQuery = create_sql_query_events_from_range_year_month ($inputType, $sqlStartDate, $sqlEndDate, $sqlInfo, $forceIndex, $sqlWhere, $sqlPeriode, '', "group by uKey", '', "", "ALL");

          $sth = $dbh->prepare( $sqlQuery ) or $rv = error_trap_DBI("", "Cannot dbh->prepare: $sqlQuery", $debug, '', "", '', "", -1, '', $sessionID);
          $sth->execute() or $rv = error_trap_DBI("", "Cannot sth->execute: $sqlQuery", $debug, '', "", '', "", -1, '', $sessionID) if $rv;
          $sth->bind_columns( \$numbersOfTestsQ, \$stepQ ) or $rv = error_trap_DBI("", "Cannot sth->bind_columns: $sqlQuery", $debug, '', "", '', "", -1, '', $sessionID) if $rv;

          if ( $rv ) {
            while( $sth->fetch() ) {
              $numbersOfTests += $numbersOfTestsQ if (defined $numbersOfTestsQ);
			        $step = $stepQ if (defined $stepQ);
            }

            $sth->finish() or $rv = error_trap_DBI("", "Cannot sth->finish", $debug, '', "", '', "", -1, '', $sessionID);
          }

          # Average: General information  - - - - - - - - - - - - - - - - -
          $sqlQuery = create_sql_query_events_from_range_year_month ($inputType, $sqlStartDate, $sqlEndDate, $sqlAverage, $forceIndex, $sqlWhere, $sqlPeriode, "AND status = 'OK'", '', "", '', "ALL");
          $sth = $dbh->prepare( $sqlQuery ) or $rv = error_trap_DBI("", "Cannot dbh->prepare: $sqlQuery", $debug, '', "", '', "", -1, '', $sessionID);
          $sth->execute() or $rv = error_trap_DBI("", "Cannot sth->execute: $sqlQuery", $debug, '', "", '', "", -1, '', $sessionID) if $rv;

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

          # General information table - - - - - - - - - - - - - - - - - - -
          $infoTable = "<H1>General information</H1>\n";
          $infoTable .= "<table border=\"0\" cellpadding=\"1\" cellspacing=\"1\" bgcolor=\"$COLORSTABLE{TABLE}\"><tr><th width=\"200\">Entry</th><th>Value</th></tr>\n";
          $infoTable .= "  <tr><td bgcolor=\"$COLORSTABLE{ENDBLOCK}\">Application</td><td bgcolor=\"$COLORSTABLE{STARTBLOCK}\"> " .substr($htmlTitle, 11). " </td></tr>\n";
          $infoTable .= "  <tr><td bgcolor=\"$COLORSTABLE{ENDBLOCK}\">Report Type</td><td bgcolor=\"$COLORSTABLE{STARTBLOCK}\"> " .$inputType. ( defined $slaWindow ? ", " .$slaWindow : '') ." </td></tr>\n";
          $infoTable .= "  <tr><td bgcolor=\"$COLORSTABLE{ENDBLOCK}\">Generated on</td><td bgcolor=\"$COLORSTABLE{STARTBLOCK}\"> " .$now. "</td></tr>\n";
          $infoTable .= "  <tr><td colspan=\"2\"><br></td></tr>\n";
          $infoTable .= "  <tr><td bgcolor=\"$COLORSTABLE{ENDBLOCK}\">Average (ok only)</td><td bgcolor=\"$COLORSTABLE{STARTBLOCK}\"> " .substr($average,0,5). " seconds </td></tr>\n" if (defined $average);

          if (($step >= 1) and ($numberOfDays >= 1)) {
            $infoTable .= "  <tr><td bgcolor=\"$COLORSTABLE{ENDBLOCK}\">Test interval</td><td bgcolor=\"$COLORSTABLE{STARTBLOCK}\"> " .($step/60). " minutes</td></tr>\n";
            $infoTable .= "  <tr><td bgcolor=\"$COLORSTABLE{ENDBLOCK}\">Should run 'X' tests:</td><td bgcolor=\"$COLORSTABLE{STARTBLOCK}\"> " .((86400/$step)* $numberOfDays). " </td></tr>\n";
            $infoTable .= "  <tr><td bgcolor=\"$COLORSTABLE{ENDBLOCK}\">Number of tests run </td><td bgcolor=\"$COLORSTABLE{STARTBLOCK}\"> " .$numbersOfTests. " (".substr(($numbersOfTests/((86400/$step)* $numberOfDays))*100,0,6)."%)</td></tr>\n";
          }

          $infoTable .= "</table>\n";
        }

        if ($comments eq 'on' and ! defined $errorMessage) {
          # Comment Detail  - - - - - - - - - - - - - - - - - - - - - - -
          my ($activationDate, $suspentionDate, $solvedDate, $activationTime, $suspentionTime, $solvedTime, $commentData, $instability, $persistent, $downtime, $problemSolved);
          $commentDetailList = "<H1>Comment Details</H1>\n";

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


        if ($topx eq 'on' and ! defined $errorMessage) {
          # Top X List  - - - - - - - - - - - - - - - - - - - - - - - - -
          my ($startDatetx, $durationtx, $startTimetx);
          $sqlQuery = create_sql_query_events_from_range_year_month ($inputType, $sqlStartDate, $sqlEndDate, "select SQL_NO_CACHE startDate, startTime, duration", $forceIndex, $sqlWhere, $sqlPeriode, "and status <> 'OFFLINE' and status <> 'CRITICAL' ...
          $sth = $dbh->prepare( $sqlQuery ) or $rv = error_trap_DBI("", "Cannot dbh->prepare: $sqlQuery", $debug, '', "", '', "", -1, '', $sessionID);
          $sth->execute() or $rv = error_trap_DBI("", "Cannot sth->execute: $sqlQuery", $debug, '', "", '', "", -1, '', $sessionID) if $rv;
          $sth->bind_columns( \$startDatetx, \$startTimetx,\$durationtx ) or $rv = error_trap_DBI("", "Cannot sth->bind_columns: $sqlQuery", $debug, '', "", '', "", -1, '', $sessionID) if $rv;

          if ( $rv ) {
            $topxTable .= "<H1>Top 20 Slow Tests </H1>\n";
            $topxTable .= "\n<table border=\"0\" cellpadding=\"1\" cellspacing=\"1\" bgcolor=\"$COLORSTABLE{TABLE}\"><tr><th width=\"40\"> # </th><th>Time</th><th>Duration</th></tr>\n";

            my $teltopx = 1;
	
            while( $sth->fetch() ) {
              $seconden = int(substr($durationtx, 6, 2)) + int(substr($durationtx, 3, 2)*60) + int(substr($durationtx, 0, 2)*3600);
              $topxTable .= "<tr bgcolor=\"$COLORSTABLE{STARTBLOCK}\"><td width=\"30\">$teltopx</td><td width=\"200\" align=\"center\">$startDatetx \@ $startTimetx</td><td width=\"80\" align=\"right\"><b>$seconden sec</b></td></tr>\n";
              $teltopx++;
            }			

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

$PROGNAME       = "generateChart.pl";
my $prgtext     = "Generate Chart";
my $version     = do { my @r = (q$Revision: 3.002.003$ =~ /\d+/g); sprintf "%d."."%03d" x $#r, @r }; # must be all on one line or MakeMaker will get confused.

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

my ($rv, $dbh, $sth, $sql, $sqlPeriode, $debugMessage, $errorMessage, $dbiErrorCode, $dbiErrorString);
my ($background, $forGround, $axisColor, $numberOfDays, $numberOfLabels, $dummy, $trendvalue, $chartTitle);
my ($endDateIN, $i, $j, $yearFrom, $monthFrom, $dayFrom, $yearTo, $monthTo, $dayTo, $goodDate, $slaWindow);

my (@avg1, @avg2, @avg3, @data, @dataOK, @dataWarning, @dataCritical, @dataUnknown, @dataNoTest, @dataOffline);
my (@icons, @labels, @labels1, @labels2, @labels3, $applicationTitle1, $applicationTitle2, $applicationTitle3);

my ($currentYear, $currentMonth, $currentDay) = (((localtime)[5] + 1900), ((localtime)[4] + 1), (localtime)[3]);

$applicationTitle1 = $applicationTitle2 = $applicationTitle3 = '<NIHIL>';
my @arrMonths      = qw(January Februari March April May June July August September October November December);

# Chart Parameters
my $width		= 1000; 	 # graph width
my $hight       = 380;       # graph height

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

                  push (@labels, substr($rest, 1, 38));
                }
              } else {
			          $hight = 380; $rv = 0; $errorMessage = "NO ERRORS FOR THIS PERIOD";
              }

              $sth->finish() or ($rv, $errorMessage, $dbiErrorCode, $dbiErrorString) = error_trap_DBI("", "Cannot sth->finish", $debug, '', "", '', "", 0, '', $sessionID);
            }
          } elsif ( $selChart eq "Bar" ) {
            my ($seconden, $duration, $startDate, $startTime, $status, $step);
            my ($dataOK, $dataWarning, $dataCritical, $dataUnknown, $dataNoTest, $dataOffline);
            $sql = create_sql_query_events_from_range_year_month ($inputType, $sqlStartDate, $sqlEndDate, "select SQL_NO_CACHE duration, startDate, startTime, status, step", $forceIndex, "WHERE catalogID = '$CcatalogID' and uKey = '$uKey1'", $sqlPeri...
            $sth = $dbh->prepare( $sql ) or ($rv, $errorMessage, $dbiErrorCode, $dbiErrorString) = error_trap_DBI("", "Cannot dbh->prepare: $sql", $debug, '', "", '', "", 0, '', $sessionID);
            $sth->execute() or ($rv, $errorMessage, $dbiErrorCode, $dbiErrorString) = error_trap_DBI("", "Cannot sth->execute: $sql", $debug, '', "", '', "", 0, '', $sessionID) if $rv;
            $sth->bind_columns( \$duration, \$startDate, \$startTime, \$status, \$step ) or ($rv, $errorMessage, $dbiErrorCode, $dbiErrorString) = error_trap_DBI("", "Cannot sth->bind_columns: $sql", $debug, '', "", '', "", 0, '', $sessionID) if $rv;

		        if ( $rv ) {
  		        if ( $sth->rows ) {
                my $counter = 0;
                $numberOfLabels = ($sth->rows < 25) ? $sth->rows : 25;
                my $labelCounter = int($sth->rows / $numberOfLabels);
                my $limitTrendvalue = ($trendvalue) ? $trendvalue * 2.5 : 9000;
                my $moreDays = (defined $endDateIN or $inputType eq "year" or $inputType eq "quarter" or $inputType eq "month" or $inputType eq "week") ? 1 : 0;

                while( $sth->fetch() ) {
                  $dataOK = $dataWarning = $dataCritical = $dataUnknown = $dataNoTest = $dataOffline = "0";
                  $seconden = int(substr($duration, 6, 2)) + int(substr($duration, 3, 2)*60) + int(substr($duration, 0, 2)*3600);
                  $seconden += 0.5 if ($seconden == 0); # correction for to fast testresults

                  if ($status eq 'OK') {
                    $dataOK = ($seconden < $limitTrendvalue) ? $seconden : $limitTrendvalue;
                  } elsif ($status eq 'WARNING') {
                    $dataWarning = "-5";
                  } elsif ($status eq 'CRITICAL') {
                    $dataCritical = "-5";
                  } elsif ($status eq 'UNKNOWN') {
                    $dataUnknown = "-5";
                  } elsif ($status eq 'NO TEST') {
                    $dataNoTest = "-5";
                  } elsif ($status eq 'OFFLINE') {
                    $dataOffline = "-5";
                  }
				
                  push (@dataOK,       $dataOK);
                  push (@dataWarning,  $dataWarning);
                  push (@dataCritical, $dataCritical);
                  push (@dataUnknown,  $dataUnknown);
                  push (@dataNoTest,   $dataNoTest);
                  push (@dataOffline,  $dataOffline);

                  if ($labelCounter == 1 or $labelCounter == $counter or ($counter == 0 and $labelCounter >= 2)) {
                    if ($moreDays) {
                      push (@labels, $startDate . " ~ " . substr($startTime, 0, 5));
                    } else {
                      push (@labels, substr($startTime, 0, 5));
                    }

                    $counter = 1;

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


      # Set the sub-bar gap to 0, so there is no gap between stacked bars with a group
      $layer->setBarGap(-1.7E-100, 0);
	
      # Add the first two data sets to the chart as a stacked bar group
      $layer->addDataSet(\@dataOK, $layer->yZoneColor($trendvalue, $COLORSRRD {OK}, $COLORSRRD {TRENDLINE}), " Duration");
      $layer->addDataSet(\@dataWarning,  $COLORSRRD {WARNING},  " Warning");
      $layer->addDataSet(\@dataCritical, $COLORSRRD {CRITICAL}, " Critical");
      $layer->addDataSet(\@dataUnknown,  $COLORSRRD {UNKNOWN},  " Unknown");
      $layer->addDataSet(\@dataOffline,  $COLORSRRD {OFFLINE},  " Offline");
      $layer->addDataSet(\@dataNoTest,   $COLORSRRD {"NO TEST"},  " No Test");
    } elsif ( $selChart eq "HourlyAverage" or $selChart eq "DailyAverage" ) {
      if ( $selChart eq "HourlyAverage" ) {
        for($i = 1; $i < $numberOfDays; ++$i) { my $xMark1 = $c->xAxis()->addMark((24 * $i), 0x0000FF); }
        my $xCorrectie = 95 - $xOffset;

        for($i = 0; $i < $numberOfDays; ++$i) {
          my $cdate = Date_to_Text_Long ( Add_Delta_Days($yearFrom, $monthFrom, $dayFrom, $i) );
          my $x = ($numberOfDays > 1) ? ($i * 600) + 300 + $xCorrectie : ($width/2) + $xCorrectie;
          $c->addText($x, 40, $cdate, "arialbi.ttf", 10, 0x000000, 5, 0);
        }

applications/htmlroot/cgi-bin/moderator/comments.pl  view on Meta::CPAN

    # 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, $subT...

    if ($dbh) {
      if ( $action eq 'insertView' ) {
        $sql = "select catalogID, catalogName from $SERVERTABLCATALOG where not catalogID = '$CATALOGID' and activated = '1' order by catalogName asc";
        ($rv, $catalogIDSelect, undef) = create_combobox_from_DBI ($rv, $dbh, $sql, 1, '', $CcatalogID, 'catalogID', $CATALOGID, '-Parent-', '', 'onChange="javascript:catalogIDsubmitForm();"', $pagedir, $pageset, $htmlTitle, $subTitle, $sessionID, $d...

        $environmentSelect = '<select name="environment" size="1" onChange="javascript:environIDsubmitForm();"><option value="P"'. ($Cenvironment eq 'P' ? ' selected' : '') .'>Production</option><option value="A"'. ($Cenvironment eq 'A' ? ' selected'...

        $sql = "select uKey, concat( LTRIM(SUBSTRING_INDEX(title, ']', -1)), ' (', $SERVERTABLENVIRONMENT.label, ')' ) as optionValueTitle from $SERVERTABLPLUGINS, $SERVERTABLENVIRONMENT where catalogID = '$CcatalogID' and $SERVERTABLPLUGINS.environm...
        ($rv, $unselected_id) = create_combobox_multiple_from_DBI ($rv, $dbh, $sql, $action, $CuKey, 'unselected', 'uKey', 10, 64, 0, '', $pagedir, $pageset, $htmlTitle, $subTitle, $sessionID, $debug);

        if ( defined $remoteUserLoggedOn ) {
          $CremoteUser = $remoteUserLoggedOn;
          $sql = "select remoteUser, email from $SERVERTABLUSERS where catalogID = '$CcatalogID' and remoteUser = '$CremoteUser'";
        } else {
          my $andActivated = ($action eq 'insertView') ? 'and activated = 1' : '';
          $sql = "select remoteUser, email from $SERVERTABLUSERS where catalogID = '$CcatalogID' and pagedir REGEXP '/$pagedir/' and remoteUser <> 'admin' and remoteUser <> 'sadmin' $andActivated order by email";

applications/htmlroot/cgi-bin/moderator/generateCollectorDaemonSchedulingReport.pl  view on Meta::CPAN

my $pf               = (defined $cgi->param('pf'))              ? $cgi->param('pf')              : 'off';

my $sqlStartDate    = $sqlEndDate - $sqlPeriode;

my $step            = 60;

# Chart Parameters
my $hight           = $yOffset + $AreaBOffset + 2;

# Use yellow as the color for the timeslot schedule
my $noTestColor     = $COLORSRRD{'NO TEST'};
my $offlineColor    = $COLORSRRD{OFFLINE};
my $timeslotColor   = $COLORSRRD{UNKNOWN};

# set: colors
if ($pf eq 'on') {
  $background = 0xF7F7F7;
  $forGround  = 0x000000;
  $axisColor  = 0x0C0C0C;
} else {
  $background = 0x000000;

applications/htmlroot/cgi-bin/moderator/generateCollectorDaemonSchedulingReport.pl  view on Meta::CPAN

      $uKeysSqlWhere = "AND ($uKeysSqlWhere)" if ($uKeysSqlWhere);
      $sql = "SELECT SQL_NO_CACHE $SERVERTABLEVENTS.uKey, $SERVERTABLEVENTS.startDate, $SERVERTABLEVENTS.startTime, $SERVERTABLEVENTS.endDate, $SERVERTABLEVENTS.endTime, $SERVERTABLEVENTS.status, $SERVERTABLEVENTS.timeslot, $SERVERTABLEVENTS.step FRO...
      $sth = $dbh->prepare( $sql ) or ($rv, $errorMessage, $dbiErrorCode, $dbiErrorString) = error_trap_DBI("", "Cannot dbh->prepare: $sql", $debug, '', "", '', "", 0, '', $sessionID);
      $sth->execute() or ($rv, $errorMessage, $dbiErrorCode, $dbiErrorString) = error_trap_DBI("", "Cannot sth->execute: $sql", $debug, '', "", '', "", 0, '', $sessionID) if $rv;
      $sth->bind_columns( \$uKey, \$startDate, \$startTime, \$endDate, \$endTime, \$status, \$timeslot, \$step ) or ($rv, $errorMessage, $dbiErrorCode, $dbiErrorString) = error_trap_DBI("", "Cannot sth->bind_columns: $sql", $debug, '', "", '', "", 0,...

      if ( $rv ) {
        if ( $sth->rows ) {
          while( $sth->fetch() ) { 
            # the color for each bar
            push (@colors, (($status eq 'NO TEST') ? $noTestColor : (($status eq 'OFFLINE') ? $offlineColor : $timeslotColor)));

            # the data points for each test result matching the corresponding label
            push (@dataPoints,         $uKeys{$uKey}->{numberOfLabel});

            # the timeslot start dates and end dates for the tasks
            push (@startDate,          perlchartdir::chartTime2((($timeslot >= $sqlStartDate) ? $timeslot : $sqlStartDate)));
            push (@endDate,            perlchartdir::chartTime2((($timeslot + $step >= $sqlEndDate) ? $sqlEndDate : $timeslot + $step)));

            # the actual start dates and end dates for the tasks up to now
            my ($startYear, $startMonth, $startDay) = split (/-/, $startDate);

applications/tools/mysql/asnmtap-3.002.003-distributed_mysql-v5.0.x.sql  view on Meta::CPAN

  KEY `collectorDaemon` (`collectorDaemon`),
  KEY `collectorDaemons_ibfk_1` (`catalogID`,`serverID`),
  CONSTRAINT `collectorDaemons_ibfk_1` FOREIGN KEY (`catalogID`, `serverID`) REFERENCES `servers` (`catalogID`, `serverID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

/*Data for the table `collectorDaemons` */

insert into `collectorDaemons` (`catalogID`,`collectorDaemon`,`groupName`,`serverID`,`mode`,`dumphttp`,`status`,`debugDaemon`,`debugAllScreen`,`debugAllFile`,`debugNokFile`,`activated`) values ('CID','asnmtap01','Admin Collector [asnmtap01]','asnmtap...
insert into `collectorDaemons` (`catalogID`,`collectorDaemon`,`groupName`,`serverID`,`mode`,`dumphttp`,`status`,`debugDaemon`,`debugAllScreen`,`debugAllFile`,`debugNokFile`,`activated`) values ('CID','asnmtap02','Admin Collector [asnmtap02]','asnmtap...
insert into `collectorDaemons` (`catalogID`,`collectorDaemon`,`groupName`,`serverID`,`mode`,`dumphttp`,`status`,`debugDaemon`,`debugAllScreen`,`debugAllFile`,`debugNokFile`,`activated`) values ('CID','index','Production Daemon','CTP-CENTRAL','C','U',...
insert into `collectorDaemons` (`catalogID`,`collectorDaemon`,`groupName`,`serverID`,`mode`,`dumphttp`,`status`,`debugDaemon`,`debugAllScreen`,`debugAllFile`,`debugNokFile`,`activated`) values ('CID','test','Test Daemon','CTP-CENTRAL','C','U','N','F'...

/*Table structure for table `comments` */

DROP TABLE IF EXISTS `comments`;

CREATE TABLE `comments` (
  `catalogID` varchar(5) NOT NULL default 'CID',
  `id` int(11) NOT NULL auto_increment,
  `uKey` varchar(11) NOT NULL default '',
  `replicationStatus` ENUM('I','U','R') NOT NULL DEFAULT 'I',

applications/tools/mysql/asnmtap-3.002.003-distributed_mysql-v5.0.x.sql  view on Meta::CPAN

  KEY `pagedir` (`catalogID`,`pagedir`),
  KEY `displayDaemon` (`displayDaemon`),
  KEY `displayDaemons_ibfk_2` (`catalogID`,`serverID`),
  CONSTRAINT `displayDaemons_ibfk_1` FOREIGN KEY (`catalogID`, `pagedir`) REFERENCES `pagedirs` (`catalogID`, `pagedir`),
  CONSTRAINT `displayDaemons_ibfk_2` FOREIGN KEY (`catalogID`, `serverID`) REFERENCES `servers` (`catalogID`, `serverID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

/*Data for the table `displayDaemons` */

insert into `displayDaemons` (`catalogID`,`displayDaemon`,`groupName`,`pagedir`,`serverID`,`loop`,`trigger`,`displayTime`,`lockMySQL`,`debugDaemon`,`activated`) values ('CID','index','Production Daemon','index','CTP-CENTRAL','T','F','T','F','F',1);
insert into `displayDaemons` (`catalogID`,`displayDaemon`,`groupName`,`pagedir`,`serverID`,`loop`,`trigger`,`displayTime`,`lockMySQL`,`debugDaemon`,`activated`) values ('CID','test','Test Daemon','test','CTP-CENTRAL','T','F','T','F','F',1);

/*Table structure for table `displayGroups` */

DROP TABLE IF EXISTS `displayGroups`;

CREATE TABLE `displayGroups` (
  `catalogID` varchar(5) NOT NULL default 'CID',
  `displayGroupID` int(11) NOT NULL auto_increment,
  `groupTitle` varchar(100) NOT NULL default '',
  `activated` tinyint(1) NOT NULL default '0',
  PRIMARY KEY (`catalogID`,`displayGroupID`),
  KEY `catalogID` (`catalogID`),
  KEY `displayGroupID` (`displayGroupID`),
  KEY `groupTitle` (`groupTitle`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

/*Data for the table `displayGroups` */

insert into `displayGroups` (`catalogID`,`displayGroupID`,`groupTitle`,`activated`) values ('CID',1,'Testing Collector & Display for the \'Application Monitor\'',1);
insert into `displayGroups` (`catalogID`,`displayGroupID`,`groupTitle`,`activated`) values ('CID',2,'Condenced View Test',1);
insert into `displayGroups` (`catalogID`,`displayGroupID`,`groupTitle`,`activated`) values ('CID',3,'90 Monitoring Servers',1);

/*Table structure for table `environment` */

DROP TABLE IF EXISTS `environment`;

CREATE TABLE `environment` (
  `environment` char(1) NOT NULL default 'L',
  `label` varchar(12) default 'Local',
  PRIMARY KEY (`environment`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

/*Data for the table `environment` */

insert into `environment` (`environment`,`label`) values ('A','Acceptation');
insert into `environment` (`environment`,`label`) values ('D','Development');
insert into `environment` (`environment`,`label`) values ('L','Local');
insert into `environment` (`environment`,`label`) values ('P','Production');
insert into `environment` (`environment`,`label`) values ('S','Simulation');
insert into `environment` (`environment`,`label`) values ('T','Test');

/*Table structure for table `events` */

DROP TABLE IF EXISTS `events`;

CREATE TABLE `events` (
  `catalogID` varchar(5) NOT NULL default 'CID',
  `id` int(11) NOT NULL auto_increment,
  `uKey` varchar(11) NOT NULL default '',
  `replicationStatus` ENUM('I','U','R') NOT NULL DEFAULT 'I',

applications/tools/mysql/asnmtap-3.002.003-distributed_mysql-v5.0.x.sql  view on Meta::CPAN

  `groupName` varchar(64) NOT NULL default '',
  `activated` tinyint(1) NOT NULL default '0',
  PRIMARY KEY (`catalogID`,`pagedir`),
  KEY `catalogID` (`catalogID`),
  KEY `pagedir` (`pagedir`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

/*Data for the table `pagedirs` */

insert into `pagedirs` (`catalogID`,`pagedir`,`groupName`,`activated`) values ('CID','index','Production View',1);
insert into `pagedirs` (`catalogID`,`pagedir`,`groupName`,`activated`) values ('CID','test','Test View',1);

/*Table structure for table `plugins` */

DROP TABLE IF EXISTS `plugins`;

CREATE TABLE `plugins` (
  `catalogID` varchar(5) NOT NULL default 'CID',
  `uKey` varchar(11) NOT NULL default '',
  `test` varchar(100) NOT NULL default '',
  `arguments` varchar(1024) default '',

applications/tools/mysql/asnmtap-3.002.003-distributed_mysql-v5.0.x.sql  view on Meta::CPAN

  `periode` char(1) NOT NULL default 'F',
  `timeperiodID` int(11) NOT NULL default '1',
  `status` tinyint(1) NOT NULL default '0',
  `errorDetails` tinyint(1) NOT NULL default '0',
  `bar` tinyint(1) NOT NULL default '0',
  `hourlyAverage` tinyint(1) NOT NULL default '0',
  `dailyAverage` tinyint(1) NOT NULL default '0',
  `showDetails` tinyint(1) NOT NULL default '0',
  `showComments` tinyint(1) NOT NULL default '0',
  `showPerfdata` tinyint(1) NOT NULL default '0',
  `showTop20SlowTests` tinyint(1) NOT NULL default '0',
  `printerFriendlyOutput` tinyint(1) NOT NULL default '0',
  `formatOutput` varchar(4) NOT NULL default 'pdf',
  `userPassword` varchar(15) NOT NULL default '',
  `activated` tinyint(1) NOT NULL default '0',
  PRIMARY KEY (`catalogID`,`id`),
  KEY `catalogID` (`catalogID`),
  KEY `id` (`id`),
  KEY `uKey` (`uKey`),
  KEY `periode` (`periode`),
  KEY `reportTitle` (`reportTitle`),

applications/tools/mysql/asnmtap-3.002.003_mysql-v5.0.x.sql  view on Meta::CPAN

  KEY `collectorDaemon` (`collectorDaemon`),
  KEY `collectorDaemons_ibfk_1` (`catalogID`,`serverID`),
  CONSTRAINT `collectorDaemons_ibfk_1` FOREIGN KEY (`catalogID`, `serverID`) REFERENCES `servers` (`catalogID`, `serverID`)
) ENGINE=InnoDB;

#
# Data for the table collectorDaemons
#

insert into `collectorDaemons` values ('CID','index','Production Daemon','CTP-CENTRAL','C','U','N','F','F','F','F',0);
insert into `collectorDaemons` values ('CID','test','Test Daemon','CTP-CENTRAL','C','U','N','F','F','F','F',1);

#
# Table structure for table comments
#

DROP TABLE IF EXISTS `comments`;

CREATE TABLE `comments` (
  `catalogID` varchar(5) NOT NULL default 'CID',
  `id` int(11) NOT NULL auto_increment,

applications/tools/mysql/asnmtap-3.002.003_mysql-v5.0.x.sql  view on Meta::CPAN

  KEY `displayDaemons_ibfk_2` (`catalogID`,`serverID`),
  CONSTRAINT `displayDaemons_ibfk_1` FOREIGN KEY (`catalogID`, `pagedir`) REFERENCES `pagedirs` (`catalogID`, `pagedir`),
  CONSTRAINT `displayDaemons_ibfk_2` FOREIGN KEY (`catalogID`, `serverID`) REFERENCES `servers` (`catalogID`, `serverID`)
) ENGINE=InnoDB;

#
# Data for the table displayDaemons
#

insert into `displayDaemons` values ('CID','index','Production Daemon','index','CTP-CENTRAL','T','F','T','F','F',0);
insert into `displayDaemons` values ('CID','test','Test Daemon','test','CTP-CENTRAL','T','F','T','F','F',1);

#
# Table structure for table displayGroups
#

DROP TABLE IF EXISTS `displayGroups`;

CREATE TABLE `displayGroups` (
  `catalogID` varchar(5) NOT NULL default 'CID',
  `displayGroupID` int(11) NOT NULL auto_increment,

applications/tools/mysql/asnmtap-3.002.003_mysql-v5.0.x.sql  view on Meta::CPAN

  PRIMARY KEY (`catalogID`,`displayGroupID`),
  KEY `catalogID` (`catalogID`),
  KEY `displayGroupID` (`displayGroupID`),
  KEY `groupTitle` (`groupTitle`)
) ENGINE=InnoDB;

#
# Data for the table displayGroups
#

insert into `displayGroups` values ('CID',1,'Testing Collector & Display for the \'Application Monitor\'',1);
insert into `displayGroups` values ('CID',2,'Condenced View Test',1);

#
# Table structure for table environment
#

DROP TABLE IF EXISTS `environment`;

CREATE TABLE `environment` (
  `environment` char(1) NOT NULL default 'L',
  `label` varchar(12) default 'Local',
  PRIMARY KEY (`environment`)
) ENGINE=InnoDB;

#
# Data for the table environment
#

insert into `environment` values ('P','Production');
insert into `environment` values ('S','Simulation');
insert into `environment` values ('A','Acceptation');
insert into `environment` values ('T','Test');
insert into `environment` values ('D','Development');
insert into `environment` values ('L','Local');

#
# Table structure for table events
#

DROP TABLE IF EXISTS `events`;

CREATE TABLE `events` (

applications/tools/mysql/asnmtap-3.002.003_mysql-v5.0.x.sql  view on Meta::CPAN

  PRIMARY KEY (`catalogID`,`pagedir`),
  KEY `catalogID` (`catalogID`),
  KEY `pagedir` (`pagedir`)
) ENGINE=InnoDB;

#
# Data for the table pagedirs
#

insert into `pagedirs` values ('CID','index','Production View',1);
insert into `pagedirs` values ('CID','test','Test View',1);

#
# Table structure for table plugins
#

DROP TABLE IF EXISTS `plugins`;

CREATE TABLE `plugins` (
  `catalogID` varchar(5) NOT NULL default 'CID',
  `uKey` varchar(11) NOT NULL default '',

applications/tools/mysql/asnmtap-3.002.003_mysql-v5.0.x.sql  view on Meta::CPAN

  `periode` char(1) NOT NULL default 'F',
  `timeperiodID` int(11) NOT NULL default '1',
  `status` tinyint(1) NOT NULL default '0',
  `errorDetails` tinyint(1) NOT NULL default '0',
  `bar` tinyint(1) NOT NULL default '0',
  `hourlyAverage` tinyint(1) NOT NULL default '0',
  `dailyAverage` tinyint(1) NOT NULL default '0',
  `showDetails` tinyint(1) NOT NULL default '0',
  `showComments` tinyint(1) NOT NULL default '0',
  `showPerfdata` tinyint(1) NOT NULL default '0',
  `showTop20SlowTests` tinyint(1) NOT NULL default '0',
  `printerFriendlyOutput` tinyint(1) NOT NULL default '0',
  `formatOutput` varchar(4) NOT NULL default 'pdf',
  `userPassword` varchar(15) NOT NULL default '',
  `activated` tinyint(1) NOT NULL default '0',
  PRIMARY KEY (`catalogID`,`id`),
  KEY `catalogID` (`catalogID`),
  KEY `id` (`id`),
  KEY `uKey` (`uKey`),
  KEY `periode` (`periode`),
  KEY `reportTitle` (`reportTitle`),

applications/tools/resources/CalendarPopup-combined.js  view on Meta::CPAN


// Text for the word "Today" appearing on the calendar
cal.setTodayText("Today");

// The calendar uses CSS classes for formatting. If you want your calendar to
// have unique styles, you can set the prefix that will be added to all the
// classes in the output.
// For example, normal output may have this:
//     <SPAN CLASS="cpTodayTextDisabled">Today<SPAN>
// But if you set the prefix like this:
cal.setCssPrefix("Test");
// The output will then look like:
//     <SPAN CLASS="TestcpTodayTextDisabled">Today<SPAN>
// And you can define that style somewhere in your page.

// When using Year navigation, you can make the year be an input box, so
// the user can manually change it and jump to any year
cal.showYearNavigationInput();

// Set the calendar offset to be different than the default. By default it
// will appear just below and to the right of the anchorname. So if you have
// a text box where the date will go and and anchor immediately after the
// text box, the calendar will display immediately under the text box.

applications/tools/templates/slave/rsync-mirror-distributed-example.sh  view on Meta::CPAN

# chmod 600 /home/asnmtap/.ssh/authorized_keys
#
# vi /usr/local/etc/sshd_config or /etc/ssh/sshd_config
# PubkeyAuthentication yes
# PermitEmptyPasswords yes
# 
# <master server>:
# vi authorized_keys
# from="asnmtap.citap.be", command ="/opt/asnmtap/applications/master/rsync-wrapper-distributed-asnmtap.citap.com.sh" ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAIEA5o5rh/yScb8506oLJSPRaKR2PCKfI4U/YOSylN7h8w5z5jIO/6W7qKTwWyJ9lPF3c/D6WM2N4cVkVbcprJq+59vxEPCV9jmD...
#                                                                                                                               ^- rsync.pub
# Testing:
# /opt/asnmtap/applications/slave/rsync-mirror-failover-asnmtap.citap.be.sh
# ------------------------------------------------------------------------------

RMVersion='3.002.003'
echo "rsync-mirror-distributed version $RMVersion"

if [ -f ~/.profile ]; then
  source ~/.profile
fi

applications/tools/templates/slave/rsync-mirror-failover-example.sh  view on Meta::CPAN

# chmod 600 /home/asnmtap/.ssh/authorized_keys
# 
# vi /usr/local/etc/sshd_config or /etc/ssh/sshd_config
# PubkeyAuthentication yes
# PermitEmptyPasswords yes
# 
# <master server>:
# vi authorized_keys
# from="asnmtap.citap.be", command ="/opt/asnmtap/applications/master/rsync-wrapper-failover-asnmtap.citap.com.sh" ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAIEA5o5rh/yScb8506oLJSPRaKR2PCKfI4U/YOSylN7h8w5z5jIO/6W7qKTwWyJ9lPF3c/D6WM2N4cVkVbcprJq+59vxEPCV9jmDQjF...
#                                                                                                                            ^- rsync.pub
# Testing:
# /opt/asnmtap/applications/slave/rsync-mirror-failover-asnmtap.citap.be.sh
# ------------------------------------------------------------------------------

RMVersion='3.002.003'
echo "rsync-mirror-failover version $RMVersion"

if [ -f ~/.profile ]; then
  source ~/.profile
fi

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

=head1 NAME

ASNMTAP::Asnmtap is an object-oriented Base Class to build modules that provides a nice object oriented interface for ASNMTAP.

=head1 SYNOPSIS

 use ASNMTAP::Asnmtap;

 my $objectAsnmtap = ASNMTAP::Asnmtap->new (
   _programName        => 'test-asnmtap.pl',
   _programDescription => "Test ASNMTAP::Asnmtap",
   _programVersion     => '3.002.003',
   _programUsagePrefix => '[--commandLineOption]',
   _programHelpPrefix  => "--commandLineOption ...",
   _programGetOptions  => ['commandLineOption=s'],
   _timeout            => 30,
   _debug              => 1);

 my $verbose = $objectAsnmtap->getOptionsArgv ('verbose');
 print "getOptionsArgv: verbose = $verbose\n" if (defined $verbose);

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

ASNMTAP::Asnmtap::Plugins::IO, ASNMTAP::Asnmtap::Plugins::Mail, ASNMTAP::Asnmtap::Plugins::Modem, ASNMTAP::Asnmtap::Plugins::SOAP, ASNMTAP::Asnmtap::Plugins::WebTransact, ASNMTAP::Asnmtap::Plugins::XML

=head1 DEPENDENCIES

  Carp
  Config::General
  Data::Dumper 
  Dumpvalue
  Getopt::Long
  IO::CaptureOutput
  Test::Pod::Coverage
  Test::Simple
  Time::Local

=head1 COPYRIGHT NOTICE

(c) Copyright 2000-2011 by Alex Peeters [alex.peeters@citap.be],
                        All Rights Reserved.

ASNMTAP is based on 'Process System daemons v1.60.17-01', Alex Peeters [alex.peeters@citap.be]

 Purpose: CronTab (CT, sysdCT),

lib/ASNMTAP/Asnmtap/Applications.pm  view on Meta::CPAN

  }

  if ( exists $_config{COLORS}{TABLE} ) {
    $COLORSTABLE{TABLE}       = '#'. $_config{COLORS}{TABLE}{TABLE}      if ( exists $_config{COLORS}{TABLE}{TABLE} );
    $COLORSTABLE{NOBLOCK}     = '#'. $_config{COLORS}{TABLE}{NOBLOCK}    if ( exists $_config{COLORS}{TABLE}{NOBLOCK} );
    $COLORSTABLE{ENDBLOCK}    = '#'. $_config{COLORS}{TABLE}{ENDBLOCK}   if ( exists $_config{COLORS}{TABLE}{ENDBLOCK} );
    $COLORSTABLE{STARTBLOCK}  = '#'. $_config{COLORS}{TABLE}{STARTBLOCK} if ( exists $_config{COLORS}{TABLE}{STARTBLOCK} );
  }
}

our %ENVIRONMENT   = ('P'=>'Production', 'S'=>'Simulation', 'A'=>'Acceptation', 'T'=>'Test', 'D'=>'Development', 'L'=>'Local');

our %ICONS         = ('OK'=>'green.gif','WARNING'=>'yellow.gif','CRITICAL'=>'red.gif','UNKNOWN'=>'clear.gif','DEPENDENT'=>'','OFFLINE'=>'blue.gif','NO DATA'=>'purple.gif','IN PROGRESS'=>'running.gif','NO TEST'=>'notest.gif','TRENDLINE'=>'orange.gif')...
our %ICONSACK      = ('OK'=>'green-ack.gif','WARNING'=>'yellow-ack.gif','CRITICAL'=>'red-ack.gif','UNKNOWN'=>'clear-ack.gif','DEPENDENT'=>'','OFFLINE'=>'blue-ack.gif','NO DATA'=>'purple-ack.gif','IN PROGRESS'=>'running.gif','NO TEST'=>'notest-ack.gif...
our %ICONSUNSTABLE = ('OK'=>'green-unstable.gif','WARNING'=>'yellow-unstable.gif','CRITICAL'=>'red-unstable.gif','UNKNOWN'=>'clear-unstable.gif','DEPENDENT'=>'','OFFLINE'=>'blue-unstable.gif','NO DATA'=>'purple-unstable.gif','IN PROGRESS'=>'running.g...
our %ICONSRECORD   = ('maintenance'=>'maintenance.gif', 'duplicate'=>'recordDuplicate.gif', 'delete'=>'recordDelete.gif', 'details'=>'recordDetails.gif', 'query'=>'recordQuery.gif', 'edit'=>'recordEdit.gif', 'table'=>'recordTable.gif', 'up'=>'1arrowU...
our %ICONSSYSTEM   = ('pidKill'=>'pidKill.gif', 'pidRemove'=>'pidRemove.gif', 'daemonReload'=>'daemonReload.gif', 'daemonStart'=>'daemonStart.gif', 'daemonStop'=>'daemonStop.gif', 'daemonRestart'=>'daemonRestart.gif');

if ( exists $_config{ICONS} ) {
  $ICONS{OK}            = $_config{ICONS}{OK}          if ( exists $_config{ICONS}{OK} );
  $ICONS{WARNING}       = $_config{ICONS}{WARNING}     if ( exists $_config{ICONS}{WARNING} );

lib/ASNMTAP/Asnmtap/Applications.pm  view on Meta::CPAN

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

sub print_header {
  my ($HTML, $pagedir, $pageset, $htmlTitle, $subTitle, $refresh, $onload, $openPngImage, $headScript, $sessionID, $stylesheet) = @_;

  my ($pageDir, $environment) = split (/\//, $pagedir, 2);
  $environment = 'P' unless (defined $environment);

  my $sessionIdOrCookie = ( defined $sessionID ) ? "&amp;CGISESSID=$sessionID" : "&amp;CGICOOKIE=1";
  my $reloadOrToggle    = ( $subTitle =~ /^(?:Full View|Condenced View|Minimal Condenced View)$/ ) ? "<A HREF=\"#\" onClick=\"togglePageDirCookie('pagedir_id_${pageDir}_${environment}', '$HTTPSURL/nav/$pagedir')\">" : "<A HREF=\"#\" onClick=\"reloadP...
  my $selectEnvironment = (( $pagedir ne '<NIHIL>' and $pageset ne '<NIHIL>' ) ? '<form action="" name="environment"><select name="environment" size="1" onChange="loadEnvironmentPageDirCookie(\'' .$pageDir. '\', this.options[this.selectedIndex].value...

  my $showToggle   = ($pagedir ne '<NIHIL>') ? $reloadOrToggle : "<A HREF=\"$HTTPSURL/cgi-bin/$pageset/index.pl?pagedir=$pagedir&amp;pageset=$pageset&amp;debug=F$sessionIdOrCookie\">";
  $showToggle     .= "<IMG SRC=\"$IMAGESURL/toggle.gif\" title=\"Toggle\" alt=\"Toggle\" WIDTH=\"32\" HEIGHT=\"27\" BORDER=0></A>";
  my $showReport   = ($pagedir ne '<NIHIL>') ? "<A HREF=\"$HTTPSURL/nav/$pagedir/reports-$pageset.html\"><IMG SRC=\"$IMAGESURL/report.gif\" title=\"Report\" alt=\"Report\" WIDTH=\"32\" HEIGHT=\"27\" BORDER=0></A>" : '';
  my $showOnDemand = ($pagedir ne '<NIHIL>') ? "<A HREF=\"$HTTPSURL/cgi-bin/runCmdOnDemand.pl?pagedir=$pagedir&amp;pageset=$pageset$sessionIdOrCookie\"><IMG SRC=\"$IMAGESURL/ondemand.gif\" title=\"On demand\" alt=\"On demand\" WIDTH=\"32\" HEIGHT=\"2...
  my $showData     = ($pagedir ne '<NIHIL>') ? "<A HREF=\"$HTTPSURL/cgi-bin/getArchivedReport.pl?pagedir=$pagedir&amp;pageset=$pageset$sessionIdOrCookie\"><IMG SRC=\"$IMAGESURL/data.gif\" title=\"Report Archive\" alt=\"Report Archive\" WIDTH=\"32\" H...
  my $showAwstats  = ($AWSTATSENABLED) ? "<A HREF=\"/awstats/awstats.pl\" target=\"_blank\"><IMG SRC=\"$IMAGESURL/awstats.gif\" title=\"Awstats\" alt=\"Awstats\" WIDTH=\"32\" HEIGHT=\"27\" BORDER=0></A>" : '';
  my $showInfo     = "<A HREF=\"$HTTPSURL/cgi-bin/info.pl?pagedir=$pagedir&amp;pageset=$pageset$sessionIdOrCookie\"><IMG SRC=\"$IMAGESURL/info.gif\" title=\"Info\" alt=\"Info\" WIDTH=\"32\" HEIGHT=\"27\" BORDER=0></A>";

  $stylesheet = "asnmtap.css" unless ( defined $stylesheet );

lib/ASNMTAP/Asnmtap/Applications.pod  view on Meta::CPAN

   vi hosts.allow
   ssh: localhost

   vi hosts.deny
   ssh: ALL

   ssh  -i '/home/asnmtap/.ssh/asnmtap' asnmtap@localhost 'killall number'
   ssh  -i '/home/asnmtap/.ssh/asnmtap' asnmtap@localhost 'remove /opt/asnmtap/pid/CollectorCT-zombie.pid'
   ssh  -i '/home/asnmtap/.ssh/asnmtap' asnmtap@localhost 'script /opt/asnmtap/applications/master/CollectorCT-test.sh stop'

 Test sshWrapperASNMTAP.pl:

    ssh  -i '/home/asnmtap/.ssh/ssh' asnmtap@localhost 'killall number'
      SSH REQUEST FAILED INSPECTION - SKIPPING 'killall number'
      EVALUATING 'killall number'
    or
      Couldn't open log '/opt/asnmtap/log/sshWrapperASNMTAP.log'!

    chmod 664 /opt/asnmtap/log/sshWrapperASNMTAP.log 

    ssh  -i '/home/asnmtap/.ssh/ssh' asnmtap@localhost 'script /opt/asnmtap/applications/master/CollectorCT-Configsol2-environment-probe.sh stop'

lib/ASNMTAP/Asnmtap/Applications.pod  view on Meta::CPAN

  DB_Name     =                "perfparse_asnmtap_v20"
  DB_Pass     =                "passwd"
  DB_Host     =                "localhost"
	DB_Socket   =                "/tmp/mysql.sock"

	# PHPGui
	PHP_Lang    = "en"
	PHP_Style   = "" # "flo"
	http_image_path = "/asnmtap/perfparse20/img/"

=item Testing configuration

 http://asnmtap.citap.be/asnmtap/cgi-bin/perfparse.cgi
 > An error occured with the SQL:
 >   "Could not connect to MySQL using:  Database  = 'asnmtap',  Host  = '127.0.0.1',  Username =  'asnmtap', Password  = 'asnmtap'"
 >
 > Failure Message:
 >   "Access denied for user: 'asnmtap@localhost.localdomain' (Using password: YES)"

 You need to verify your access right for the database

 Host & Service string from Nagios:
   "$TIMET$"\t"$HOSTNAME$"\t"$SERVICEDESC$"\t"$OUTPUT$"\t"$SERVICESTATE$"\t"$PERFDATA$"\n

   $TIMET$		$HOSTNAME$		 	    $SERVICEDESC$		$OUTPUT$											$SERVICESTATE$	$PERFDATA$
   1107692805	chablis.dvkhosting.com	process ColdFusion	OK - 40 processes running with command name cfusion	OK				label=1;2;3;4;5

   Test ASNMTAP Perfparse integration:
   /usr/bin/printf "%b" "1107692900\tDUMMY-T1\tDUMMY-T1\tCRITICAL - Check Dummy: +DUMMY-T2+\tCRITICAL\ttperfdata=1;1;;;\n" | /opt/asnmtap/perfparse/bin/perfparse-log2mysql -c /opt/asnmtap/perfparse/etc/perfparse.cfg

   Look for results into the database and the logfile located at /opt/asnmtap/log/perfparse-asnmtap-all.yyyymmdd.log

   more /opt/asnmtap/log/perfparse-asmtap-all.yyyymmdd.log 
   yyyy/mm/dd hh:mmss1 [   storage.c:95    nnnn  ] storage_mysql module successfully loaded

=item Database Maintenance

Deletion policies are defined at various places with default and user-defined policies available. A policy defines the time at which data is permanently deleted from the DB. The data is deleted by running the provided program 'perfparse-db-purge'. It...

lib/ASNMTAP/Asnmtap/Applications.pod  view on Meta::CPAN

 ... TODO ... NO PART OF NORMAL SETUP ...

=item 5

 plugins/snmptt/snmptt_traps_remove_pending_and_duplicated.pl

 ... TODO ... NO PART OF NORMAL SETUP ...

=back

=item Testing configuration

 ... TODO ... NO PART OF NORMAL SETUP ...

=back

=item NagTrap integration

 ... TODO ... NO PART OF NORMAL SETUP ...

=over 4

lib/ASNMTAP/Asnmtap/Applications.pod  view on Meta::CPAN

=item Configuration of NagTrap for ASNMTAP

 more /opt/asnmtap/applications/htmlroot/snmptraps/.htaccess
 AuthName "CITAP's Nagios Access"
 AuthType Basic
 AuthUserFile /etc/httpd/conf/nagios-htpasswd.users
 require valid-user

 ... TODO ... NO PART OF NORMAL SETUP ...

=item Testing configuration

 ... TODO ... NO PART OF NORMAL SETUP ...

=back

=item Install HTML to PDF converter for Perl

HTMLDOC: http://www.htmldoc.org/

=over 4

lib/ASNMTAP/Asnmtap/Applications.pod  view on Meta::CPAN

 perl -MCPAN -e shell
 install HTML::HTMLDoc

 ln -s /usr/bin/htmldoc /opt/asnmtap/applications/htmlroot/cgi-bin/htmldoc.cgi

 vi httpd.conf
 AcceptPathInfo On
 AddHandler cgi-script .cgi .pl
 Options ExecCGI FollowSymLinks

=item Testing the Software

 htmldoc -f '/opt/asnmtap/results/_ASNMTAP/reports/yyyydmmdd-collectorDaemonSchedulingReports.pl-_ASNMTAP-probe02-Daily.pdf' --bodyimage /opt/asnmtap/applications/htmlroot/img/logos/bodyimage.gif --charset iso-8859-1 --format pdf14 --size A4 --landsc...
 cd /opt/asnmtap/applications/bin
 ./generateCollectorDaemonSchedulingReports.pl -D L
 ls /opt/asnmtap/results/_ASNMTAP/reports/

=back

=item Install ChartDirector 4.x for Perl

lib/ASNMTAP/Asnmtap/Applications.pod  view on Meta::CPAN

 rpm -i libmcrypt-2.5.7-1.2.el4.rf.i386.rpm
 rpm -i libxml2-2.6.26.i386.rpm

 rpm -i httpd-2.0.59.ent.i386.rpm
 rpm -i httpd-suexec-2.0.59.ent.i386.rpm
 rpm -i mysql-5.0.29.RHEL4.1.i386.rpm
 rpm -i mysql-devel-5.0.29.RHEL4.1.i386.rpm

 perl -MCPAN -e 'install Bundle::CPAN'
 perl -MCPAN -e 'install Pod::Coverage'
 perl -MCPAN -e 'install Test::Pod'
 perl -MCPAN -e 'install Module::Signature'

 rpm -i perl-HTML-Tagset-3.03-30.noarch.rpm
 rpm -i perl-HTML-Parser-3.35-6.i386.rpm
 rpm -i perl-URI-1.30-4.noarch.rpm
 rpm -i perl-libwww-perl-5.79-5.noarch.rpm
 rpm -i perl-Crypt-SSLeay-0.51-5.i386.rpm
 rpm -i perl-Date-Calc-5.3-9.i386.rpm

 rpm -i perl-DBI-1.40-8.i386.rpm

lib/ASNMTAP/Asnmtap/Applications.pod  view on Meta::CPAN


 /usr/local/bin/mysql_client_test --host asnmtap

=item Perl

 perl -MCPAN -e 'reload index'
 perl -MCPAN -e 'install Date::Manip'
 perl -MCPAN -e 'install LWP::UserAgent'
 perl -MCPAN -e 'install Statistics::Descriptive'
 perl -MCPAN -e 'install Text::ParseWords'
 perl -MCPAN -e 'install Test::Pod'
 perl -MCPAN -e 'install Net::Daemon'
 perl -MCPAN -e 'install Bundle::DBI'
 perl -MCPAN -e 'install Bundle::DBD::mysql'
 perl -MCPAN -e 'install Net::SNMP'
 perl -MCPAN -e 'install Config::IniFiles'

=back

=back



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