view release on metacpan or search on metacpan
ALTER TABLE `catalog` ADD INDEX `catalogName` (`catalogName`)
ALTER TABLE `collectorDaemons` ADD INDEX `collectorDaemon` (`collectorDaemon`)
ALTER TABLE `countries` ADD INDEX `countryName` (`countryName`)
ALTER TABLE `displayDaemons` ADD INDEX `displayDaemon` (`displayDaemon`)
ALTER TABLE `displayGroups` ADD INDEX `groupTitle` (`groupTitle`)
ALTER TABLE `holidays` ADD INDEX `holiday` (`holiday`)
ALTER TABLE `holidaysBundle` ADD INDEX `holidayBundleName` (`holidayBundleName`)
ALTER TABLE `language` ADD INDEX `languageName` (`languageName`)
ALTER TABLE `pagedirs` ADD INDEX `pagedir` (`pagedir`)
ALTER TABLE `reports` ADD INDEX `reportTitle` (`reportTitle`)
ALTER TABLE `resultsdir` ADD INDEX `groupName` (`groupName`)
ALTER TABLE `servers` ADD INDEX `serverTitle` (`serverTitle`)
ALTER TABLE `timeperiods` ADD INDEX `timeperiodName` (`timeperiodName`)
ALTER TABLE `users` ADD INDEX `remoteUser` (`remoteUser`)
- NEW importDataThroughCatalog.sh and importDataThroughCatalog.pl
ALTER TABLE `displayGroups` DROP INDEX `displayGroupID`, ADD INDEX `displayGroupID` (`displayGroupID`)
ALTER TABLE `holidaysBundle` DROP INDEX `holidayBundleID`, ADD INDEX `holidayBundleID` (`holidayBundleID`)
ALTER TABLE `reports` DROP INDEX `id`, ADD INDEX `id` (`id`)
ALTER TABLE `timeperiods` DROP INDEX `timeperiodID`, ADD INDEX `timeperiodID` (`timeperiodID`)
- NEW asnmtap-importDataThroughCatalog.sh and root-importDataThroughCatalog.sh
- NEW integration for SDE (applications/custom/sde.pm-orig) into display.pl
- ALTER TABLE `reports` DROP PRIMARY KEY;
- ALTER TABLE `reports` ADD COLUMN `catalogID` varchar(5) NOT NULL default 'CID' FIRST;
- ALTER TABLE `reports` ADD INDEX `catalogID` (`catalogID`);
- ALTER TABLE `reports` ADD PRIMARY KEY (`catalogID`,`id`);
- ALTER TABLE `reports_perfdata` DROP PRIMARY KEY;
- ALTER TABLE `reports_perfdata` ADD COLUMN `catalogID` varchar(5) NOT NULL default 'CID' FIRST;
- ALTER TABLE `reports_perfdata` ADD INDEX `catalogID` (`catalogID`);
- ALTER TABLE `reports_perfdata` ADD PRIMARY KEY (`catalogID`,`uKey`,`metric_id`);
- ALTER TABLE `resultsdir` DROP PRIMARY KEY;
- ALTER TABLE `resultsdir` ADD COLUMN `catalogID` varchar(5) NOT NULL default 'CID' FIRST;
- ALTER TABLE `resultsdir` ADD INDEX `catalogID` (`catalogID`);
- ALTER TABLE `resultsdir` ADD PRIMARY KEY (`catalogID`,`resultsdir`);
- ALTER TABLE `servers` DROP PRIMARY KEY;
- ALTER TABLE `servers` ADD COLUMN `catalogID` varchar(5) NOT NULL default 'CID' FIRST;
- ALTER TABLE `servers` ADD INDEX `catalogID` (`catalogID`);
- ALTER TABLE `servers` ADD PRIMARY KEY (`catalogID`,`serverID`);
- ALTER TABLE `timeperiods` ADD UNIQUE KEY `timeperiodID` (`timeperiodID`);
- ALTER TABLE `timeperiods` DROP PRIMARY KEY;
- ALTER TABLE `timeperiods` ADD COLUMN `catalogID` varchar(5) NOT NULL default 'CID' FIRST;
- ALTER TABLE `timeperiods` ADD INDEX `catalogID` (`catalogID`);
- ALTER TABLE `comments` ADD CONSTRAINT `comments_ibfk_1` FOREIGN KEY (`catalogID`,`uKey`) REFERENCES `plugins` (`catalogID`,`uKey`);
- ALTER TABLE `comments` ADD CONSTRAINT `comments_ibfk_2` FOREIGN KEY (`catalogID`,`remoteUser`) REFERENCES `users` (`catalogID`,`remoteUser`);
- ALTER TABLE `crontabs` ADD CONSTRAINT `crontabs_ibfk_1` FOREIGN KEY (`catalogID`,`collectorDaemon`) REFERENCES `collectorDaemons` (`catalogID`,`collectorDaemon`);
- ALTER TABLE `crontabs` ADD CONSTRAINT `crontabs_ibfk_2` FOREIGN KEY (`catalogID`,`uKey`) REFERENCES `plugins` (`catalogID`,`uKey`);
- ALTER TABLE `displayDaemons` ADD CONSTRAINT `displayDaemons_ibfk_1` FOREIGN KEY (`catalogID`,`pagedir`) REFERENCES `pagedirs` (`catalogID`,`pagedir`);
- ALTER TABLE `displayDaemons` ADD CONSTRAINT `displayDaemons_ibfk_2` FOREIGN KEY (`catalogID`,`serverID`) REFERENCES `servers` (`catalogID`,`serverID`);
- ALTER TABLE `eventsChangesLogData` ADD INDEX `eventsChangesLogData_ibfk_1` (`catalogID`,`uKey`);
- ALTER TABLE `eventsChangesLogData` ADD CONSTRAINT `eventsChangesLogData_ibfk_1` FOREIGN KEY (`catalogID`,`uKey`) REFERENCES `plugins` (`catalogID`,`uKey`);
- ALTER TABLE `holidays` ADD CONSTRAINT `holidays_ibfk_1` FOREIGN KEY (`countryID`) REFERENCES `countries` (`countryID`);
- ALTER TABLE `holidaysBundle` ADD CONSTRAINT `holidaysBundle_ibfk_1` FOREIGN KEY (`countryID`) REFERENCES `countries` (`countryID`);
- ALTER TABLE `plugins` ADD CONSTRAINT `plugins_ibfk_1` FOREIGN KEY (`catalogID`,`resultsdir`) REFERENCES `resultsdir` (`catalogID`,`resultsdir`);
- ALTER TABLE `plugins` ADD INDEX `plugins_ibfk_2` (`catalogID`,`holidayBundleID`);
- ALTER TABLE `plugins` ADD CONSTRAINT `plugins_ibfk_2` FOREIGN KEY (`catalogID`,`holidayBundleID`) REFERENCES `holidaysBundle` (`catalogID`,`holidayBundleID`);
- ALTER TABLE `reports` ADD CONSTRAINT `reports_ibfk_1` FOREIGN KEY (`catalogID`,`uKey`) REFERENCES `plugins` (`catalogID`,`uKey`);
- ALTER TABLE `reports` ADD CONSTRAINT `reports_ibfk_2` FOREIGN KEY (`catalogID`,`timeperiodID`) REFERENCES `timeperiods` (`catalogID`,`timeperiodID`);
- ALTER TABLE `reports_perfdata` ADD CONSTRAINT `reports_perfdata_ibfk_1` FOREIGN KEY (`catalogID`,`uKey`) REFERENCES `plugins` (`catalogID`,`uKey`);
- ALTER TABLE `titles` ADD CONSTRAINT `titles_ibfk_1` FOREIGN KEY (`keyLanguage`) REFERENCES `language` (`keyLanguage`);
- ALTER TABLE `users` ADD CONSTRAINT `users_ibfk_1` FOREIGN KEY (`keyLanguage`) REFERENCES `language` (`keyLanguage`);
- ALTER TABLE `views` ADD CONSTRAINT `views_ibfk_1` FOREIGN KEY (`catalogID`,`displayDaemon`) REFERENCES `displayDaemons` (`catalogID`,`displayDaemon`);
- ALTER TABLE `views` ADD CONSTRAINT `views_ibfk_2` FOREIGN KEY (`catalogID`,`displayGroupID`) REFERENCES `displayGroups` (`catalogID`,`displayGroupID`);
- ALTER TABLE `views` ADD CONSTRAINT `views_ibfk_3` FOREIGN KEY (`catalogID`,`uKey`) REFERENCES `plugins` (`catalogID`,`uKey`);
Version 3.000.018, 2008/07/07, by Alex Peeters.
- security update
Version 3.000.017, 2008/06/09, by Alex Peeters with contributions from Yves Van den Hove.
Makefile.PL
- version update Bundle::DBI: 1.604
- version update CGI: 3.37
- version update CGI::Session: 4.30
- version update CPAN: 1.9205
- version update CPANPLUS: 0.84
- version update Compress::Zlib: 2.010
- version update Config::General: 2.38
- version update Crypt::OpenSSL::X509: 0.6
- version update Crypt::SSLeay: 0.57
- version update Cwd: 3.2701
- version update DateTime: 0.42
- version update DateTime::Format::Epoch: 0.11
- version update Email::Simple: 2.003
- version update Getopt::Long: 2.37
- version update HTTP::Daemon::SSL: 1.04
- version update IO::CaptureOutput: 1.0801
ASNMTAP::Asnmtap::Plugins::Nagios
- NEW Makefile.PL Net::Ifconfig::Wrapper
ASNMTAP::Asnmtap::Plugins::WebTransact
- UPDATE POD with 'Qs_var => [..., submain => RET_SUBMAIN, title1 => RET_TITLE1]'
Version 3.000.015, 2007/10/21, by Alex Peeters with contributions from Yves Van den Hove.
Makefile.PL
- version update CPAN 1.9102
- version update CGI 3.29
- version update Compress::Zlib 2.004
- version update Config::General 2.33
- version update Crypt::OpenSSL::RSA 0.25
- version update Crypt::OpenSSL::X509 0.5
- version update Crypt::SSLeay 0.56
- version update Cwd 3.25
- version update Bundle::DBD::mysql 4.005
- version update IO::Socket::SSL 1.07
- version update NetAddr::IP 4.007
- version update WSRF::Lite 0.8.2.2
- version update XML::LibXML 1.63
ASNMTAP::Asnmtap::SOAP.pm
- NEW added basic authentication and credentials
- NEW added soapaction and readable
ASNMTAP::Asnmtap::Plugins::WebTransact.pm
- NEW Inherited LWP user agent object: $objectWebTransact->ua = LWP::UserAgent->new;
check_template-WebTransact-XML-Monitoring.pl & check_template-WebTransact-XML-Monitoring.t
- NEW WebTransact plugin template for XML Monitoring
check_template-WebTransact-with-client-authorization.pl & check_template-WebTransact-with-client-authorization.t
- NEW WebTransact plugin template with client authorization
detailedStatisticsReportGenerationAndCompareResponsetimeTrends.pl
- add corresponding comments to the report
generateReports.pl & getArchivedReport.pl
- add support for timeperiod
Version 3.000.013, 2007/02/25, ASNMTAP
- add BEGIN { if ( $ENV{ASNMTAP_PERL5LIB} ) { eval 'use lib ( "$ENV{ASNMTAP_PERL5LIB}" )'; } }
- FIX replace <script language="JavaScript..."> with <script language="JavaScript..." type="text/javascript">
- UPDATE Mozilla/5.0 compatible
- UPDATE CSE HTML Validator version 1.2.3 compatible
- UPDATE CSS Level 2.1 compatible
- UPDATE MySQL 5.0.x compatible
Makefile.PL
- version update Bundle::DBD::mysql 4.001
- version update CGI::Session 4.20
- version update Compress::Zlib 2.003
- version update Crypt::OpenSSL::X509 0.4
- version update Crypt::SSLeay 0.53
- version update Cwd 3.24
- version update DateTime 0.36
- version update Email::Simple 1.996
- NEW ExtUtils::Autoconf 0.02
- version update Getopt::Long 2.36
- version update IO::Socket::SSL 1.02
- version update Net::IMAP::Simple 1.16
- version update Time::HiRes 1.9704
- FIX regarding 'Please re-enter entry date/time: Date/Time are into the future!'
- FIX regarding 'Please re-enter solved date/time: Date/Time are into the future!'
crontab verify disable email when ...
- By default cron jobs sends a email to the user account executing the cronjob.
Because this is not needed we put the following command At the end of the cron job line.
'> /dev/null (default)' or '> /dev/null 2>&1'
detailedStatisticsReportGenerationAndCompareResponsetimeTrends.pl, generateChart.pl & htmlToPdf.pl
- add my $timeperiodID = (defined $cgi->param('timeperiodID')) ? $cgi->param('timeperiodID') : 'none';
display.pl
- add -c, --creationTime=<YYYY-MM-DD HH:MM:SS>, YYYY-MM-DD HH:MM:SS: year, month, day, hours, minutes and seconds to use instead of the current time when --loop = F
- add sort results by status, group, comments and then by time
- FIX <\\/embed> added
- FIX stop caching sound during refresh when sound off
- FIX when downtime into the future, problem with the 'Condended View'
- UPDATE replace '$TcommentData =~ s/<br><br>/<br>/g;' with '$TcommentData =~ s/(?:<br>)+/<br>/g;'
display.pl and plugins.pl
- FIX interval/step must be greather then 0!
getArchivedDisplays.pl
- NEW Archived Displays
generateConfig.pl
- FIX all SQL select statements regarding *.activated = 1 and add when needed
- added print text to fix rights regarding chmod 755 for new CollectorCT-.*sh or DisplayCT-.*sh script
- added edit, delete, duplicate and maintenance button for 'Plugin' and 'Help Plugin Filename'
holidayBundleSetDowntimes.pl
- FIX Global symbol "$SERVERTABLENVIRONMENT" requires explicit package name at ./holidayBundleSetDowntimes.pl line 152.
plugins.pl
- making it possible to edit 'Help Plugin Filename' manual or by uploading and to clear with '<NIHIL>'
runStatusOnDemand.pl
- UPDATE doRequestedActions: added -o 'StrictHostKeyChecking=no' -o 'UserKnownHostsFile=$WWWKEYPATH/.ssh/known_hosts'
rsync-wrapper-*.sh
- UPDATE advanced debug information
- UPDATE making rsync version 2.6.7
/applications/bin/
- UPDATE generateCollectorDaemonSchedulingReports.sh
- UPDATE generateReports.sh
NEW applications/htmlroot/JSFX_Browser.js
NEW applications/htmlroot/JSFX_Falling.js
NEW applications/htmlroot/JSFX_Fireworks.js
NEW applications/htmlroot/JSFX_Fireworks2.js
NEW applications/htmlroot/JSFX_Halloween.js
NEW applications/htmlroot/JSFX_Layer.js
ASNMTAP::Asnmtap::Applications::CGI
- NEW timeperiods.pl
ASNMTAP::Asnmtap::Plugins and ASNMTAP::Asnmtap::Plugins::WebTransact
- FIX debug information must be into the debug file '*.html' or '*.html-KnownError' but never into both
- added info regarding keep_alive and SSL session resume
- added do not proxy requests to the given domains. Calling no_proxy without any domains clears the list of domains.
ASNMTAP::Asnmtap::Plugins::Nagios
- NEW check_fs-stat.pl
ASNMTAP::Asnmtap::Plugins::SOAP
- add TYPE_ERROR_RETURN
ASNMTAP::Asnmtap::Plugins::WebTransact & runCmdOnDemand.pl
- ADDED remove password from Basic Authentication URL before putting into database!
Version 3.000.012, 2006/12/20, Central and Distributed support
- added common variable TYPEMONITORING to Asnmtap.cnf
fixRights.sh
- updated: script om rechten (chmod en chown) te zetten
Makefile.PL
- version update CPAN 1.8802 & CPANPLUS 0.076
- version update ExtUtils::MakeMaker 6.31
- version update Module::AutoInstall 1.03
- version update Bundle::DBI 1.53
- version update CGI 3.25
- version update Compress::Zlib 2.003
- version update Config::General 2.31
- version update Config::General::Interpolated 2.07
- version update Crypt::OpenSSL::RSA 0.24
- version update Cwd 3.23
- version update Data::Dumper 2.121
- version update DateTime 0.35
- version update DateTime::Format::W3CDTF 0.04
- version update Device::Modem 1.47
- version update Digest::MD5 2.36
- version update Email::Simple 1.995
- 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
- 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
FIX Popup Calendar
- replace document.forms[0].endDate with document.forms[1].endDate
collector.pl
- add automatically the environment at the end off the title
collector.pl & display.pl
- update atime and mtime from the PID file every timeslot
- email message for started, stopped & reloaded
collectorCrontabSchedulingReports.pl & collectorDaemonSchedulingReports.pl
- show only the Plugins regarding correspondending server
comments.pl & holidayBundleSetDowntimes.pl
- Sending email for: Downtime Scheduling
detailedStatisticsReportGenerationAndCompareResponsetimeTrends.pl
- Problem details: link to the correspondending 'Debug Report' when 'Format Output' equals 'HTML'
detailedStatisticsReportGenerationAndCompareResponsetimeTrends.pl, generateChart.pl & trendlineCorrectionReports.pl
- replace round(avg(duration), 2) with round(avg(time_to_sec(duration)), 2) because of wrong averages
display.pl
- possibility for sound on/off
- onderdrukking ledige groepen in full view
- vermelden op welke probe een test wordt uitgevoerd
- onderdrukken niet persistent downtimes in condenced view
- mask password for '--dnPass=', used by check_template-ldap.pl
- environment icons, exclaim popup window for plugins and comments
- 'In Progress'-animated icon replaced with 'In Progress'-static icon for faster display!
- de debugrapporten onderaan de view enkel aanklikbaar maken als de file via rsync al aanwezig is op het moment van de display generatie, ter voorkoming van 404 errors.
- add console messages: 'No Monitored Applications', 'All Monitored Applications are OK', '..., probably collector/config problems!' & , '..., probably database problems!'
displayDaemons.pl
- add 'ServerID' into general view
detailedStatisticsReportGenerationAndCompareResponsetimeTrends.pl
- add a checkbox, to choose output destination: HTML/PDF
getArchivedReport.pl & getArchivedResults.pl
- YYYY/MM/DD notatie met voorloopnullen voor maand en dag
generateConfig.pl
- check for 'help plugin filenames' without plugin reference
- ... already generated / will be generated
- ... generated / generation failed
generatedReports.pl, plugins & reports.pl
- remove 'reportTitle'
get_ArchivedReport.pl & get_ArchivedResults.pl
- replace 'Week #' with 'Week # from monday off week until sunday off week'
plugins.pl
- upload for Help Plugin Filename (PDF)
- controle op '{}' bij ingeven van de value voor het veld 'Title:'
pluginCrontabSchedulingReports.pl
- show only the Plugins regarding correspondending server
removeModulePerl.pl
- NEW
rsync-mirror-*.sh
- replace: rsync -e "ssh -i $KeyRsync" -a $Delete $AdditionalParams $Source $Target
with: ssh=<sshpath>; $Rsync -e "$ssh -i $KeyRsync" -a $Delete $AdditionalParams $Source $Target
runCmdOnDemand.pl
- mask password for '--dnPass=', used by check_template-ldap.pl
runStatusOnDemand.pl
- FIX 'Command: not found.' must be 'No Display|Collector daemons defined'
trendlineCorrectionReports.pl
- show only the Plugins regarding correspondending server and order by Title
user.pl
- Sending email for: Downtime Scheduling & Generated Reports
Version 3.000.011, 2006/09/16, ASNMTAP::Asnmtap::Applications
- add `environment` char(1) NOT NULL default 'L' to TABLE `plugins`
display.pl, plugins.pl & generateConfig.pl
- add environment
collector.pl
- add $perfParseMethode
- 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
- `arguments` from varchar(100) to varchar(254)
- `argumentsOndemand` from varchar(100) to varchar(254)
Version 3.000.008, 2006/05/01, ASNMTAP::Asnmtap::Plugins::Mail
- add 7bit mime decoding
ASNMTAP::Asnmtap::Plugins::WebTransact
- making W3C XHTML compatible
- add gzip decompression
- add Keep-Alive support for HTTP/1.1
- add protocol
- indent_level depricated
generateChart.pl
- FIX missing title chart
- FIX missing mkdir etc for distributed systems
runCmdOnDemand.pl
- making W3C XHTML compatible
Version 3.000.003, 2006/02/03, ASNMTAP CPAN module
This ASNMTAP CPAN library and Plugin templates are free software; you can
redistribute it and/or modify it under the same terms as Perl itself.
The other parts of ASNMTAP may be used and modified free of charge by anyone
so long as this copyright notice and the comments above remain intact. By
using this code you agree to indemnify Alex Peeters from any liability that
might arise from it's use.
Selling the code for this program without prior written consent is expressly
forbidden. In other words, please ask first before you try and make money off
of my program.
Obtain permission before redistributing this software over the Internet or
in any other medium. In all cases copyright and header must remain intact.
Version 3.000.002, 2006/01/08, we actually started a total rewrite into Object Oriented Perl: ASNMTAP Package Object Oriented Perl
package ASNMTAP::Asnmtap
DirectoryIndex index.htm index.html index.html.var index.shtml index.cfm index.pl
<VirtualHost *:80>
ServerName asnmtap.citap.com
ServerAlias asnmtap.citap.be
ServerAdmin webmaster@citap.com
DocumentRoot /opt/asnmtap/applications/htmlroot
ErrorLog /var/log/httpd/asnmtap.citap.com-error.log
CustomLog /var/log/httpd/asnmtap.citap.com-combined.log combined
IndexIgnore *.png *nok.txt *all.txt *.html
IndexOptions NameWidth=* FancyIndexing FoldersFirst SuppressDescription
IndexOrderDefault Ascending Name
# when ASNMTAP is not installed into '/opt/asnmtap/' you need to add SetEnv ASNMTAP_PATH
# SetEnv ASNMTAP_PATH /opt/asnmtap/
Alias /asnmtap "/opt/asnmtap/applications/htmlroot"
<Directory "/opt/asnmtap/applications/htmlroot">
AllowOverride AuthConfig
Options FollowSymLinks
Order allow,deny
Allow from all
</Directory>
Alias /results "/opt/asnmtap/results"
<Directory "/opt/asnmtap/results">
HeaderName HEADER.html
ReadmeName FOOTER.html
AllowOverride AuthConfig
Options Indexes
# Options Indexes FollowSymLinks
Order allow,deny
Allow from all
</Directory>
Alias /config "/opt/asnmtap/applications/tmp/config"
<Directory "/opt/asnmtap/applications/htmlroot/cgi-bin">
AllowOverride AuthConfig
Options ExecCGI
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
restart your web server
Install MySQL client need to be installed
-----------------------------------------
MySQL version 4.x
mysql -u root -p < /opt/asnmtap/applications/tools/mysql/asnmtap-3.002.003.sql
or
mysql -u root -p < /opt/asnmtap/applications/tools/mysql/asnmtap-3.002.003-distributed.sql
applications/tmp/.exists
applications/tmp/config/.exists
applications/tmp/cgisess/.exists
log/.exists
pid/.exists
plugins/tmp/.exists
results/.exists
lib/ASNMTAP/PseudoHash.pm
lib/ASNMTAP/PseudoHash.pod
lib/ASNMTAP/Time.pm
lib/ASNMTAP/Time.pod
lib/ASNMTAP/Asnmtap.pm
lib/ASNMTAP/Asnmtap.pod
applications/bin/importDataThroughCatalog.sh
applications/bin/root-importDataThroughCatalog.sh
applications/custom/cartography.pm-orig
applications/custom/display.pm-orig
applications/custom/sde.pm-orig
applications/custom/sde-supportRequest.pm-orig
applications/custom/supportRequest.pm-orig
applications/htmlroot/AnchorPosition.js
applications/htmlroot/asnmtap-results.css
applications/htmlroot/asnmtap.css
applications/htmlroot/CalendarPopup.js
applications/htmlroot/date.js
applications/htmlroot/JSFX_Browser.js
applications/htmlroot/JSFX_Falling.js
applications/htmlroot/JSFX_Fireworks.js
applications/htmlroot/JSFX_Fireworks2.js
applications/htmlroot/JSFX_Halloween.js
applications/htmlroot/JSFX_Layer.js
applications/htmlroot/md5.js
applications/htmlroot/cgi-bin/admin/countries.pl
applications/htmlroot/cgi-bin/admin/crontabs.pl
applications/htmlroot/cgi-bin/admin/generateConfig.pl
applications/htmlroot/cgi-bin/admin/holidays.pl
applications/htmlroot/cgi-bin/admin/holidaysBundle.pl
applications/htmlroot/cgi-bin/admin/index.pl
applications/htmlroot/cgi-bin/admin/languages.pl
applications/htmlroot/cgi-bin/admin/plugins.pl
applications/htmlroot/cgi-bin/admin/reports.pl
applications/htmlroot/cgi-bin/admin/reports_perfdata.pl
applications/htmlroot/cgi-bin/admin/resultsdirs.pl
applications/htmlroot/cgi-bin/admin/timeperiods.pl
applications/htmlroot/cgi-bin/admin/users.pl
applications/htmlroot/cgi-bin/admin/views.pl
applications/htmlroot/cgi-bin/moderator/collectorCrontabSchedulingReports.pl
applications/htmlroot/cgi-bin/moderator/collectorDaemonSchedulingReports.pl
applications/htmlroot/cgi-bin/moderator/comments.pl
applications/htmlroot/cgi-bin/moderator/downtimes.pl
applications/htmlroot/cgi-bin/moderator/generateCollectorCrontabSchedulingReport.pl
applications/htmlroot/cgi-bin/moderator/generateCollectorDaemonSchedulingReport.pl
applications/htmlroot/img/red-ack.gif
applications/htmlroot/img/red-unstable.gif
applications/htmlroot/img/report.gif
applications/htmlroot/img/running.gif
applications/htmlroot/img/spacer.gif
applications/htmlroot/img/snowflake-1.gif
applications/htmlroot/img/snowflake-2.gif
applications/htmlroot/img/snowflake-3.gif
applications/htmlroot/img/snowflake-4.gif
applications/htmlroot/img/start.gif
applications/htmlroot/img/startRefresh.gif
applications/htmlroot/img/stop.gif
applications/htmlroot/img/stopRefresh.gif
applications/htmlroot/img/toggle.gif
applications/htmlroot/img/up.gif
applications/htmlroot/img/yellow.gif
applications/htmlroot/img/yellow-ack.gif
applications/htmlroot/img/yellow-unstable.gif
applications/htmlroot/pdf/ApplicationMonitorVersion2.000.xxx.pdf
applications/htmlroot/pdf/CheckDummy.pdf
applications/htmlroot/snmptraps/index.php
applications/sbin/sshWrapperASNMTAP.pl
applications/tools/mysql/asnmtap-3.002.003_mysql-v5.0.x.sql
applications/tools/mysql/asnmtap-3.002.003_mysql-v5.0.x-trigger-events.sql
applications/tools/mysql/asnmtap-3.002.003_mysql-v5.0.x-trigger-eventsUpdate.sql
applications/tools/mysql/asnmtap-3.002.003_mysql-v5.0.x-trigger-eventsDisplayData.sql
applications/tools/mysql/asnmtap-3.002.003-distributed_mysql-v5.0.x.sql
applications/tools/mysql/asnmtap-3.002.003-database-schema.png
applications/tools/mysql/MySQLBackup.sh
applications/tools/resources/CalendarPopup-combined-compact.js
applications/tools/resources/CalendarPopup-combined.js
applications/tools/templates/CollectorCT-template.sh
applications/tools/templates/DisplayCT-template.sh
applications/tools/templates/FOOTER.html
applications/tools/templates/HEADER.html
applications/tools/templates/master/rsync-wrapper-distributed-example.sh
applications/tools/templates/master/rsync-wrapper-distributed-template.sh
applications/tools/templates/master/rsync-wrapper-failover-example.sh
applications/tools/templates/master/rsync-wrapper-failover-template.sh
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
etc/ppp/peers/ASNMTAP
etc/ppp/resolv/ASNMTAP
usr/bin/plog plog
usr/bin/poff poff
usr/bin/pon pon
plugins/tools/removeModulePerl.pl
plugins/tools/GrinderCaptureConverter.pl
MANIFEST.SKIP view on Meta::CPAN
^ASNMTAP-3.002.003.tar.gz$
^Makefile$
^MANIFEST.bak$
^MANIFEST-3.002.003$
^TODO$
\bautoconf/\b
\bapplications/etc/\b
\bapplications/htmlroot/nav/\b
\bapplications/master/\b
\bapplications/slave/\b
\bresults/\b
^t/APPLICATIONS_
^t/PLUGINS_
--- #YAML:1.0
name: ASNMTAP
version: 3.002003
abstract: Application System Network Monitoring Toolkit Alex Peeters
author:
- Alex Peeters <alex.peeters@citap.com>
license: perl
distribution_type: module
configure_requires:
ExtUtils::MakeMaker: 0
build_requires:
ExtUtils::MakeMaker: 0
requires:
Bundle::DBD::mysql: 4.004
Bundle::DBI: 1.604
Bundle::LWP: 1.11
CGI: 3.37
Compress::Zlib: 2.010
Config::General: 2.38
Config::General::Interpolated: 2.07
CPAN: 1.9205
CPANPLUS: 0.84
Crypt::OpenSSL::RSA: 0.26
Crypt::OpenSSL::X509: 1.2
Crypt::SSLeay: 0.56
Cwd: 3.25
Data::Dumper: 2.121
Date::Calc: 5.4
Makefile.PL view on Meta::CPAN
Asnmtap/Plugins/Modem
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
[ 'applications/etc', 'd' ],
[ 'applications/slave', 'd' ],
[ 'applications/master', 'd' ],
[ 'applications/htmlroot/nav', 'd' ],
[ 'applications/tmp', 'd' ],
[ 'applications/tmp/config', 'd' ],
[ 'applications/tmp/cgisess', 'd' ],
[ 'results', 'd' ],
]
],
[ '*001000', 'Subclass CGI Interface', 'ASNMTAP::Asnmtap::Applications::CGI', { 'ASNMTAP::Asnmtap::Applications' => '*0010', 'CGI::Session' => '4.30', 'Date::Calc' => '5.4', 'Proc::ProcessTable' => '0.42', 'NetAddr::IP' => '4.007', 'Time::Local' ...
[
[ 'applications/htmlroot/*.css', 'r' ],
[ 'applications/htmlroot/*.js', 'x' ],
[ 'applications/htmlroot/cgi-bin/*.pl', 'x' ],
[ 'applications/htmlroot/cgi-bin/*.book', 'R' ],
[ 'applications/htmlroot/cgi-bin/*.sh', 'x' ],
Makefile.PL view on Meta::CPAN
[ 'applications/htmlroot/img/*.gif', 'r' ],
[ 'applications/htmlroot/img/*.jpg', 'r' ],
[ 'applications/htmlroot/img/*.png', 'r' ],
[ 'applications/htmlroot/img/fw0/*.gif', 'r' ],
[ 'applications/htmlroot/img/logos/bodyimage.gif', 'R' ],
[ 'applications/htmlroot/pdf/*.pdf', 'r' ],
[ 'applications/htmlroot/sound/*.wav', 'r' ],
[ 'applications/tools/resources/*.js', 'r' ],
[ 'applications/tools/templates/*.sh', 'x' ],
[ 'applications/tools/templates/*.html', 'r' ],
[ 'applications/tools/templates/master/*.sh', 'x' ],
[ 'applications/tools/templates/slave/*.conf', 'r' ],
[ 'applications/tools/templates/slave/*.sh', 'x' ],
Makefile.PL view on Meta::CPAN
[ 'plugins/nagios/templates/xml/*.xml-*', 'r' ],
]
],
[ '*011101', 'IO support', 'ASNMTAP::Asnmtap::Plugins::IO', { 'ASNMTAP::Asnmtap::Plugins' => '*0011', 'IO' => '1.23' }, 1, [], [] ],
[ '*001102', 'Mail support', 'ASNMTAP::Asnmtap::Plugins::Mail', { 'ASNMTAP::Asnmtap::Plugins' => '*0011', 'Date::Calc' => '5.4', 'Email::Simple' => '2.003', 'IO::String' => '1.08', 'Mail::POP3Client' => '2.18', 'Mail::Sendmail' => '0....
[ '*001103', 'Modem support', 'ASNMTAP::Asnmtap::Plugins::Modem', { 'ASNMTAP::Asnmtap::Plugins' => '*0011', 'IO' => '1.23', ( $^O eq 'MSWin32' ? ('Win32::SerialPort' => '0.19', 'Win32::API' => '0.41', 'Win32::RASE' => '1.01') : ('Device...
[
[ '/etc/chatscripts/ASNMTAP', 'R' ],
[ '/etc/ppp/pap-secrets', 'R' ],
[ '/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 = ();
# Allow us to suppress all program installation with the -n (library only) option.
# This is for those that don't want to mess with the configuration section of this file.
use Getopt::Std;
use vars qw ( $opt_n );
unless ( getopts ('n') ) { die "Usage: $0 [-n]\n"; }
my $prompt = ( $opt_n ) ? 0 : 1;
unlink ('t/APPLICATIONS_ENABLED') if ( -e 't/APPLICATIONS_ENABLED' );
unlink ('t/APPLICATIONS_CGI_ENABLED') if ( -e 't/APPLICATIONS_CGI_ENABLED' );
unlink ('t/PLUGINS_ENABLED') if ( -e 't/PLUGINS_ENABLED' );
Makefile.PL view on Meta::CPAN
}
}
if ( $ASNMTAP_APPLICATIONS or $ASNMTAP_PLUGINS ) {
print "- created (when not already exists): '$ASNMTAP_PATH'\n\n";
chown ( $ASNMTAP_UID, $ASNMTAP_GID, $ASNMTAP_PATH ) or die "- chown $ASNMTAP_UID:$ASNMTAP_GID $ASNMTAP_PATH failed: $!";
if ( $ASNMTAP_APPLICATIONS ) {
unlink <$ASNMTAP_PATH/applications/htmlroot/nav/*/reports-*.html> if ( -e "$ASNMTAP_PATH/applications/htmlroot/nav" );
if ( -e "$ASNMTAP_PATH/results" ) {
unlink <$ASNMTAP_PATH/results/FOOTER.html>;
unlink <$ASNMTAP_PATH/results/*/FOOTER.html>;
unlink <$ASNMTAP_PATH/results/*/debug/FOOTER.html>;
unlink <$ASNMTAP_PATH/results/*/reports/FOOTER.html>;
unlink <$ASNMTAP_PATH/results/HEADER.html>;
unlink <$ASNMTAP_PATH/results/*/HEADER.html>;
unlink <$ASNMTAP_PATH/results/*/debug/HEADER.html>;
unlink <$ASNMTAP_PATH/results/*/reports/HEADER.html>;
}
}
}
my $intro = <<EOI;
This Build comes with some package that I can install.
We are about to install ASNMTAP::Asnmtap and for your convenience will
provide you with list of modules and prerequisites, so you'll be able
to choose only modules you need for your configuration.
EOI
if ( $prompt ) {
ExtUtils::MakeMaker::prompt( $intro . "Press <enter> to see the detailed list." );
} else {
print "These are the modules that will get installed:\n\n";
}
# This hash will contain a list of all perl modules we would like to explicitly depend upon in our Makefile
my %PREREQ_PM;
# Maintains a cache of what 3rd party modules you have installed
sub has_module {
my ($module, $version) = @_;
Makefile.PL view on Meta::CPAN
# Print a single prerequisite to the screen
sub generate_PREREQ_PM {
my ($feature, $dependency, $modules, $install) = @_;
my $buffer;
my $i = 0;
foreach (keys %$modules) {
my $detected = has_module ( $_, $modules->{$_} );
$buffer .= sprintf ( "%-24s [%s] %-32s %-8s\n", ( $i++ ? '' : $feature), ($detected >= 2 ? '+' : ( $detected ? '*' : ' ') ), $_ . ( $modules->{ $_ } and $modules->{ $_ } !~ /^\*\d{2,2}(?:\d{2,2}(?:\d{2,2})?)?$/ ? " (v$modules->{$_})" : '' ), ( $i...
}
return $buffer;
}
# Print the entire prerequisites table
sub generate_PREREQ_PM_table {
my $buffer = sprintf ( "%-24s %-36s %-8s\n", 'Feature', 'Prerequisites', 'Install?' );
$buffer .= sprintf ( "%s %s %s\n","-" x 24,"-" x 36,"-" x 8 );
foreach my $prerequisites ( @prerequisites ) { $buffer .= generate_PREREQ_PM ( @$prerequisites[1..4] ); }
- gzip -d libxml2-2.6.16-sol9-sparc-local.gz
- pkgadd -d libxml2-2.6.16-sol9-sparc-local
or
- wget ftp://sunfreeware.com/pub/freeware/sparc/10/libxml2-2.6.16-sol10-sparc-local.gz
- gzip -d libxml2-2.6.16-sol10-sparc-local.gz
- pkgadd -d libxml2-2.6.16-sol10-sparc-local
# DEPENDENCIES - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
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
- Net::POP3 POP3 server implementation
- MIME::Lite SMTP client implementation
- IO::File FTP client and IO server
- Net::FTP FTP client
- MQSeries MQSeries transport
- Net::Jabber Jabber transport
- FCGI FastCGI server implementation
- IO::Socket::SSL SSL support for TCP transport
- MIME::Tools MIME attachment support
- DIME::Tools DIME attachment support
- Compress::Zlib HTTP compression support
ASNMTAP::Asnmtap::Plugins::WebTransact
- ASNMTAP::Asnmtap::Plugins:
- Bundle::LWP: 1.11
- CGI: 3.28
- Compress::Zlib: 2.004
- Digest::MD5: 2.33
- Crypt::SSLeay: 0.56
- 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
System Activity monitoring (SA, sysdSA).
sysdCT : (1.60.1.13) <minute (0-59)> <hour (0-23)> <day of the month (1-31)> <month of the year (1-12)> <day of the week (0-6 with 0=Sunday)> DF|ID|PS|RH|RL|RS|SA
sysdDF : (1.60.1.2) filesystem:percent:[optional stop action]:[optional start action]:support team email
sysdID : (1.60.1.14) ... preparations ...
sysdPS : (1.60.1.1) process:comment:[optional stop action]:[optional start action]:support team email
sysdRH : (1.60.1.9) hostname:ip-adres:gateway:[protocol]:[timeout]:[bytes]:[optional stop action]:[optional start action]:support team email
icmp|tcp|udp >= 0 <= 1024
sysdRS : (1.60.1.15) protocol:ip-adres:port:service:[request]:[timeout]:[status]:[optional stop action]:[optional start action]:support team email
tcp|udp >= 0
sysdSA : (1.60.1.11) process:activity:comment:priority:facility:logfile:[optional stop action]:[optional start action]:support team email
2002/03/02 - 2003/03/01, from v1.60.16.x until v1.60.17-01
2002/01/03 - 2002/02/26, from v1.60.14.x until v1.60.15.x
2001/12/26 - 2002/01/02, from v1.60.13.x until v1.60.14.x
2000/10/19 - 2001/12/24, from v1.60.1.x until v1.60.13.x
LICENCE
This ASNMTAP CPAN library and Plugin templates are free software; you can
redistribute it and/or modify it under the same terms as Perl itself.
The other parts of ASNMTAP may be used and modified free of charge by anyone
so long as this copyright notice and the comments above remain intact. By
using this code you agree to indemnify Alex Peeters from any liability that
might arise from it's use.
Selling the code for this program without prior written consent is expressly
forbidden. In other words, please ask first before you try and make money off
of my program.
Obtain permission before redistributing this software over the Internet or
in any other medium. In all cases copyright and header must remain intact.
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
applications/Applications.cnf view on Meta::CPAN
# WWWIDENTITY ssh
# RMDEFAULTUSER admin
# RECORDSONPAGE 10
# NUMBEROFFTESTS 9
# VERIFYNUMBEROK 3
# VERIFYMINUTEOK 30
# FIRSTSTARTDATE 2004-10-31
# STRICTDATE 0
# STATUSHEADER01 De resultaten worden weergegeven binnen timeslots van vastgestelde duur per groep. De testen binnen éénzelfde groep worden sequentieel uitgevoerd.
# <AWSTATS>
# ENABLED 1 # '0' or '1'
# </AWSTATS>
# <CHARTDIRECTOR>
# LIB /opt/ChartDirector/lib/.
# </CHARTDIRECTOR>
# <HTMLTOPDF>
applications/Applications.cnf view on Meta::CPAN
# PORT ~ <DATABASE_ACCOUNT><READWRITE><PORT>
# USERNAME ~ <DATABASE_ACCOUNT><READWRITE><USERNAME>
# PASSWORD ~ <DATABASE_ACCOUNT><READWRITE><PASSWORD>
# </PERFPARSE>
</COMMON>
<PATH>
# HTTPS /opt/asnmtap/applications/htmlroot
# IMAGES /opt/asnmtap/applications/htmlroot/img
# PDPHELP /opt/asnmtap/applications/htmlroot/pdf
# RESULTS /opt/asnmtap/results
# SSHKEY /home
# WWWKEY /var/www
</PATH>
#<DATABASE_ACCOUNT>
# <SERVER>
# VERSION 5.0.x # '5.0.x' or '5.1.x'
# MERGE 0 # '0' or '1'
# </SERVER>
applications/Applications.cnf view on Meta::CPAN
# -----------------------------------------------------------------------
# DON'T TOUCH BELOW HERE UNLESS YOU KNOW WHAT YOU ARE DOING!
# -----------------------------------------------------------------------
#<SUBDIR>
# CONFIG config
# CGISESS cgisess # for the cgisess_ files
# DEBUG debug
# REPORT reports
# RESULTS results
#</SUBDIR>
#<URL>
# HTTPS /asnmtap
# IMAGES /asnmtap/img
# PDPHELP /asnmtap/pdf
# RESULTS /results
#</URL>
#<DATABASE>
# ASNMTAP asnmtap
# CATALOGID CID
#</DATABASE>
#<TABLES>
# CATALOG catalog
# COLLECTORDAEMONS collectorDaemons
applications/Applications.cnf view on Meta::CPAN
# EVENTS events
# EVENTSCHANGESLOGDATA eventsChangesLogData
# EVENTSDISPLAYDATA eventsDisplayData
# HOLIDAYS holidays
# HOLIDAYSBUNDLE holidaysBundle
# LANGUAGE language
# PAGEDIRS pagedirs
# PLUGINS plugins
# REPORTS reports
# REPORTSPERFDATA reports_perfdata
# RESULTSDIR resultsdir
# SERVERS servers
# TIMEPERIODS timeperiods
# USERS users
# VIEWS views
#</TABLES>
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
applications/archive.pl view on Meta::CPAN
($pagedir, $ttest) = split(/\#/, $darchivelist, 2);
my @stest = split(/\|/, $ttest);
$path = $RESULTSPATH .'/'. $pagedir;
$debugPath = $path .'/'. $DEBUGDIR;
$reportPath = $path .'/'. $REPORTDIR;
if ($debug) {
print "\n", "<$RESULTSPATH><$pagedir><$path><$DEBUGDIR><$REPORTDIR>\n"
} else {
print EMAILREPORT "\nPlugin: '$ttest', results directory: '$path'\n";
}
$rvOpendir = opendir(DIR, $path);
if ($rvOpendir) {
@files = readdir(DIR);
closedir(DIR);
}
if (-e $debugPath) {
applications/archive.pl view on Meta::CPAN
}
}
}
}
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
sub gzipOrRemoveHttpDumpDebug {
my ($gzipDebugEpoch, $removeDebugEpoch, $debugPath, $debugFilename) = @_;
my ($suffix, $extentie, $datum, $restant);
print "<$debugFilename>\n" if ($debug);
my $_debugFilename = reverse $debugFilename;
my ($_suffix, $_extentie) = reverse split(/\./, $_debugFilename, 2);
$suffix = reverse $_suffix;
$extentie = reverse $_extentie;
($datum, $restant) = split(/\-/, $suffix, 2);
if (defined $restant) {
$datum = substr($datum, 0, 8);
if ( $extentie ) {
if ( $extentie eq 'htm' ) {
if ($datum le get_yearMonthDay($gzipDebugEpoch)) {
if ($debug) {
print "HT+<$datum><".get_yearMonthDay($gzipDebugEpoch)."><$debugPath><$debugFilename>\n";
} else {
print EMAILREPORT "HT+<$datum><".get_yearMonthDay($gzipDebugEpoch)."> gzip <$debugPath><$debugFilename>\n";
my ($status, $stdout, $stderr) = call_system ('gzip --force '.$debugPath.'/'.$debugFilename, $debug);
applications/archive.pl view on Meta::CPAN
}
}
}
}
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
sub removeOldReportFiles {
my ($removeReportsEpoch, $removeGzipEpoch, $reportPath, $reportFilename) = @_;
my ($suffix, $prefix, $datum, $plugin, $restant, $extentie);
($suffix, $prefix) = split(/\.pl/, $reportFilename, 2);
($datum, $plugin) = split(/\-/, $suffix, 2) if (defined $suffix);
($restant, $extentie) = split(/\./, $prefix, 2) if (defined $prefix);
if ($debug) {
print "<$reportFilename>";
if ($debug >= 2) {
print " S <$suffix>, P <$prefix>" if (defined $prefix);
print " D <$datum>, P <$plugin>" if (defined $plugin);
print " R <$restant>, E <$extentie>" if (defined $extentie);
}
print "\n";
}
if (defined $restant) {
$datum = substr($datum, 0, 8);
if ($extentie eq 'pdf') {
if ($datum le get_yearMonthDay($removeReportsEpoch)) {
if ($debug) {
print "RP-<$datum><".get_yearMonthDay($removeReportsEpoch)."><$reportPath><$reportFilename>\n";
} else {
print EMAILREPORT "RP-<$datum><".get_yearMonthDay($removeReportsEpoch)."> unlink <$reportPath><$reportFilename>\n";
unlink ($reportPath.'/'.$reportFilename);
}
} elsif ($restant =~ /\-Day_\w+\-id_\d+$/) {
if ($datum le get_yearMonthDay($removeGzipEpoch)) {
if ($debug) {
print "RP-<$datum><".get_yearMonthDay($removeReportsEpoch)."><$reportPath><$reportFilename>\n";
} else {
print EMAILREPORT "RP-<$datum><".get_yearMonthDay($removeReportsEpoch)."> unlink <$reportPath><$reportFilename>\n";
unlink ($reportPath.'/'.$reportFilename);
}
}
}
}
applications/bin/asnmtap-importDataThroughCatalog.sh view on Meta::CPAN
kill -QUIT `cat $PIDPATH/$PIDNAME`
sleep 1
else
echo "'$AMNAME' already stopped"
fi
}
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
restart() {
echo "Restart: 'All ASNMTAP Import Data Through Catalog' ..."
while [ -f $PIDPATH/$PIDNAME ]
do
stop
done
start
}
applications/bin/asnmtap-importDataThroughCatalog.sh view on Meta::CPAN
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# See how we were called.
case "$1" in
start)
start
;;
stop)
stop
;;
restart)
restart
;;
reload)
reload
;;
status)
status
;;
*)
echo "Usage: '$AMNAME' {start|stop|restart|reload|status}"
exit 1
esac
exit 0
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
applications/bin/generateCollectorDaemonSchedulingReports.pl view on Meta::CPAN
#!/usr/bin/env perl
# ---------------------------------------------------------------------------------------------------------
# © Copyright 2003-2011 Alex Peeters [alex.peeters@citap.be]
# ---------------------------------------------------------------------------------------------------------
# 2011/mm/dd, v3.002.003, generateCollectorDaemonSchedulingReports.pl
# ---------------------------------------------------------------------------------------------------------
# http://asnmtap.citap.be/results/_ASNMTAP/reports/yyyymmdd-collectorDaemonSchedulingReports.pl-_ASNMTAP-FQDN-Daily.pdf
# ---------------------------------------------------------------------------------------------------------
use strict;
use warnings; # Must be used in test mode only. This reduces a little process speed
#use diagnostics; # Must be used in test mode only. This reduces a lot of process speed
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
BEGIN { if ( $ENV{ASNMTAP_PERL5LIB} ) { eval 'use lib ( "$ENV{ASNMTAP_PERL5LIB}" )'; } }
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() ) {
applications/bin/generateReports.pl view on Meta::CPAN
$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);
}
my $logging = $RESULTSPATH .'/'. $resultsdir;
create_dir ($logging);
my $reports = $logging .'/'. $REPORTDIR;
create_dir ($reports);
$logging .= "/";
create_header ($logging."HEADER.html");
create_footer ($logging."FOOTER.html");
$reports .= "/";
create_header ($reports."HEADER.html");
create_footer ($reports."FOOTER.html");
my $dayReportMonthPdf = ($dayReportMonth < 10) ? "0$dayReportMonth" : $dayReportMonth;
my $dayReportDayPdf = ($dayReportDay < 10) ? "0$dayReportDay" : $dayReportDay;
my $catalogID_uKey = ( ( $catalogID eq 'CID' ) ? '' : $catalogID .'_' ) . $uKey;
my $pdfFilename = "$RESULTSPATH/$resultsdir/$REPORTDIR/$dayReportYear$dayReportMonthPdf$dayReportDayPdf-$test-$catalogID_uKey-$periodeMessage-id_$id.pdf";
my $encodedUrlAccessParameters = encode_html_entities('U', $urlAccessParameters);
my $user_password = (defined $userPassword and $userPassword ne '' ? '--user-password '. $userPassword : '');
my $command = "$HTMLTOPDFPRG -f '$pdfFilename' $user_password $HTMLTOPDFOPTNS 'http://${REMOTE_HOST}$HTTPSURL/cgi-bin/detailedStatisticsReportGenerationAndCompareResponsetimeTrends.pl?$encodedUrlAccessParameters'";
if ( -e "$pdfFilename" ) {
$emailMessage .= " > $pdfFilename already generated\n";
} else {
$emailMessage .= " > $pdfFilename will be generated\n";
push (@commands, $command);
push (@pdfFilenames, $pdfFilename);
applications/bin/importDataThroughCatalog.pl view on Meta::CPAN
print "- config contrains: events, eventsChangesLogData & comments\n";
} else {
print EMAILREPORT "\n- config contrains: events, eventsChangesLogData & comments\n";
}
# 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
importData (*EMAILREPORT, $dbhSOURCE, $dbh, 0, $SERVERTABLHOLIDYS, "catalogID = '$catalogID'", 'holidayID');
importData (*EMAILREPORT, $dbhSOURCE, $dbh, 0, $SERVERTABLUSERS, "catalogID = '$catalogID'", 'remoteUser');
# 2 - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
importData (*EMAILREPORT, $dbhSOURCE, $dbh, 0, $SERVERTABLHOLIDYSBNDL, "catalogID = '$catalogID'", 'holidayBundleID');
importData (*EMAILREPORT, $dbhSOURCE, $dbh, 0, $SERVERTABLRESULTSDIR, "catalogID = '$catalogID'", 'resultsdir');
# 3 - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
importData (*EMAILREPORT, $dbhSOURCE, $dbh, 0, $SERVERTABLPLUGINS, "catalogID = '$catalogID'", 'uKey');
}
# events, eventsChangesLogData & comments = = = = = = = = = = =
if ( $type >= 2 ) {
if ($debug) {
print "- events, eventsChangesLogData & comments\n";
} else {
print EMAILREPORT "\n- events, eventsChangesLogData & comments\n";
applications/collector-test.pl view on Meta::CPAN
"s:s" => \$opt_s, "dumphttp:s" => \$opt_s,
"S:s" => \$opt_S, "status:s" => \$opt_S,
"D:s" => \$opt_D, "debug:s" => \$opt_D,
"V" => \$opt_V, "version" => \$opt_V,
"h" => \$opt_h, "help" => \$opt_h
);
if ($opt_V) { print_revision($PROGNAME, $version); exit $ERRORS{OK}; }
if ($opt_h) { print_help(); exit $ERRORS{OK}; }
($opt_H) || usage("MySQL hostname/address not specified\n");
my $serverName = $1 if ($opt_H =~ /([-.A-Za-z0-9]+)/);
($serverName) || usage("Invalid MySQL hostname/address: $opt_H\n");
($opt_M) || usage("Mode not specified\n");
my $mode = $opt_M if ($opt_M eq 'O' || $opt_M eq 'L' || $opt_M eq 'C');
($mode) || usage("Invalid mode: $opt_M\n");
if ($mode eq 'O') { $boolean_loopQuit = 1; }
($opt_C) || usage("collectorlist not specified\n");
my $collectorlist = $1 if ($opt_C =~ /([-.A-Za-z0-9]+)/);
($collectorlist) || usage("Invalid collectorlist: $opt_C\n");
applications/collector-test.pl view on Meta::CPAN
create_dir ($RESULTSPATH);
my $boolean_perfParseInstalled = ( $PERFPARSEENABLED and -e "${HTTPSPATH}${PERFPARSECGI}" ) ? 1 : 0;
if ($mode eq 'C') {
create_header ($RESULTSPATH .'/HEADER.html');
create_footer ($RESULTSPATH .'/FOOTER.html');
printDebugAll ("read table: <$collectorlist>");
@crontabtable = read_table($prgtext, $collectorlist, 1, $debug);
resultsdirCreate();
printDebugAll ("Uitvoeren crontab - : <$PROGNAME v$version -C $collectorlist> pid: <$pidfile>");
unless (fork) { # unless ($pid = fork) {
unless (fork) {
# if ($boolean_daemonControl) { sleep until getppid == 1; }
printDebugAll ("Main Daemon control loop for: <$PROGNAME v$version -C $collectorlist> pid: <$pidfile>\n");
write_pid();
if ($boolean_daemonControl) {
applications/collector-test.pl view on Meta::CPAN
$SIG{__WARN__} = \&signal_WARN;
} else {
$boolean_daemonQuit = 1;
}
do {
# Catch signals implementation
if ($boolean_signal_hup) {
printDebugAll ("read table: <$collectorlist>");
@crontabtable = read_table($prgtext, $collectorlist, 2, $debug);
resultsdirCreate();
$boolean_signal_hup = 0;
}
# Update access and modify epoch time from the PID time
utime (time(), time(), $pidfile) if (-e $pidfile);
# Crontab implementation
do_crontab ();
} until ($boolean_daemonQuit);
applications/collector-test.pl view on Meta::CPAN
printDebugAll ("Einde ... Crontab - : <$PROGNAME v$version -C $collectorlist> pid: <$pidfile>");
# if ($boolean_daemonControl) { waitpid($pid,0); }
} else {
printDebugAll ("read table: <$collectorlist>");
my @processtable = read_table($prgtext, $collectorlist, 0, $debug);
do {
printDebugAll ("Start collector - : <$mode> <$PROGNAME v$version -C $collectorlist>");
foreach $dproc (@processtable) {
my ($catalogID_uniqueKey, $resultsdir, $title, $command) = split(/\#/, $dproc, 4);
my ($catalogID, $uniqueKey) = split(/_/, $catalogID_uniqueKey);
unless ( defined $uniqueKey ) {
$uniqueKey = $catalogID;
$catalogID = $CATALOGID;
$catalogID_uniqueKey = $catalogID .'_'. $uniqueKey unless ( $catalogID eq 'CID' );
}
$logging = $RESULTSPATH .'/'. $resultsdir;
create_dir ($logging);
$httpdump = $logging .'/'. $DEBUGDIR;
create_dir ($httpdump);
$logging .= "/";
create_header ($logging ."HEADER.html");
create_footer ($logging ."FOOTER.html");
$httpdump .= "/";
create_header ($httpdump ."HEADER.html");
create_footer ($httpdump ."FOOTER.html");
my $tlogging = $logging . get_logfiledate();
$title =~ s/^[\[[\S+|\s+]*\]\s+]{0,1}([\S+|\s+]*)/$1/g;
$action = call_system ($asnmtapEnv, 0, $catalogID_uniqueKey, $catalogID, $uniqueKey, $resultsdir, $title, $command, $status, 0, 9, 9, 9, $debug, $logging, $tlogging, $httpdump, $dumphttp, 0);
}
printDebugAll ("Einde collector - : <$mode> <$PROGNAME v$version -C $collectorlist>") if ($debug eq 'T');
} until ($boolean_loopQuit);
}
exit;
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
sub resultsdirCreate {
foreach $dcron (@crontabtable) {
(undef, undef, undef, undef, undef, undef, $tcommand) = split(/ +/, $dcron, 7);
my @scommand = split(/\|/, $tcommand);
foreach my $dcommand (@scommand) {
my (undef, $resultsdir, undef, undef, undef) = split(/\#/, $dcommand);
$logging = $RESULTSPATH .'/'. $resultsdir;
create_dir ($logging);
$httpdump = $logging .'/'. $DEBUGDIR;
create_dir ($httpdump);
$logging .= "/";
create_header ($logging."HEADER.html");
create_footer ($logging."FOOTER.html");
$httpdump .= "/";
applications/collector-test.pl view on Meta::CPAN
foreach $dcron (@crontabtable) {
($tmin, $thour, $tmday, $tmon, $twday, $tinterval, $tcommand) = split(/ +/, $dcron, 7);
my ($doIt, $doOffline) = set_doIt_and_doOffline ($min, $hour, $mday, $mon, $wday, $tmin, $thour, $tmday, $tmon, $twday);
if ( $doIt || $doOffline ) {
printDebugAll ("Start CollectorCT - : <$PROGNAME v$version -C $collectorlist> pid: <$pidfile>");
my @scommand = split(/\|/, $tcommand);
foreach my $dcommand (@scommand) {
my ($catalogID_uniqueKey, $resultsdir, $title, $command, $noOFFLINE) = split(/\#/, $dcommand);
my ($catalogID, $uniqueKey) = split(/_/, $catalogID_uniqueKey);
unless ( defined $uniqueKey ) {
$uniqueKey = $catalogID;
$catalogID = $CATALOGID;
$catalogID_uniqueKey = $catalogID .'_'. $uniqueKey unless ( $catalogID eq 'CID' );
}
$title =~ s/^[\[[\S+|\s+]*\]\s+]{0,1}([\S+|\s+]*)/$1/g;
$logging = $RESULTSPATH .'/'. $resultsdir .'/';
$httpdump = $RESULTSPATH .'/'. $resultsdir .'/'. $DEBUGDIR .'/';
my $tlogging = $logging . get_logfiledate();
my ($queryMySQL, $instability, $persistent, $downtime);
$queryMySQL = $instability = $persistent = $downtime = 0;
if ($doIt) {
# open connection to database and query comment data
my ($sth, $sql, $firstRecordPersistentTrue, $firstRecordPersistentFalse, $activationTimeslotPersistentTrue, $activationTimeslotPersistentFalse, $suspentionTimeslotPersistentTrue, $suspentionTimeslotPersistentFalse);
$firstRecordPersistentTrue = $firstRecordPersistentFalse = 1;
applications/collector-test.pl view on Meta::CPAN
if ($noOFFLINE) {
if ($noOFFLINE eq 'multiOFFLINE') {
$queryMySQL = 1;
printDebugAll ("multi OFFLINE: call_system <$catalogID_uniqueKey><$command>") if ($debug eq 'T');
} elsif ($noOFFLINE eq 'noTEST') {
$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;
applications/collector-test.pl view on Meta::CPAN
unless ( $exit_value == 0 && $signal_num == 0 && $dumped_core == 0 && $stderr eq '' ) {
printDebugAll (" create_dir ---- : mkdir $directory: <$exit_value><$signal_num><$dumped_core><$stderr>");
printDebugNOK (" create_dir ---- : mkdir $directory: <$exit_value><$signal_num><$dumped_core><$stderr>");
}
}
}
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
sub call_system {
my ($asnmtapEnv, $currentDate, $catalogID_uniqueKey, $catalogID, $uniqueKey, $resultsdir, $title, $system_action, $status, $interval, $instability, $persistent, $downtime, $debug, $dbiFilename, $logging, $httpdump, $dumphttp, $queryMySQL) = @_;
my $rvOpen;
my $action = '';
my $httpdumpFilename = '';
my $httpdumpFilenameTmp = '';
my $debugFilename = '<NIHIL>';
my $dumphttpRename = '<NIHIL>';
my ($stdout, $stderr, $exit_value, $signal_num, $dumped_core);
my ($loggedStatus, $returnStatus, $startDate, $startTime, $endDate, $endTime, $msgCommand);
applications/collector-test.pl view on Meta::CPAN
$sth->bind_columns( \$duration, \$startTime, \$status, \$timeslot ) or $rv = errorTrapDBIgraphEntry("Cannot sth->bind_columns: $findString", \$logger, $debug);
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'){
applications/collector-test.pl view on Meta::CPAN
print "Usage: $PROGNAME -H <MySQL hostname> [-M <mode>] [-C <collectorlist>] [-W <screenDebug>] [-A <allDebug>] [-N <nokDebug>] [-s <dumphttp>] [-S <status>] [-D <debug>] [-V version] [-h help]\n";
}
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
sub print_help () {
print_revision($PROGNAME, $version);
print "ASNMTAP Collector for the '$APPLICATION'
-H, --hostname=<HOSTNAME>
HOSTNAME : hostname/address from the MySQL server
-M, --mode=O|L|C
O(nce) : run the program once
L(oop) : run the program as a loop
C(rontab) : run the program crontab based
-C, --collectorlist=<FILENAME>
FILENAME : filename from the collectorlist for the loop of crontab
-W, --screenDebug=F|T
F(alse) : all screendebugging off (default)
T(true) : all screendebugging on
-A, --allDebug=F|T
applications/collector.pl view on Meta::CPAN
"s:s" => \$opt_s, "dumphttp:s" => \$opt_s,
"S:s" => \$opt_S, "status:s" => \$opt_S,
"D:s" => \$opt_D, "debug:s" => \$opt_D,
"V" => \$opt_V, "version" => \$opt_V,
"h" => \$opt_h, "help" => \$opt_h
);
if ($opt_V) { print_revision($PROGNAME, $version); exit $ERRORS{OK}; }
if ($opt_h) { print_help(); exit $ERRORS{OK}; }
($opt_H) || usage("MySQL hostname/address not specified\n");
my $serverName = $1 if ($opt_H =~ /([-.A-Za-z0-9]+)/);
($serverName) || usage("Invalid MySQL hostname/address: $opt_H\n");
($opt_M) || usage("Mode not specified\n");
my $mode = $opt_M if ($opt_M eq 'O' || $opt_M eq 'L' || $opt_M eq 'C');
($mode) || usage("Invalid mode: $opt_M\n");
if ($mode eq 'O') { $boolean_loopQuit = 1; }
($opt_C) || usage("collectorlist not specified\n");
my $collectorlist = $1 if ($opt_C =~ /([-.A-Za-z0-9]+)/);
($collectorlist) || usage("Invalid collectorlist: $opt_C\n");
applications/collector.pl view on Meta::CPAN
create_dir ($RESULTSPATH);
my $boolean_perfParseInstalled = ( $PERFPARSEENABLED and -e "${HTTPSPATH}${PERFPARSECGI}" ) ? 1 : 0;
if ($mode eq 'C') {
create_header ($RESULTSPATH .'/HEADER.html');
create_footer ($RESULTSPATH .'/FOOTER.html');
printDebugAll ("read table: <$collectorlist>");
@crontabtable = read_table($prgtext, $collectorlist, 1, $debug);
resultsdirCreate();
printDebugAll ("Uitvoeren crontab - : <$PROGNAME v$version -C $collectorlist> pid: <$pidfile>");
unless (fork) { # unless ($pid = fork) {
unless (fork) {
# if ($boolean_daemonControl) { sleep until getppid == 1; }
printDebugAll ("Main Daemon control loop for: <$PROGNAME v$version -C $collectorlist> pid: <$pidfile>\n");
write_pid();
if ($boolean_daemonControl) {
applications/collector.pl view on Meta::CPAN
$SIG{__WARN__} = \&signal_WARN;
} else {
$boolean_daemonQuit = 1;
}
do {
# Catch signals implementation
if ($boolean_signal_hup) {
printDebugAll ("read table: <$collectorlist>");
@crontabtable = read_table($prgtext, $collectorlist, 2, $debug);
resultsdirCreate();
$boolean_signal_hup = 0;
}
# Update access and modify epoch time from the PID time
utime (time(), time(), $pidfile) if (-e $pidfile);
# Crontab implementation
do_crontab ();
} until ($boolean_daemonQuit);
applications/collector.pl view on Meta::CPAN
printDebugAll ("Einde ... Crontab - : <$PROGNAME v$version -C $collectorlist> pid: <$pidfile>");
# if ($boolean_daemonControl) { waitpid($pid,0); }
} else {
printDebugAll ("read table: <$collectorlist>");
my @processtable = read_table($prgtext, $collectorlist, 0, $debug);
do {
printDebugAll ("Start collector - : <$mode> <$PROGNAME v$version -C $collectorlist>");
foreach $dproc (@processtable) {
my ($catalogID_uniqueKey, $resultsdir, $title, $command) = split(/\#/, $dproc, 4);
my ($catalogID, $uniqueKey) = split(/_/, $catalogID_uniqueKey);
unless ( defined $uniqueKey ) {
$uniqueKey = $catalogID;
$catalogID = $CATALOGID;
$catalogID_uniqueKey = $catalogID .'_'. $uniqueKey unless ( $catalogID eq 'CID' );
}
$logging = $RESULTSPATH .'/'. $resultsdir;
create_dir ($logging);
$httpdump = $logging .'/'. $DEBUGDIR;
create_dir ($httpdump);
$logging .= "/";
create_header ($logging ."HEADER.html");
create_footer ($logging ."FOOTER.html");
$httpdump .= "/";
create_header ($httpdump ."HEADER.html");
create_footer ($httpdump ."FOOTER.html");
my $tlogging = $logging . get_logfiledate();
$title =~ s/^[\[[\S+|\s+]*\]\s+]{0,1}([\S+|\s+]*)/$1/g;
$action = call_system ($asnmtapEnv, 0, $catalogID_uniqueKey, $catalogID, $uniqueKey, $resultsdir, $title, $command, $status, 0, 9, 9, 9, $debug, $logging, $tlogging, $httpdump, $dumphttp, 0);
}
printDebugAll ("Einde collector - : <$mode> <$PROGNAME v$version -C $collectorlist>") if ($debug eq 'T');
} until ($boolean_loopQuit);
}
exit;
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
sub resultsdirCreate {
foreach $dcron (@crontabtable) {
(undef, undef, undef, undef, undef, undef, $tcommand) = split(/ +/, $dcron, 7);
my @scommand = split(/\|/, $tcommand);
foreach my $dcommand (@scommand) {
my (undef, $resultsdir, undef, undef, undef) = split(/\#/, $dcommand);
$logging = $RESULTSPATH .'/'. $resultsdir;
create_dir ($logging);
$httpdump = $logging .'/'. $DEBUGDIR;
create_dir ($httpdump);
$logging .= "/";
create_header ($logging."HEADER.html");
create_footer ($logging."FOOTER.html");
$httpdump .= "/";
applications/collector.pl view on Meta::CPAN
foreach $dcron (@crontabtable) {
($tmin, $thour, $tmday, $tmon, $twday, $tinterval, $tcommand) = split(/ +/, $dcron, 7);
my ($doIt, $doOffline) = set_doIt_and_doOffline ($min, $hour, $mday, $mon, $wday, $tmin, $thour, $tmday, $tmon, $twday);
if ( $doIt || $doOffline ) {
printDebugAll ("Start CollectorCT - : <$PROGNAME v$version -C $collectorlist> pid: <$pidfile>");
my @scommand = split(/\|/, $tcommand);
foreach my $dcommand (@scommand) {
my ($catalogID_uniqueKey, $resultsdir, $title, $command, $noOFFLINE) = split(/\#/, $dcommand);
my ($catalogID, $uniqueKey) = split(/_/, $catalogID_uniqueKey);
unless ( defined $uniqueKey ) {
$uniqueKey = $catalogID;
$catalogID = $CATALOGID;
$catalogID_uniqueKey = $catalogID .'_'. $uniqueKey unless ( $catalogID eq 'CID' );
}
$title =~ s/^[\[[\S+|\s+]*\]\s+]{0,1}([\S+|\s+]*)/$1/g;
$logging = $RESULTSPATH .'/'. $resultsdir .'/';
$httpdump = $RESULTSPATH .'/'. $resultsdir .'/'. $DEBUGDIR .'/';
my $tlogging = $logging . get_logfiledate();
my ($queryMySQL, $instability, $persistent, $downtime);
$queryMySQL = $instability = $persistent = $downtime = 0;
if ($doIt) {
# open connection to database and query comment data
my ($sth, $sql, $firstRecordPersistentTrue, $firstRecordPersistentFalse, $activationTimeslotPersistentTrue, $activationTimeslotPersistentFalse, $suspentionTimeslotPersistentTrue, $suspentionTimeslotPersistentFalse);
$firstRecordPersistentTrue = $firstRecordPersistentFalse = 1;
applications/collector.pl view on Meta::CPAN
if ($noOFFLINE) {
if ($noOFFLINE eq 'multiOFFLINE') {
$queryMySQL = 1;
printDebugAll ("multi OFFLINE: call_system <$catalogID_uniqueKey><$command>") if ($debug eq 'T');
} elsif ($noOFFLINE eq 'noTEST') {
$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;
applications/collector.pl view on Meta::CPAN
unless ( $exit_value == 0 && $signal_num == 0 && $dumped_core == 0 && $stderr eq '' ) {
printDebugAll (" create_dir ---- : mkdir $directory: <$exit_value><$signal_num><$dumped_core><$stderr>");
printDebugNOK (" create_dir ---- : mkdir $directory: <$exit_value><$signal_num><$dumped_core><$stderr>");
}
}
}
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
sub call_system {
my ($asnmtapEnv, $currentDate, $catalogID_uniqueKey, $catalogID, $uniqueKey, $resultsdir, $title, $system_action, $status, $interval, $instability, $persistent, $downtime, $debug, $dbiFilename, $logging, $httpdump, $dumphttp, $queryMySQL) = @_;
my $rvOpen;
my $action = '';
my $httpdumpFilename = '';
my $httpdumpFilenameTmp = '';
my $debugFilename = '<NIHIL>';
my $dumphttpRename = '<NIHIL>';
my ($stdout, $stderr, $exit_value, $signal_num, $dumped_core);
my ($loggedStatus, $returnStatus, $startDate, $startTime, $endDate, $endTime, $msgCommand);
applications/collector.pl view on Meta::CPAN
$sth->bind_columns( \$duration, \$startTime, \$status, \$timeslot ) or $rv = errorTrapDBIgraphEntry("Cannot sth->bind_columns: $findString", \$logger, $debug);
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'){
applications/collector.pl view on Meta::CPAN
print "Usage: $PROGNAME -H <MySQL hostname> [-M <mode>] [-C <collectorlist>] [-W <screenDebug>] [-A <allDebug>] [-N <nokDebug>] [-s <dumphttp>] [-S <status>] [-D <debug>] [-V version] [-h help]\n";
}
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
sub print_help () {
print_revision($PROGNAME, $version);
print "ASNMTAP Collector for the '$APPLICATION'
-H, --hostname=<HOSTNAME>
HOSTNAME : hostname/address from the MySQL server
-M, --mode=O|L|C
O(nce) : run the program once
L(oop) : run the program as a loop
C(rontab) : run the program crontab based
-C, --collectorlist=<FILENAME>
FILENAME : filename from the collectorlist for the loop of crontab
-W, --screenDebug=F|T
F(alse) : all screendebugging off (default)
T(true) : all screendebugging on
-A, --allDebug=F|T
applications/custom/sde-supportRequest.pm-orig view on Meta::CPAN
use ASNMTAP::Asnmtap::Applications::CGI v3.002.003;
use ASNMTAP::Asnmtap::Applications::CGI qw(:APPLICATIONS :CGI :DBREADONLY :DBTABLES);
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
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/';
applications/custom/sde-supportRequest.pm-orig view on Meta::CPAN
'http://schemas.xmlsoap.org/wsdl/' => 'wsdl',
'http://schemas.xmlsoap.org/wsdl/http/' => 'http',
'http://microsoft.com/wsdl/mime/textMatching/' => 'tm',
'http://infravision.com/ivwse' => 's1'
);
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
sub _getEventsData {
my ($catalogID, $uKey, $hash_valueEventsData, $pagedir, $pageset, $htmlTitle, $subTitle, $refresh, $onload, $sessionID, $debug) = @_;
my $rv = 1;
my $dbh = DBI->connect("DBI:mysql:$DATABASE:$SERVERNAMEREADONLY:$SERVERPORTREADONLY", "$SERVERUSERREADONLY", "$SERVERPASSREADONLY") or $rv = error_trap_DBI(*STDOUT, "Cannot connect to the database", $debug, $pagedir, $pageset, $htmlTitle, $subTit...
if ($dbh and $rv) {
my $sql = "select SQL_NO_CACHE title, duration, timeslot, endDate, endTime, status, statusMessage, filename from $SERVERTABLEVENTSDISPLAYDT where catalogID = '$catalogID' and uKey = '$uKey' and step <> '0' order by timeslot desc limit 1";
my $sth = $dbh->prepare( $sql ) or $rv = error_trap_DBI(*STDOUT, "Cannot dbh->prepare: $sql", $debug, $pagedir, $pageset, $htmlTitle, $subTitle, $refresh, $onload, $sessionID);
$sth->execute or $rv = error_trap_DBI(*STDOUT, "Cannot sth->execute: $sql", $debug, $pagedir, $pageset, $htmlTitle, $subTitle, $refresh, $onload, $sessionID) if $rv;
if ( $rv ) {
while ( my $ref = $sth->fetchrow_hashref() ) {
$$hash_valueEventsData{found} = 1;
$$hash_valueEventsData{title} = $ref->{title} if ( $ref->{title} );
$$hash_valueEventsData{duration} = $ref->{duration} if ( $ref->{duration} );
$$hash_valueEventsData{timeslot} = $ref->{timeslot} if ( $ref->{timeslot} );
$$hash_valueEventsData{endDate} = $ref->{endDate} if ( $ref->{endDate} );
$$hash_valueEventsData{endTime} = $ref->{endTime} if ( $ref->{endTime} );
$$hash_valueEventsData{status} = $ref->{status} if ( $ref->{status} );
$$hash_valueEventsData{statusMessage} = $ref->{statusMessage} if ( $ref->{statusMessage} );
$$hash_valueEventsData{filename} = $ref->{filename} if ( $ref->{filename} );
}
$sth->finish() or $rv = error_trap_DBI(*STDOUT, "Cannot sth->finish: $sql", $debug, $pagedir, $pageset, $htmlTitle, $subTitle, $refresh, $onload, $sessionID);
if ( $rv and exists $$hash_valueEventsData{found} and $$hash_valueEventsData{status} !~ /$STATE{$ERRORS{OK}}/ ) {
my @table = ( "$SERVERTABLEVENTSDISPLAYDT", "$SERVERTABLEVENTS USE INDEX (catalogID, uKey, key_timeslot)" );
foreach my $table ( @table ) {
if ( $$hash_valueEventsData{status} =~ /$STATE{$ERRORS{WARNING}}/ ) { # event
$sql = "select SQL_NO_CACHE endDate, endTime, timeslot, status from $table where catalogID = '$catalogID' and uKey = '$uKey' and step <> '0' and not ( status = '". $STATE{$ERRORS{WARNING}} ."' ) order by timeslot desc limit 1";
} elsif ( $$hash_valueEventsData{status} =~ /($STATE{$ERRORS{UNKNOWN}}|$STATE{$ERRORS{CRITICAL}}|$STATE{$ERRORS{'NO DATA'}})/ ) { # incident
$sql = "select SQL_NO_CACHE endDate, endTime, timeslot, status from $table where catalogID = '$catalogID' and uKey = '$uKey' and step <> '0' and not ( status = '". $STATE{$ERRORS{UNKNOWN}} ."' or status = '". $STATE{$ERRORS{CRITICAL}} ....
}
my $sth = $dbh->prepare( $sql ) or $rv = error_trap_DBI(*STDOUT, "Cannot dbh->prepare: $sql", $debug, $pagedir, $pageset, $htmlTitle, $subTitle, $refresh, $onload, $sessionID);
$sth->execute or $rv = error_trap_DBI(*STDOUT, "Cannot sth->execute: $sql", $debug, $pagedir, $pageset, $htmlTitle, $subTitle, $refresh, $onload, $sessionID) if $rv;
if ( $rv ) {
while ( my $ref = $sth->fetchrow_hashref() ) {
$$hash_valueEventsData{OUT_SCOPE}{found} = $ERRORS{$ref->{status}};
$$hash_valueEventsData{OUT_SCOPE}{timeslot} = $ref->{timeslot} if ( $ref->{timeslot} );
$$hash_valueEventsData{OUT_SCOPE}{endDate} = $ref->{endDate} if ( $ref->{endDate} );
$$hash_valueEventsData{OUT_SCOPE}{endTime} = $ref->{endTime} if ( $ref->{endTime} );
}
$sth->finish() or $rv = error_trap_DBI(*STDOUT, "Cannot sth->finish: $sql", $debug, $pagedir, $pageset, $htmlTitle, $subTitle, $refresh, $onload, $sessionID);
last if ( exists $$hash_valueEventsData{OUT_SCOPE}{found} );
}
}
if ( $rv and exists $$hash_valueEventsData{OUT_SCOPE}{found} and defined $$hash_valueEventsData{OUT_SCOPE}{found} ) {
my $timeRange = "timeslot > '". $$hash_valueEventsData{OUT_SCOPE}{timeslot} ."'";
foreach my $table ( @table ) {
if ( $$hash_valueEventsData{status} =~ /$STATE{$ERRORS{WARNING}}/ ) { # event
$sql = "select SQL_NO_CACHE endDate, endTime, timeslot, status from $table where catalogID = '$catalogID' and uKey = '$uKey' and step <> '0' and $timeRange and ( status = '". $STATE{$ERRORS{WARNING}} ."' ) order by timeslot asc limit ...
} elsif ( $$hash_valueEventsData{status} =~ /($STATE{$ERRORS{UNKNOWN}}|$STATE{$ERRORS{CRITICAL}}|$STATE{$ERRORS{'NO DATA'}})/ ) { # incident
$sql = "select SQL_NO_CACHE endDate, endTime, timeslot, status from $table where catalogID = '$catalogID' and uKey = '$uKey' and step <> '0' and $timeRange and ( status = '". $STATE{$ERRORS{UNKNOWN}} ."' or status = '". $STATE{$ERRORS...
}
my $sth = $dbh->prepare( $sql ) or $rv = error_trap_DBI(*STDOUT, "Cannot dbh->prepare: $sql", $debug, $pagedir, $pageset, $htmlTitle, $subTitle, $refresh, $onload, $sessionID);
$sth->execute or $rv = error_trap_DBI(*STDOUT, "Cannot sth->execute: $sql", $debug, $pagedir, $pageset, $htmlTitle, $subTitle, $refresh, $onload, $sessionID) if $rv;
if ( $rv ) {
while (my $ref = $sth->fetchrow_hashref()) {
$$hash_valueEventsData{IN_SCOPE}{found} = $ERRORS{$ref->{status}};
$$hash_valueEventsData{IN_SCOPE}{timeslot} = $ref->{timeslot} if ( $ref->{timeslot} );
$$hash_valueEventsData{IN_SCOPE}{endDate} = $ref->{endDate} if ( $ref->{endDate} );
$$hash_valueEventsData{IN_SCOPE}{endTime} = $ref->{endTime} if ( $ref->{endTime} );
}
$sth->finish() or $rv = error_trap_DBI(*STDOUT, "Cannot sth->finish: $sql", $debug, $pagedir, $pageset, $htmlTitle, $subTitle, $refresh, $onload, $sessionID);
last if ( exists $$hash_valueEventsData{IN_SCOPE}{found} );
}
}
}
}
}
$dbh->disconnect or $rv = error_trap_DBI(*STDOUT, "Sorry, the database was unable to add your entry.", $debug, $pagedir, $pageset, $htmlTitle, $subTitle, $refresh, $onload, $sessionID) if ($dbh and $rv);
}
return $rv;
}
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
sub _getSupportRequestData {
my ($serverName, $database, $table, $catalogID, $uKey, $hash_valueSupportRequestData, $pagedir, $pageset, $htmlTitle, $subTitle, $refresh, $onload, $sessionID, $debug) = @_;
$$hash_valueSupportRequestData{code} = '?';
$$hash_valueSupportRequestData{slaID} = '?';
$$hash_valueSupportRequestData{impact} = 'High';
$$hash_valueSupportRequestData{invoicedOrg} = '?';
$$hash_valueSupportRequestData{service} = '?';
$$hash_valueSupportRequestData{priority} = 'P01';
my $rv = 1;
my $dbh = DBI->connect("DBI:mysql:$database:$serverName:$SERVERPORTREADONLY", "$SERVERUSERREADONLY", "$SERVERPASSREADONLY") or $rv = error_trap_DBI(*STDOUT, "Cannot connect to the database", $debug, $pagedir, $pageset, $htmlTitle, $subTitle, $ref...
if ($dbh and $rv) {
my $sql = "select SQL_NO_CACHE code, slaID, invoicedOrg, service, impact, priority from $table where catalogID = '$catalogID' and uKey = '$uKey'";
my $sth = $dbh->prepare( $sql ) or $rv = error_trap_DBI(*STDOUT, "Cannot dbh->prepare: $sql", $debug, $pagedir, $pageset, $htmlTitle, $subTitle, $refresh, $onload, $sessionID);
$sth->execute or $rv = error_trap_DBI(*STDOUT, "Cannot sth->execute: $sql", $debug, $pagedir, $pageset, $htmlTitle, $subTitle, $refresh, $onload, $sessionID) if $rv;
if ( $rv ) {
while (my $ref = $sth->fetchrow_hashref()) {
$$hash_valueSupportRequestData{code} = $ref->{code} if ( $ref->{code} );
$$hash_valueSupportRequestData{slaID} = $ref->{slaID} if ( $ref->{slaID} );
$$hash_valueSupportRequestData{impact} = $ref->{impact} if ( $ref->{impact} );
$$hash_valueSupportRequestData{invoicedOrg} = $ref->{invoicedOrg} if ( $ref->{invoicedOrg} );
$$hash_valueSupportRequestData{service} = $ref->{service} if ( $ref->{service} );
$$hash_valueSupportRequestData{priority} = $ref->{priority} if ( $ref->{priority} );
}
$sth->finish() or $rv = error_trap_DBI(*STDOUT, "Cannot sth->finish: $sql", $debug, $pagedir, $pageset, $htmlTitle, $subTitle, $refresh, $onload, $sessionID);
}
$dbh->disconnect or $rv = error_trap_DBI(*STDOUT, "Sorry, the database was unable to add your entry.", $debug, $pagedir, $pageset, $htmlTitle, $subTitle, $refresh, $onload, $sessionID) if ($dbh and $rv);
}
return $rv;
}
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
sub _actionOnSoapResponse {
my ($asnmtapInherited, $som, $arguments) = @_;
my $root = $som->dataof ('/Envelope/Body');
my $WebServiceResults = $root->value;
if ( $asnmtapInherited->getOptionsValue('debug') ) {
use Data::Dumper;
print Dumper ($WebServiceResults), "\n";
}
my $response = $arguments->{method} .'Response';
my $returnCode = ( ( exists $WebServiceResults->{ $response } ) ? ( ( defined $WebServiceResults->{ $response } and $WebServiceResults->{ $response } ne '' ) ? $ERRORS{OK} : $ERRORS{WARNING} ) : $ERRORS{CRITICAL} );
unless ( $returnCode ) {
if ( $arguments->{method} eq 'InsertSupportRequest' ) {
# ...
} else { # $arguments->{method} =~ /^GetSupportRequest(?:List)*$/
if ( exists $WebServiceResults->{$response}->{SupportRequest} ) {
sub processGetSupportRequestResponse {
my ($supportRequest, $arguments, $counter) = @_;
if ( defined $supportRequest->{Number} ) {
my ($header, $data) = ('', '');
if ( defined $arguments->{fieldlist}->{'*'} ) {
while (my ($key, $value) = each %{ $supportRequest } ) {
$header .= '"'. $key .'",' unless ($counter);
$data .= '"'. $value .'",';
applications/custom/sde-supportRequest.pm-orig view on Meta::CPAN
chop $data;
$data .= "\n";
print $header, $data;
$counter++;
}
return ($counter);
}
if ( ref $WebServiceResults->{$response}->{SupportRequest} eq 'ARRAY' ) {
my $counter = 0;
foreach my $supportRequest ( @{$WebServiceResults->{$response}->{SupportRequest}} ) {
$counter = processGetSupportRequestResponse ( $supportRequest, \%$arguments, $counter );
}
} elsif ( exists $WebServiceResults->{$response}->{SupportRequest}->{Number} ) {
processGetSupportRequestResponse ( $WebServiceResults->{$response}->{SupportRequest}, \%$arguments, 0 );
}
}
}
}
$asnmtapInherited->pluginValues ( { stateValue => $returnCode, alert => $arguments->{method} ."\@". $arguments->{FQDN} .": ". $STATE{$returnCode} }, $TYPE{APPEND} );
return ($returnCode);
}
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
applications/custom/sde-supportRequest.pm-orig view on Meta::CPAN
my $counter = 10;
%fieldlist = map { $counter++ => $_ } split (/,/, $fieldlist);
} else {
$fieldlist {'*'} = '*';
}
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
my ($rv, %valueEventsDataDisplay, %valueSupportRequestData) = ( 1 );
$rv = _getEventsData ($catalogID, $uKey, \%valueEventsDataDisplay, $pagedir, $pageset, $htmlTitle, $subTitle, $refresh, $onload, $sessionID, $debug);
if ( $debug eq 'T' ) {
use Data::Dumper;
print Dumper (%valueEventsDataDisplay), "\n";
}
unless ( $rv ) {
$objectPlugins->pluginValues ( { error => '_getEventsData' }, $TYPE{APPEND} );
$succeeded = error_SupportRequest(*STDOUT, $objectPlugins->pluginValue ('error'), $debug, $pagedir, $pageset, $htmlTitle, $subTitle, -2, $onload, $sessionID);
return ( $rv, $objectPlugins->pluginValue ('alert'), $objectPlugins->pluginValue ('error') );
}
$rv = _getSupportRequestData ($CARTO_SERVER, $CARTO_DATABASE, $CARTO_TABLE, $catalogID, $uKey, \%valueSupportRequestData, $pagedir, $pageset, $htmlTitle, $subTitle, $refresh, $onload, $sessionID, $debug);
if ( $debug eq 'T' ) {
use Data::Dumper;
print Dumper (%valueSupportRequestData), "\n";
}
unless ( $rv ) {
$objectPlugins->pluginValues ( { error => '_getSupportRequestData' }, $TYPE{APPEND} );
$succeeded = error_SupportRequest(*STDOUT, $objectPlugins->pluginValue ('error'), $debug, $pagedir, $pageset, $htmlTitle, $subTitle, -2, $onload, $sessionID);
return ( $rv, $objectPlugins->pluginValue ('alert'), $objectPlugins->pluginValue ('error') );
applications/custom/sde-supportRequest.pm-orig view on Meta::CPAN
my $alert = $objectPlugins->pluginValue ('alert');
my $error = $objectPlugins->pluginValue ('error');
undef $objectPlugins;
$succeeded = error_SupportRequest(*STDOUT, $error, $debug, $pagedir, $pageset, $htmlTitle, $subTitle, -2, $onload, $sessionID) unless ( $succeeded );
return ( $succeeded, $alert, $error );
}
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
sub insertSupportRequest {
my ($catalogID, $uKey, $title, $remoteUser, $outageStartDate, $outageStartTime, $description, $pagedir, $pageset, $htmlTitle, $subTitle, $refresh, $onload, $sessionID, $debug) = @_;
return ( webserviceSupportRequest( $catalogID, $uKey, 'InsertSupportRequest', undef, undef, $pagedir, $pageset, $htmlTitle, $subTitle, $refresh, $onload, $sessionID, $debug ) );
}
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
sub getSupportRequest {
my ($catalogID, $uKey, $title, $remoteUser, $problemSolved, $list, $updated, $supportRequest, $pagedir, $pageset, $htmlTitle, $subTitle, $refresh, $onload, $sessionID, $debug) = @_;
return ( webserviceSupportRequest($catalogID, $uKey, ( ( defined $list && $list ) ? 'GetSupportRequestList' : 'GetSupportRequest' ), "Customer='ASNMTAP MONITORING' and source='Alarm' CompletionCode<>'SOLVED'", 'Number,Status,CompletionCode,CI,Categ...
}
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
sub updateSupportRequest {
my ($catalogID, $uKey, $title, $remoteUser, $outageEndDate, $outageEndTime, $description, $supportRequest, $pagedir, $pageset, $htmlTitle, $subTitle, $refresh, $onload, $sessionID, $debug) = @_;
return ( webserviceSupportRequest( $catalogID, $uKey, 'UpdateSupportRequest', undef, undef, $pagedir, $pageset, $htmlTitle, $subTitle, $refresh, $onload, $sessionID, $debug ) );
}
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
sub error_SupportRequest {
my ($HTML, $error_message, $debug, $pagedir, $pageset, $htmlTitle, $subTitle, $refresh, $onload, $sessionID) = @_;
my $subject = "$htmlTitle / error_SupportRequest: " . get_datetimeSignal();
my $message = get_datetimeSignal() . "\npagedir : $pagedir\npageset : $pageset\nhtml title: $htmlTitle\n\nerror message:\n$error_message\n";
my $returnCode = sending_mail ( $SERVERLISTSMTP, $SENDEMAILTO, $SENDMAILFROM, $subject, $message, $debug );
print "Problem sending email to the '$APPLICATION' server administrators\n" unless ( $returnCode );
if ( $refresh == 0 ) {
return (0, $error_message, "Error: ...", "String: ...");
} elsif ( $refresh == -1 ) {
print "<H1>Support Request Error:</H1>\n", $error_message, "\n<BR>";
return 0;
} elsif ( $refresh == -2 ) {
return 0;
} else {
print_header ($HTML, $pagedir, $pageset, $htmlTitle, $subTitle, $refresh, $onload, 'F', '', $sessionID);
print "<H1>Support Request Error:</H1>\n", $error_message, "\n<BR>";
return 0;
}
}
# End sde-supportRequest.pm --------------------------------------------------------------------------------
1;
applications/custom/supportRequest.pm-orig view on Meta::CPAN
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
use ASNMTAP::Time qw(&get_datetimeSignal);
use ASNMTAP::Asnmtap::Applications::CGI v3.002.003;
use ASNMTAP::Asnmtap::Applications::CGI qw(:APPLICATIONS :CGI :DBREADONLY :DBTABLES);
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
sub insertSupportRequest {
my ($catalogID, $uKey, $title, $remoteUser, $outageStartDate, $outageStartTime, $description, $pagedir, $pageset, $htmlTitle, $subTitle, $refresh, $onload, $sessionID, $debug) = @_;
my ($succeeded, $alert, $error) = ( 1 );
# ...
return ($succeeded, $alert, $error);
}
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
sub getSupportRequest {
my ($catalogID, $uKey, $title, $remoteUser, $problemSolved, $list, $updated, $supportRequest, $pagedir, $pageset, $htmlTitle, $subTitle, $refresh, $onload, $sessionID, $debug) = @_;
my ($succeeded, $alert, $error) = ( 1 );
# ...
return ($succeeded, $alert, $error);
}
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
sub updateSupportRequest {
my ($catalogID, $uKey, $title, $remoteUser, $outageEndDate, $outageEndTime, $description, $supportRequest, $pagedir, $pageset, $htmlTitle, $subTitle, $refresh, $onload, $sessionID, $debug) = @_;
my ($succeeded, $alert, $error) = ( 1 );
# ...
return ($succeeded, $alert, $error);
}
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
sub error_SupportRequest {
my ($HTML, $error_message, $debug, $pagedir, $pageset, $htmlTitle, $subTitle, $refresh, $onload, $sessionID) = @_;
my $subject = "$htmlTitle / error_SupportRequest: " . get_datetimeSignal();
my $message = get_datetimeSignal() . "\npagedir : $pagedir\npageset : $pageset\nhtml title: $htmlTitle\n\nerror message:\n$error_message\n";
my $returnCode = sending_mail ( $SERVERLISTSMTP, $SENDEMAILTO, $SENDMAILFROM, $subject, $message, $debug );
print "Problem sending email to the '$APPLICATION' server administrators\n" unless ( $returnCode );
if ( $refresh == 0 ) {
return (0, $error_message, "Error: ...", "String: ...");
} elsif ( $refresh == -1 ) {
print "<H1>Support Request Error:</H1>\n", $error_message, "\n<BR>";
return 0;
} else {
print_header ($HTML, $pagedir, $pageset, $htmlTitle, $subTitle, $refresh, $onload, 'F', '', $sessionID);
print "<H1>Support Request:</H1>\n", $error_message, "\n<BR>";
return 0;
}
}
# End supportRequest.pm ------------------------------------------------------------------------------------
1;
applications/display-test.pl view on Meta::CPAN
"L:s" => \$opt_L, "loop:s" => \$opt_L,
"t:s" => \$opt_t, "trigger:s" => \$opt_t,
"c:s" => \$opt_c, "creationTime:s" => \$opt_c,
"T:s" => \$opt_T, "displayTime:s" => \$opt_T,
"l:s" => \$opt_l, "lockMySQL:s" => \$opt_l
);
if ($opt_V) { print_revision($PROGNAME, $version); exit; }
if ($opt_h) { print_help(); exit; }
($opt_H) || usage("MySQL hostname/address not specified\n");
my $serverName = $1 if ($opt_H =~ /([-.A-Za-z0-9]+)/);
($serverName) || usage("Invalid MySQL hostname/address: $opt_H\n");
if ($opt_C) { $checklist = $1 if ($opt_C =~ /([-.A-Za-z0-9]+)/); }
if ($opt_P) { $pagedir = $opt_P; }
if ($opt_D) {
if ($opt_D eq 'F' || $opt_D eq 'T') {
$debug = ($opt_D eq 'F') ? 0 : 1;
} else {
usage("Invalid debug: $opt_D\n");
}
applications/display-test.pl view on Meta::CPAN
if ($opt_l) {
if ($opt_l eq 'F' || $opt_l eq 'T') {
$lockMySQL = ($opt_l eq 'F') ? 0 : 1;
} else {
usage("Invalid lockMySQL: $opt_l\n");
}
}
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
my ($dchecklist, $dtest, $dfetch, $tinterval, $tgroep, $resultsdir, $ttest, $firstTimeslot, $lastTimeslot, $rvOpen);
my (@fetch, $dstart, $tstart, $start, $step, $names, $data, $rows, $columns, $line, $val, @vals);
my ($command, $tstatus, $tduration, $timeValue, $prevGroep, @multiarrayFullCondensedView, @multiarrayMinimalCondensedView);
my ($rv, $dbh, $sth, $lockString, $findString, $unlockString, $doChecklist, $timeCorrectie, $timeslot);
my ($groupFullView, $groupCondensedView, $emptyFullView, $emptyCondencedView, $emptyMinimalCondencedView, $itemFullCondensedView);
my ($checkOk, $checkSkip, $configNumber, $printCondensedView, $problemSolved, $verifyNumber, $inProgressNumber);
my ($playSoundInProgress, $playSoundPreviousStatus, $playSoundStatus, %tableSoundStatusCache);
my ($prevHour, $currHour, %timeperiodID_days, %catalogID_uKey_timeperiodID) = (-1, -1);
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
my $boolean_daemonQuit = 0;
my $boolean_signal_hup = 0;
my $boolean_daemonControl = $loop;
my $colspanDisplayTime = $NUMBEROFFTESTS+2;
$colspanDisplayTime += $NUMBEROFFTESTS if $displayTime;
my $pidfile = $PIDPATH .'/'. $checklist .'.pid';
my @checklisttable = read_table($prgtext, $checklist, $loop, $debug);
resultsdirCreate();
my $pagedirBuildHash = ($pagedir =~ /^_loop_(?:[a-zA-Z0-9-]+)_(.*)$/) ? $1 : $pagedir;
build_hash_timeperiodID_days ($checklist, $pagedirBuildHash, \%timeperiodID_days, $debug);
build_hash_catalogID_uKey_timeperiodID ($checklist, $pagedirBuildHash, \%catalogID_uKey_timeperiodID, $debug);
my $directory = $HTTPSPATH .'/nav/'. $pagedir;
create_dir ($directory) unless ( -e "$directory" );
my $pagedirOrig = $pagedir;
applications/display-test.pl view on Meta::CPAN
$SIG{__DIE__} = \&signal_DIE;
$SIG{__WARN__} = \&signal_WARN;
} else {
$boolean_daemonQuit = 1;
}
do {
# Catch signals implementation
if ($boolean_signal_hup) {
@checklisttable = read_table($prgtext, $checklist, ( $loop ? 2 : 0 ), $debug);
resultsdirCreate();
build_hash_timeperiodID_days ($checklist, $pagedirBuildHash, \%timeperiodID_days, $debug);
build_hash_catalogID_uKey_timeperiodID ($checklist, $pagedirBuildHash, \%catalogID_uKey_timeperiodID, $debug);
$boolean_signal_hup = 0;
}
# Crontab implementation
read_tableSoundStatusCache ($checklist, $debug);
foreach ('P', 'A', 'S', 'T', 'D', 'L') { do_crontab ($_); }
applications/display-test.pl view on Meta::CPAN
exit 0;
}
exit 0;
}
# if ($boolean_daemonControl) { waitpid($pid,0); }
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
sub resultsdirCreate {
foreach $dchecklist (@checklisttable) {
my (undef, undef, $resultsdir, undef) = split(/\#/, $dchecklist, 4);
my $logging = $RESULTSPATH .'/'. $resultsdir;
create_dir ($logging);
$logging .= "/";
create_header ($logging ."HEADER.html");
create_footer ($logging ."FOOTER.html");
}
}
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
sub read_tableSoundStatusCache {
applications/display-test.pl view on Meta::CPAN
$inMCV{UNKNOWN}{CRITICAL} = 1;
$inMCV{UNKNOWN}{DEPENDENT} = 1;
$inMCV{DEPENDENT}{WARNING} = 1;
$inMCV{DEPENDENT}{CRITICAL} = 1;
$inMCV{DEPENDENT}{UNKNOWN} = 1;
$groupFullView = $groupCondensedView = 0;
foreach $dchecklist (@checklisttable) {
($tinterval, $tgroep, $resultsdir, $ttest) = split(/\#/, $dchecklist, 4);
my @stest = split(/\|/, $ttest);
my $showGroepHeader = ($prevGroep ne $tgroep) ? 1 : 0;
my $showGroepFooter = (($prevGroep ne '') && $showGroepHeader) ? 1 : 0;
printGroepCV($prevGroep, $showGroepHeader, 1);
$prevGroep = $tgroep;
printGroepFooter('', $showGroepFooter);
printGroepHeader($tgroep, $showGroepHeader);
foreach $dtest (@stest) {
applications/display-test.pl view on Meta::CPAN
my ($command, undef) = split(/\.pl/, $test);
my $environment = (($test =~ /\-\-environment=([PASTDL])/) ? $1 : 'P');
next if (defined $environment and $environment ne $Cenvironment);
$configNumber++;
my $trendline = get_trendline_from_test($test);
my $commandPopup = maskPassword ($test);
$commandPopup =~ s/(?:\s+(--environment=[PASTDL]|--trendline=\d+))//g;
my $popup = "<TR><TD BGCOLOR=#000080 WIDTH=100 ALIGN=RIGHT>Command</TD><TD BGCOLOR=#0000FF>$commandPopup</TD></TR><TR><TD BGCOLOR=#000080 WIDTH=100 ALIGN=RIGHT>Environment</TD><TD BGCOLOR=#0000FF>".$ENVIRONMENT{$environment}."</TD></TR><TR><T...
print "<", $CATALOGID, "><", $environment, "><", $trendline, "><", $tgroep, "><", $resultsdir, "><", $catalogID_uniqueKey, "><", $catalogID, "><", $uniqueKey, "><", $title, "><", $test, ">\n" if ($debug);
my $number = 1;
my ($statusIcon, $itemTitle, $itemStatus, $itemTimeslot, $itemStatusIcon, $itemInsertInMCV, $inIMW);
$itemTimeslot = $itemStatusIcon = $itemInsertInMCV = 0;
$inIMW = 1;
my @arrayStatusMessage = ();
if ($dbh and $rv) {
my ($acked, $sql, $tLastStatus, $tLastTimeslot, $tPrevStatus, $tPrevTimeslot, $activationTimeslot, $suspentionTimeslot, $instability, $persistent, $downtime, $suspentionTimeslotPersistentTrue, $suspentionTimeslotPersistentFalse, $comment);
applications/display-test.pl view on Meta::CPAN
my ($_statusMessage, undef) = reverse split(/\|/, $statusMessage, 2);
$ref->{statusMessage} = reverse $_statusMessage;
}
if ( -e $RESULTSPATH .'/'. $ref->{filename} ) {
$ref->{filename} = $RESULTSURL .'/'. $ref->{filename};
} else {
if ( -e $ref->{filename} ) {
$ref->{filename} =~ s/^$RESULTSPATH\//$RESULTSURL\//g;
} else { # work arround for when switching from ASNMTAP_PATH in mixed environment
$ref->{filename} =~ s*^/opt/asnmtap(-3.000.xxx)+/results/*$RESULTSPATH/*g;
if ( -e $ref->{filename} ) {
$ref->{filename} =~ s/^$RESULTSPATH\//$RESULTSURL\//g;
} else {
$ref->{filename} = '<NIHIL>';
}
}
}
my $tstatusMessage = ( ( $catalogID ne $CATALOGID or $ref->{filename} eq '<NIHIL>' ) ? encode_html_entities('M', $ref->{statusMessage}) : '<A HREF="'.$ref->{filename}.'" TARGET="_blank">'.encode_html_entities('M', $ref->{statusMessage...
applications/display-test.pl view on Meta::CPAN
$ref->{statusMessage} =~ s/[\n\r]/<br>/g;
$popup .= '<TR><TD BGCOLOR=#000080 WIDTH=100 ALIGN=RIGHT VALIGN=TOP>Status</TD><TD BGCOLOR=#0000FF><IMG SRC='.$IMAGESURL.'/'.$statusIcon.' WIDTH=15 HEIGHT=15 title= alt= BORDER=0> '.$ref->{startTime}.' '.encode_html_entities('M', ...
}
}
}
}
$sth->finish() or $rv = errorTrapDBI($checklist, "Cannot sth->finish: $findString");
}
printItemHeader($environment, $resultsdir, $catalogID_uniqueKey, $catalogID, $uniqueKey, $command, $title, $help, $popup, $statusOverlib, $comment);
$playSoundPreviousStatus = $playSoundInProgress = 0;
for ($number = 0; $number < $NUMBEROFFTESTS; $number++) {
my $endTime = $itemStarttime[$number];
$endTime .= '-'. $itemTimeslot[$number] if ($displayTimeslot);
printItemStatus($tinterval, $number+1, $itemStatus[$number], $endTime, $acked, $itemTimeslot[$number], $activationTimeslot, $suspentionTimeslot, $instability, $persistent, $downtime, $suspentionTimeslotPersistentTrue, $suspentionTimeslotP...
}
for ($number = 0; $number < $NUMBEROFFTESTS; $number++) {
push (@arrayStatusMessage, $tempStatusMessage[$number] ) if (defined $tempStatusMessage[$number]);
}
applications/display-test.pl view on Meta::CPAN
}
return ($InIMW);
}
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
sub printHtmlHeader {
my $htmlTitle = shift(@_);
print_header (*HTML, $pagedir, "$pageset-cv", $htmlTitle, "Full View", 60, "ONLOAD=\"startRefresh(); initSound();\"", 'T', "<script type=\"text/javascript\" src=\"$HTTPSURL/overlib.js\"><!-- overLIB (c) Erik Bosrup --></script>", undef);
print HTML '<TABLE WIDTH="100%">', "\n";
print_header (*HTMLCV, $pagedir, "$pageset-mcv", $htmlTitle, "Condenced View", 60, "ONLOAD=\"startRefresh(); initSound();\"", 'T', "<script type=\"text/javascript\" src=\"$HTTPSURL/overlib.js\"><!-- overLIB (c) Erik Bosrup --></script>", undef);
print HTMLCV '<TABLE WIDTH="100%">', "\n";
print_header (*HTMLMCV, $pagedir, "$pageset", $htmlTitle, "Minimal Condenced View", 60, "ONLOAD=\"startRefresh(); initSound();\"", 'T', "<script type=\"text/javascript\" src=\"$HTTPSURL/overlib.js\"><!-- overLIB (c) Erik Bosrup --></script>", undef...
print HTMLMCV '<TABLE WIDTH="100%">', "\n";
}
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
sub printGroepHeader {
my ($title, $show) = @_;
if ($show) {
$groupFullView = $groupCondensedView = 0;
applications/display-test.pl view on Meta::CPAN
print HTMLMCV '</TABLE>', "\n";
}
print_legend (*HTMLMCV);
print HTMLMCV '<TABLE WIDTH="100%">', "\n";
}
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
sub printItemHeader {
my ($environment, $resultsdir, $catalogID_uniqueKey, $catalogID, $uniqueKey, $command, $title, $help, $popup, $statusOverlib, $comment) = @_;
unless ( defined $creationTime ) {
my $htmlFilename = "$RESULTSPATH/$resultsdir/$command-$catalogID_uniqueKey";
$htmlFilename .= "-sql.html";
unless ( -e "$htmlFilename" ) {
my $rvOpen = open(PNG, ">$htmlFilename");
if ($rvOpen) {
print PNG <<EOM;
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<title>$APPLICATION @ $BUSINESS</title>
<META HTTP-EQUIV="Expires" CONTENT="Wed, 10 Dec 2003 00:00:01 GMT">
<META HTTP-EQUIV="Pragma" CONTENT="no-cache">
<META HTTP-EQUIV="Cache-Control" CONTENT="no-cache">
<META HTTP-EQUIV="Refresh" CONTENT="60">
<link rel="stylesheet" type="text/css" href="$HTTPSURL/asnmtap.css">
</HEAD>
<BODY>
EOM
print PNG '<IMG SRC="', $RESULTSURL, '/', $resultsdir, '/', $command, '-', $catalogID_uniqueKey, '-sql.png"></BODY></HTML>', "\n";
close(PNG);
} else {
print "Cannot create $htmlFilename!\n";
}
}
}
my ($posTokenFrom, $posTokenTo, $groep, $test, $serverID);
$posTokenFrom = index $title, '[';
applications/display-test.pl view on Meta::CPAN
$_exclaim = "<TABLE WIDTH=100% BORDER=0 CELLSPACING=1 CELLPADDING=2 BGCOLOR=#000000><TR><TD BGCOLOR=#000080 WIDTH=100 ALIGN=RIGHT>Plugin</TD><TD BGCOLOR=#0000FF>$test</TD></TR>$popup<TR><TD BGCOLOR=#000080 WIDTH=100 ALIGN=RIGHT>Unique Key</TD><TD B...
my $exclaim = '<TD WIDTH="56"><a href="javascript:void(0);" onDblClick="nd(); return toggleDiv(\''.$catalogID_uniqueKey.'\');" onClick="return overlib(\''.$_exclaim.'\', CAPTION, \'Exclaim\', STICKY, CLOSECLICK, CAPCOLOR, \'#000000\', FGCOLOR, \'#...
my $_comment = ( defined $comment ? 'onmouseover="return overlib(\''.$comment.'\', CAPTION, \'Comments\', STICKY, CLOSECLICK, CAPCOLOR, \'#000000\', FGCOLOR, \'#000000\', BGCOLOR, \''.$COLORS{$statusOverlib}.'\', HAUTO, VAUTO, WIDTH, 692, OFFSETX, ...
my $comments = '<a href="'. $HTTPSURL .'/cgi-bin/comments.pl?pagedir='.$pagedir.'&pageset='.$pageset.'&debug=F&CGICOOKIE=1&action=listView&catalogID='.$catalogID.'&uKey='.$uniqueKey.'" target="_self" '.$_comment.'><IMG SRC="...
my $helpfile = (defined $help and $help eq '1') ? '<A HREF="'. $HTTPSURL .'/cgi-bin/getHelpPlugin.pl?pagedir='.$pagedir.'&pageset='.$pageset.'&debug=F&CGICOOKIE=1&catalogID='.$catalogID.'&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-test.pl view on Meta::CPAN
my ($debugInfo, $boldStart, $boldEnd);
$debugInfo = $boldStart = $boldEnd = '';
if ($number == 0) {
$printCondensedView = 1 unless ( $status eq 'IN PROGRESS' or $status eq 'OK' or $status eq 'NO TEST' or $status eq 'OFFLINE' );
if ($ERRORS{$status} <= $ERRORS{UNKNOWN} or $ERRORS{$status} == $ERRORS{'NO DATA'}) { $playSoundStatus = ($playSoundStatus > $ERRORS{$status}) ? $playSoundStatus : $ERRORS{$status}; }
} else {
my $playSoundSet = 0;
unless ( $printCondensedView or $problemSolved or $checkSkip == $inProgressNumber) {
if ( $number == 1 ) {
$verifyNumber = $VERIFYNUMBEROK;
if ( $interval and $interval < $VERIFYMINUTEOK ) {
$verifyNumber = int($VERIFYMINUTEOK / $interval);
if ( $verifyNumber > $NUMBEROFFTESTS ) {
$verifyNumber = $NUMBEROFFTESTS;
} elsif ($verifyNumber < $VERIFYNUMBEROK) {
$verifyNumber = $VERIFYNUMBEROK;
}
}
$inProgressNumber = $verifyNumber;
if ( $verifyNumber < $NUMBEROFFTESTS ) {
$debugInfo .= "a-" if ($debug);
$inProgressNumber++ if ( $status eq 'IN PROGRESS' );
}
if ( $status eq 'IN PROGRESS' ) {
$playSoundInProgress = 1;
} else {
$playSoundPreviousStatus = $ERRORS{$status};
}
}
my ($localYear, $localMonth, $currentYear, $currentMonth, $currentDay, $currentHour, $currentMin, $currentSec) = ((localtime)[5], (localtime)[4], ((localtime)[5] + 1900), ((localtime)[4] + 1), (localtime)[3,2,1,0]);
my $solvedDate = "$currentYear-$currentMonth-$currentDay";
my $solvedTime = "$currentHour:$currentMin:$currentSec";
my $solvedTimeslot = timelocal($currentSec, $currentMin, $currentHour, $currentDay, $localMonth, $localYear);
my $notDowntimeOrPersistent = 1;
if ( $downtime or $persistent ) {
$notDowntimeOrPersistent = ( $solvedTimeslot >= $activationTimeslot ? 0 : 1 );
}
if ( $number <= $inProgressNumber ) {
$debugInfo .= "b-" if ($debug);
$checkOk++ if ( $status eq 'OK' );
if ( $notDowntimeOrPersistent and ($status eq 'IN PROGRESS' or $status eq 'OK' or $status eq 'NO TEST' or $status eq 'OFFLINE' ) ) {
$checkSkip++ unless ( $acked and $status eq 'NO TEST' );
} else {
$printCondensedView = 1
}
} elsif ( $checkOk < $verifyNumber ) {
$debugInfo .= "c-" if ($debug);
$printCondensedView = ( $checkSkip == $inProgressNumber ) ? 0 : 1;
}
if ( $checkOk >= $verifyNumber ) {
$debugInfo .= "s-" if ($debug);
$problemSolved = 1;
}
$printCondensedView = 0 if ($downtime and ! $persistent);
$debugInfo .= "$inIMW-$instability-$persistent-$downtime-$inProgressNumber-$verifyNumber-$checkOk-$checkSkip-$printCondensedView-$problemSolved-" if ($debug);
my $update = 0;
my $sqlWhere = '';
if ( $persistent == 0 ) {
if ( $problemSolved ) {
if ($solvedTimeslot > $activationTimeslot and ! $downtime) {
$sqlWhere = ' and persistent="0" and "' .$solvedTimeslot. '">activationTimeslot';
$update = 1;
}
applications/display-test.pl view on Meta::CPAN
}
}
if ($update and $instability == 0) {
my $sql = 'UPDATE ' .$SERVERTABLCOMMENTS. ' SET replicationStatus="U", problemSolved="1", solvedDate="' .$solvedDate. '", solvedTime="' .$solvedTime. '", solvedTimeslot="' .$solvedTimeslot. '" where catalogID="' .$catalogID. '" and uKey="' .$...
$dbh->do ( $sql ) or $rv = errorTrapDBI($checklist, "Cannot dbh->do: $sql");
}
}
if ( $number == 2 ) {
if ( $playSoundInProgress ) {
$playSoundPreviousStatus = $ERRORS{$status};
} else {
$playSoundSet = 1;
}
} elsif ( $number == 3 and $playSoundInProgress ) {
$playSoundSet = 1;
}
if ( $playSoundSet ) {
$playSoundSet = 0;
if ( ( $ERRORS{$status} == $ERRORS{OK} or ( $ERRORS{$status} >= $ERRORS{DEPENDENT} and $ERRORS{$status} != $ERRORS{'NO DATA'} and $ERRORS{$status} != $ERRORS{TRENDLINE} ) ) and ( ( $playSoundPreviousStatus >= $ERRORS{WARNING} and $playSoundPrev...
if ( defined $tableSoundStatusCache { $catalogID_uniqueKey } ) {
if ( $tableSoundStatusCache { $catalogID_uniqueKey } ne $timeslot ) {
$playSoundStatus = ($playSoundStatus > $playSoundPreviousStatus) ? $playSoundStatus : $playSoundPreviousStatus;
applications/display-test.pl view on Meta::CPAN
my $break = '';
my $errorMessage;
# ***************************************************************************
# The 400 series of Web error codes indicate an error with your Web browser *
# ***************************************************************************
if ($statusMessage =~ /400 Bad Request/ ) {
$errorMessage = 'The request could not be understood by the server due to incorrect syntax';
} elsif ($statusMessage =~ /401 Unauthorized User/ ) {
$errorMessage = 'The client does not have access to this resource, authorization is needed';
} elsif ($statusMessage =~ /402 Payment Required/ ) {
$errorMessage = 'Payment is required. Reserved for future use';
} elsif ($statusMessage =~ /403 Forbidden Connection/ ) {
$errorMessage = 'The server understood the request, but is refusing to fulfill it. Access to a resource is not allowed. The most frequent case of this occurs when directory listing access is not allowed';
} elsif ($statusMessage =~ /404 Page Not Found/ ) {
$errorMessage = 'The resource request was not found. This is the code returned for missing pages or graphics. Viruses will often attempt to access resources that do not exist, so the error does not necessarily represent a problem';
} elsif ($statusMessage =~ /405 Method Not Allowed/ ) {
$errorMessage = 'The access method (GET, POST, HEAD) is not allowed on this resource';
} elsif ($statusMessage =~ /406 Not Acceptable/ ) {
$errorMessage = 'None of the acceptable file types (as requested by client) are available for this resource';
} elsif ($statusMessage =~ /407 Proxy Authentication Required/ ) {
$errorMessage = 'The client does not have access to this resource, proxy authorization is needed';
} elsif ($statusMessage =~ /408 Request Timeout/ ) {
$errorMessage = 'The client did not send a request within the required time period';
} elsif ($statusMessage =~ /409 Conflict/ ) {
$errorMessage = 'The request could not be completed due to a conflict with the current state of the resource';
} elsif ($statusMessage =~ /410 Gone/ ) {
$errorMessage = 'The requested resource is no longer available at the server and no forwarding address is known. This condition is similar to 404, except that the 410 error condition is expected to be permanent. Any robot seeing this response sho...
} elsif ($statusMessage =~ /411 Length Required/ ) {
$errorMessage = 'The request requires the Content-Length HTTP request field to be specified';
} elsif ($statusMessage =~ /412 Precondition Failed/ ) {
$errorMessage = 'The precondition given in one or more of the request-header fields evaluated to false when it was tested on the server';
} elsif ($statusMessage =~ /413 Request Entity Too Large/ ) {
$errorMessage = 'The server is refusing to process a request because the request entity is larger than the server is willing or able to process';
} elsif ($statusMessage =~ /414 Request URL Too Large/ ) {
$errorMessage = 'The server is refusing to service the request because the Request-URI is longer than the server is willing to interpret The URL is too long (possibly too many query keyword/value pairs)';
} elsif ($statusMessage =~ /415 Unsupported Media Type/ ) {
$errorMessage = 'The server is refusing to service the request because the entity of the request is in a format not supported by the requested resource for the requested method';
} elsif ($statusMessage =~ /416 Requested Range Invalid/ ) {
$errorMessage = 'The portion of the resource requested is not available or out of range';
} elsif ($statusMessage =~ /417 Expectation Failed/ ) {
$errorMessage = 'The Expect specifier in the HTTP request header can not be met';
# ***************************************************************************
# The 500 series of Web error codes indicate an error with the Web server *
# ***************************************************************************
} elsif ($statusMessage =~ /500 Can't connect to proxy/ ) {
$errorMessage = 'The server had some sort of internal error trying to fulfil the request. The client may see a partial page or error message';
} elsif ($statusMessage =~ /500 Connect failed/ ) {
$errorMessage = 'The server had some sort of internal error trying to fulfil the request. The client may see a partial page or error message';
} elsif ($statusMessage =~ /500 Internal Server Error/ ) {
$errorMessage = 'The server had some sort of internal error trying to fulfil the request. The client may see a partial page or error message (client certificate maybe needed)';
} elsif ($statusMessage =~ /500 Proxy connect failed/ ) {
$errorMessage = 'The server had some sort of internal error trying to fulfil the request. The client may see a partial page or error message';
} elsif ($statusMessage =~ /500 Server Error/ ) {
$errorMessage = 'The server had some sort of internal error trying to fulfil the request. The client may see a partial page or error message';
} elsif ($statusMessage =~ /500 SSL read timeout/ ) {
$errorMessage = 'The server had some sort of internal error trying to fulfil the request. The client may see a partial page or error message';
} elsif ($statusMessage =~ /501 Not Implemented/ ) {
$errorMessage = 'Function not implemented in Web server software. The request needs functionality not available on the server';
} elsif ($statusMessage =~ /502 Bad Gateway/ ) {
$errorMessage = 'Bad Gateway: a server being used by this Web server has sent an invalid response. The response by an intermediary server was invalid. This may happen if there is a problem with the DNS routing tables';
} elsif ($statusMessage =~ /503 Service Unavailable/ ) {
$errorMessage = 'Service temporarily unavailable because of currently/temporary overload or maintenance';
} elsif ($statusMessage =~ /504 Gateway Timeout/ ) {
$errorMessage = 'The server did not respond back to the gateway within acceptable time period';
} elsif ($statusMessage =~ /505 HTTP Version Not Supported/ ) {
$errorMessage = 'The server does not support the HTTP protocol version that was used in the request message';
# ***************************************************************************
# Error codes indicate an error with the ... *
# ***************************************************************************
} elsif ($statusMessage =~ /Failure of server APACHE bridge/ ) {
$errorMessage = 'Weblogic Bridge Message: Failure of server APACHE bridge';
if ($statusMessage =~ /No backend server available for connection/ ) {
$errorMessage .= ' - No backend server available for connection';
applications/display-test.pl view on Meta::CPAN
print "Usage: $PROGNAME -H <MySQL hostname> [-C <Checklist>] [-P <pagedir>] [-L <loop>] [-t <trigger>] [-c <YYYY-MM-DD HH:MM:SS> ] [-T <displayTime>] [-l <lockMySQL>] [-D <debug>] [-V version] [-h help]\n";
}
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
sub print_help () {
print_revision($PROGNAME, $version);
print "ASNMTAP Display for the '$APPLICATION'
-H, --hostname=<HOSTNAME>
HOSTNAME : hostname/address from the MySQL server
-C, --checklist=<FILENAME>
FILENAME : filename from the checklist for the html output loop (default 'DisplayCT')
-P, --pagedir=<PAGEDIR>
PAGEDIR : sub directory name for the html output (default 'index')
-L, --loop=F|T
F(alse) : loop off (default)
T(rue) : loop on
-t, --trigger=F|T
F(alse) : trigger off (default)
T(rue) : trigger on
applications/display.pl view on Meta::CPAN
"L:s" => \$opt_L, "loop:s" => \$opt_L,
"t:s" => \$opt_t, "trigger:s" => \$opt_t,
"c:s" => \$opt_c, "creationTime:s" => \$opt_c,
"T:s" => \$opt_T, "displayTime:s" => \$opt_T,
"l:s" => \$opt_l, "lockMySQL:s" => \$opt_l
);
if ($opt_V) { print_revision($PROGNAME, $version); exit; }
if ($opt_h) { print_help(); exit; }
($opt_H) || usage("MySQL hostname/address not specified\n");
my $serverName = $1 if ($opt_H =~ /([-.A-Za-z0-9]+)/);
($serverName) || usage("Invalid MySQL hostname/address: $opt_H\n");
if ($opt_C) { $checklist = $1 if ($opt_C =~ /([-.A-Za-z0-9]+)/); }
if ($opt_P) { $pagedir = $opt_P; }
if ($opt_D) {
if ($opt_D eq 'F' || $opt_D eq 'T') {
$debug = ($opt_D eq 'F') ? 0 : 1;
} else {
usage("Invalid debug: $opt_D\n");
}
applications/display.pl view on Meta::CPAN
if ($opt_l) {
if ($opt_l eq 'F' || $opt_l eq 'T') {
$lockMySQL = ($opt_l eq 'F') ? 0 : 1;
} else {
usage("Invalid lockMySQL: $opt_l\n");
}
}
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
my ($dchecklist, $dtest, $dfetch, $tinterval, $tgroep, $resultsdir, $ttest, $firstTimeslot, $lastTimeslot, $rvOpen);
my (@fetch, $dstart, $tstart, $start, $step, $names, $data, $rows, $columns, $line, $val, @vals);
my ($command, $tstatus, $tduration, $timeValue, $prevGroep, @multiarrayFullCondensedView, @multiarrayMinimalCondensedView);
my ($rv, $dbh, $sth, $lockString, $findString, $unlockString, $doChecklist, $timeCorrectie, $timeslot);
my ($groupFullView, $groupCondensedView, $emptyFullView, $emptyCondencedView, $emptyMinimalCondencedView, $itemFullCondensedView);
my ($checkOk, $checkSkip, $configNumber, $printCondensedView, $problemSolved, $verifyNumber, $inProgressNumber);
my ($playSoundInProgress, $playSoundPreviousStatus, $playSoundStatus, %tableSoundStatusCache);
my ($prevHour, $currHour, %timeperiodID_days, %catalogID_uKey_timeperiodID) = (-1, -1);
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
my $boolean_daemonQuit = 0;
my $boolean_signal_hup = 0;
my $boolean_daemonControl = $loop;
my $colspanDisplayTime = $NUMBEROFFTESTS+2;
$colspanDisplayTime += $NUMBEROFFTESTS if $displayTime;
my $pidfile = $PIDPATH .'/'. $checklist .'.pid';
my @checklisttable = read_table($prgtext, $checklist, $loop, $debug);
resultsdirCreate();
my $pagedirBuildHash = ($pagedir =~ /^_loop_(?:[a-zA-Z0-9-]+)_(.*)$/) ? $1 : $pagedir;
build_hash_timeperiodID_days ($checklist, $pagedirBuildHash, \%timeperiodID_days, $debug);
build_hash_catalogID_uKey_timeperiodID ($checklist, $pagedirBuildHash, \%catalogID_uKey_timeperiodID, $debug);
my $directory = $HTTPSPATH .'/nav/'. $pagedir;
create_dir ($directory) unless ( -e "$directory" );
my $pagedirOrig = $pagedir;
applications/display.pl view on Meta::CPAN
$SIG{__DIE__} = \&signal_DIE;
$SIG{__WARN__} = \&signal_WARN;
} else {
$boolean_daemonQuit = 1;
}
do {
# Catch signals implementation
if ($boolean_signal_hup) {
@checklisttable = read_table($prgtext, $checklist, ( $loop ? 2 : 0 ), $debug);
resultsdirCreate();
build_hash_timeperiodID_days ($checklist, $pagedirBuildHash, \%timeperiodID_days, $debug);
build_hash_catalogID_uKey_timeperiodID ($checklist, $pagedirBuildHash, \%catalogID_uKey_timeperiodID, $debug);
$boolean_signal_hup = 0;
}
# Crontab implementation
read_tableSoundStatusCache ($checklist, $debug);
foreach ('P', 'A', 'S', 'T', 'D', 'L') { do_crontab ($_); }
applications/display.pl view on Meta::CPAN
exit 0;
}
exit 0;
}
# if ($boolean_daemonControl) { waitpid($pid,0); }
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
sub resultsdirCreate {
foreach $dchecklist (@checklisttable) {
my (undef, undef, $resultsdir, undef) = split(/\#/, $dchecklist, 4);
my $logging = $RESULTSPATH .'/'. $resultsdir;
create_dir ($logging);
$logging .= "/";
create_header ($logging ."HEADER.html");
create_footer ($logging ."FOOTER.html");
}
}
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
sub read_tableSoundStatusCache {
applications/display.pl view on Meta::CPAN
$inMCV{UNKNOWN}{CRITICAL} = 1;
$inMCV{UNKNOWN}{DEPENDENT} = 1;
$inMCV{DEPENDENT}{WARNING} = 1;
$inMCV{DEPENDENT}{CRITICAL} = 1;
$inMCV{DEPENDENT}{UNKNOWN} = 1;
$groupFullView = $groupCondensedView = 0;
foreach $dchecklist (@checklisttable) {
($tinterval, $tgroep, $resultsdir, $ttest) = split(/\#/, $dchecklist, 4);
my @stest = split(/\|/, $ttest);
my $showGroepHeader = ($prevGroep ne $tgroep) ? 1 : 0;
my $showGroepFooter = (($prevGroep ne '') && $showGroepHeader) ? 1 : 0;
printGroepCV($prevGroep, $showGroepHeader, 1);
$prevGroep = $tgroep;
printGroepFooter('', $showGroepFooter);
printGroepHeader($tgroep, $showGroepHeader);
foreach $dtest (@stest) {
applications/display.pl view on Meta::CPAN
my ($command, undef) = split(/\.pl/, $test);
my $environment = (($test =~ /\-\-environment=([PASTDL])/) ? $1 : 'P');
next if (defined $environment and $environment ne $Cenvironment);
$configNumber++;
my $trendline = get_trendline_from_test($test);
my $commandPopup = maskPassword ($test);
$commandPopup =~ s/(?:\s+(--environment=[PASTDL]|--trendline=\d+))//g;
my $popup = "<TR><TD BGCOLOR=#000080 WIDTH=100 ALIGN=RIGHT>Command</TD><TD BGCOLOR=#0000FF>$commandPopup</TD></TR><TR><TD BGCOLOR=#000080 WIDTH=100 ALIGN=RIGHT>Environment</TD><TD BGCOLOR=#0000FF>".$ENVIRONMENT{$environment}."</TD></TR><TR><T...
print "<", $CATALOGID, "><", $environment, "><", $trendline, "><", $tgroep, "><", $resultsdir, "><", $catalogID_uniqueKey, "><", $catalogID, "><", $uniqueKey, "><", $title, "><", $test, ">\n" if ($debug);
my $number = 1;
my ($statusIcon, $itemTitle, $itemStatus, $itemTimeslot, $itemStatusIcon, $itemInsertInMCV, $inIMW);
$itemTimeslot = $itemStatusIcon = $itemInsertInMCV = 0;
$inIMW = 1;
my @arrayStatusMessage = ();
if ($dbh and $rv) {
my ($acked, $sql, $tLastStatus, $tLastTimeslot, $tPrevStatus, $tPrevTimeslot, $activationTimeslot, $suspentionTimeslot, $instability, $persistent, $downtime, $suspentionTimeslotPersistentTrue, $suspentionTimeslotPersistentFalse, $comment);
applications/display.pl view on Meta::CPAN
my ($_statusMessage, undef) = reverse split(/\|/, $statusMessage, 2);
$ref->{statusMessage} = reverse $_statusMessage;
}
if ( -e $RESULTSPATH .'/'. $ref->{filename} ) {
$ref->{filename} = $RESULTSURL .'/'. $ref->{filename};
} else {
if ( -e $ref->{filename} ) {
$ref->{filename} =~ s/^$RESULTSPATH\//$RESULTSURL\//g;
} else { # work arround for when switching from ASNMTAP_PATH in mixed environment
$ref->{filename} =~ s*^/opt/asnmtap(-3.000.xxx)+/results/*$RESULTSPATH/*g;
if ( -e $ref->{filename} ) {
$ref->{filename} =~ s/^$RESULTSPATH\//$RESULTSURL\//g;
} else {
$ref->{filename} = '<NIHIL>';
}
}
}
my $tstatusMessage = ( ( $catalogID ne $CATALOGID or $ref->{filename} eq '<NIHIL>' ) ? encode_html_entities('M', $ref->{statusMessage}) : '<A HREF="'.$ref->{filename}.'" TARGET="_blank">'.encode_html_entities('M', $ref->{statusMessage...
applications/display.pl view on Meta::CPAN
$ref->{statusMessage} =~ s/[\n\r]/<br>/g;
$popup .= '<TR><TD BGCOLOR=#000080 WIDTH=100 ALIGN=RIGHT VALIGN=TOP>Status</TD><TD BGCOLOR=#0000FF><IMG SRC='.$IMAGESURL.'/'.$statusIcon.' WIDTH=15 HEIGHT=15 title= alt= BORDER=0> '.$ref->{startTime}.' '.encode_html_entities('M', ...
}
}
}
}
$sth->finish() or $rv = errorTrapDBI($checklist, "Cannot sth->finish: $findString");
}
printItemHeader($environment, $resultsdir, $catalogID_uniqueKey, $catalogID, $uniqueKey, $command, $title, $help, $popup, $statusOverlib, $comment);
$playSoundPreviousStatus = $playSoundInProgress = 0;
for ($number = 0; $number < $NUMBEROFFTESTS; $number++) {
my $endTime = $itemStarttime[$number];
$endTime .= '-'. $itemTimeslot[$number] if ($displayTimeslot);
printItemStatus($tinterval, $number+1, $itemStatus[$number], $endTime, $acked, $itemTimeslot[$number], $activationTimeslot, $suspentionTimeslot, $instability, $persistent, $downtime, $suspentionTimeslotPersistentTrue, $suspentionTimeslotP...
}
for ($number = 0; $number < $NUMBEROFFTESTS; $number++) {
push (@arrayStatusMessage, $tempStatusMessage[$number] ) if (defined $tempStatusMessage[$number]);
}
applications/display.pl view on Meta::CPAN
}
return ($InIMW);
}
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
sub printHtmlHeader {
my $htmlTitle = shift(@_);
print_header (*HTML, $pagedir, "$pageset-cv", $htmlTitle, "Full View", 60, "ONLOAD=\"startRefresh(); initSound();\"", 'T', "<script type=\"text/javascript\" src=\"$HTTPSURL/overlib.js\"><!-- overLIB (c) Erik Bosrup --></script>", undef);
print HTML '<TABLE WIDTH="100%">', "\n";
print_header (*HTMLCV, $pagedir, "$pageset-mcv", $htmlTitle, "Condenced View", 60, "ONLOAD=\"startRefresh(); initSound();\"", 'T', "<script type=\"text/javascript\" src=\"$HTTPSURL/overlib.js\"><!-- overLIB (c) Erik Bosrup --></script>", undef);
print HTMLCV '<TABLE WIDTH="100%">', "\n";
print_header (*HTMLMCV, $pagedir, "$pageset", $htmlTitle, "Minimal Condenced View", 60, "ONLOAD=\"startRefresh(); initSound();\"", 'T', "<script type=\"text/javascript\" src=\"$HTTPSURL/overlib.js\"><!-- overLIB (c) Erik Bosrup --></script>", undef...
print HTMLMCV '<TABLE WIDTH="100%">', "\n";
}
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
sub printGroepHeader {
my ($title, $show) = @_;
if ($show) {
$groupFullView = $groupCondensedView = 0;
applications/display.pl view on Meta::CPAN
print HTMLMCV '</TABLE>', "\n";
}
print_legend (*HTMLMCV);
print HTMLMCV '<TABLE WIDTH="100%">', "\n";
}
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
sub printItemHeader {
my ($environment, $resultsdir, $catalogID_uniqueKey, $catalogID, $uniqueKey, $command, $title, $help, $popup, $statusOverlib, $comment) = @_;
unless ( defined $creationTime ) {
my $htmlFilename = "$RESULTSPATH/$resultsdir/$command-$catalogID_uniqueKey";
$htmlFilename .= "-sql.html";
unless ( -e "$htmlFilename" ) {
my $rvOpen = open(PNG, ">$htmlFilename");
if ($rvOpen) {
print PNG <<EOM;
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<title>$APPLICATION @ $BUSINESS</title>
<META HTTP-EQUIV="Expires" CONTENT="Wed, 10 Dec 2003 00:00:01 GMT">
<META HTTP-EQUIV="Pragma" CONTENT="no-cache">
<META HTTP-EQUIV="Cache-Control" CONTENT="no-cache">
<META HTTP-EQUIV="Refresh" CONTENT="60">
<link rel="stylesheet" type="text/css" href="$HTTPSURL/asnmtap.css">
</HEAD>
<BODY>
EOM
print PNG '<IMG SRC="', $RESULTSURL, '/', $resultsdir, '/', $command, '-', $catalogID_uniqueKey, '-sql.png"></BODY></HTML>', "\n";
close(PNG);
} else {
print "Cannot create $htmlFilename!\n";
}
}
}
my ($posTokenFrom, $posTokenTo, $groep, $test, $serverID);
$posTokenFrom = index $title, '[';
applications/display.pl view on Meta::CPAN
$_exclaim = "<TABLE WIDTH=100% BORDER=0 CELLSPACING=1 CELLPADDING=2 BGCOLOR=#000000><TR><TD BGCOLOR=#000080 WIDTH=100 ALIGN=RIGHT>Plugin</TD><TD BGCOLOR=#0000FF>$test</TD></TR>$popup<TR><TD BGCOLOR=#000080 WIDTH=100 ALIGN=RIGHT>Unique Key</TD><TD B...
my $exclaim = '<TD WIDTH="56"><a href="javascript:void(0);" onDblClick="nd(); return toggleDiv(\''.$catalogID_uniqueKey.'\');" onClick="return overlib(\''.$_exclaim.'\', CAPTION, \'Exclaim\', STICKY, CLOSECLICK, CAPCOLOR, \'#000000\', FGCOLOR, \'#...
my $_comment = ( defined $comment ? 'onmouseover="return overlib(\''.$comment.'\', CAPTION, \'Comments\', STICKY, CLOSECLICK, CAPCOLOR, \'#000000\', FGCOLOR, \'#000000\', BGCOLOR, \''.$COLORS{$statusOverlib}.'\', HAUTO, VAUTO, WIDTH, 692, OFFSETX, ...
my $comments = '<a href="'. $HTTPSURL .'/cgi-bin/comments.pl?pagedir='.$pagedir.'&pageset='.$pageset.'&debug=F&CGICOOKIE=1&action=listView&catalogID='.$catalogID.'&uKey='.$uniqueKey.'" target="_self" '.$_comment.'><IMG SRC="...
my $helpfile = (defined $help and $help eq '1') ? '<A HREF="'. $HTTPSURL .'/cgi-bin/getHelpPlugin.pl?pagedir='.$pagedir.'&pageset='.$pageset.'&debug=F&CGICOOKIE=1&catalogID='.$catalogID.'&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 ($debugInfo, $boldStart, $boldEnd);
$debugInfo = $boldStart = $boldEnd = '';
if ($number == 0) {
$printCondensedView = 1 unless ( $status eq 'IN PROGRESS' or $status eq 'OK' or $status eq 'NO TEST' or $status eq 'OFFLINE' );
if ($ERRORS{$status} <= $ERRORS{UNKNOWN} or $ERRORS{$status} == $ERRORS{'NO DATA'}) { $playSoundStatus = ($playSoundStatus > $ERRORS{$status}) ? $playSoundStatus : $ERRORS{$status}; }
} else {
my $playSoundSet = 0;
unless ( $printCondensedView or $problemSolved or $checkSkip == $inProgressNumber) {
if ( $number == 1 ) {
$verifyNumber = $VERIFYNUMBEROK;
if ( $interval and $interval < $VERIFYMINUTEOK ) {
$verifyNumber = int($VERIFYMINUTEOK / $interval);
if ( $verifyNumber > $NUMBEROFFTESTS ) {
$verifyNumber = $NUMBEROFFTESTS;
} elsif ($verifyNumber < $VERIFYNUMBEROK) {
$verifyNumber = $VERIFYNUMBEROK;
}
}
$inProgressNumber = $verifyNumber;
if ( $verifyNumber < $NUMBEROFFTESTS ) {
$debugInfo .= "a-" if ($debug);
$inProgressNumber++ if ( $status eq 'IN PROGRESS' );
}
if ( $status eq 'IN PROGRESS' ) {
$playSoundInProgress = 1;
} else {
$playSoundPreviousStatus = $ERRORS{$status};
}
}
my ($localYear, $localMonth, $currentYear, $currentMonth, $currentDay, $currentHour, $currentMin, $currentSec) = ((localtime)[5], (localtime)[4], ((localtime)[5] + 1900), ((localtime)[4] + 1), (localtime)[3,2,1,0]);
my $solvedDate = "$currentYear-$currentMonth-$currentDay";
my $solvedTime = "$currentHour:$currentMin:$currentSec";
my $solvedTimeslot = timelocal($currentSec, $currentMin, $currentHour, $currentDay, $localMonth, $localYear);
my $notDowntimeOrPersistent = 1;
if ( $downtime or $persistent ) {
$notDowntimeOrPersistent = ( $solvedTimeslot >= $activationTimeslot ? 0 : 1 );
}
if ( $number <= $inProgressNumber ) {
$debugInfo .= "b-" if ($debug);
$checkOk++ if ( $status eq 'OK' );
if ( $notDowntimeOrPersistent and ($status eq 'IN PROGRESS' or $status eq 'OK' or $status eq 'NO TEST' or $status eq 'OFFLINE' ) ) {
$checkSkip++ unless ( $acked and $status eq 'NO TEST' );
} else {
$printCondensedView = 1
}
} elsif ( $checkOk < $verifyNumber ) {
$debugInfo .= "c-" if ($debug);
$printCondensedView = ( $checkSkip == $inProgressNumber ) ? 0 : 1;
}
if ( $checkOk >= $verifyNumber ) {
$debugInfo .= "s-" if ($debug);
$problemSolved = 1;
}
$printCondensedView = 0 if ($downtime and ! $persistent);
$debugInfo .= "$inIMW-$instability-$persistent-$downtime-$inProgressNumber-$verifyNumber-$checkOk-$checkSkip-$printCondensedView-$problemSolved-" if ($debug);
my $update = 0;
my $sqlWhere = '';
if ( $persistent == 0 ) {
if ( $problemSolved ) {
if ($solvedTimeslot > $activationTimeslot and ! $downtime) {
$sqlWhere = ' and persistent="0" and "' .$solvedTimeslot. '">activationTimeslot';
$update = 1;
}
applications/display.pl view on Meta::CPAN
}
}
if ($update and $instability == 0) {
my $sql = 'UPDATE ' .$SERVERTABLCOMMENTS. ' SET replicationStatus="U", problemSolved="1", solvedDate="' .$solvedDate. '", solvedTime="' .$solvedTime. '", solvedTimeslot="' .$solvedTimeslot. '" where catalogID="' .$catalogID. '" and uKey="' .$...
$dbh->do ( $sql ) or $rv = errorTrapDBI($checklist, "Cannot dbh->do: $sql");
}
}
if ( $number == 2 ) {
if ( $playSoundInProgress ) {
$playSoundPreviousStatus = $ERRORS{$status};
} else {
$playSoundSet = 1;
}
} elsif ( $number == 3 and $playSoundInProgress ) {
$playSoundSet = 1;
}
if ( $playSoundSet ) {
$playSoundSet = 0;
if ( ( $ERRORS{$status} == $ERRORS{OK} or ( $ERRORS{$status} >= $ERRORS{DEPENDENT} and $ERRORS{$status} != $ERRORS{'NO DATA'} and $ERRORS{$status} != $ERRORS{TRENDLINE} ) ) and ( ( $playSoundPreviousStatus >= $ERRORS{WARNING} and $playSoundPrev...
if ( defined $tableSoundStatusCache { $catalogID_uniqueKey } ) {
if ( $tableSoundStatusCache { $catalogID_uniqueKey } ne $timeslot ) {
$playSoundStatus = ($playSoundStatus > $playSoundPreviousStatus) ? $playSoundStatus : $playSoundPreviousStatus;
applications/display.pl view on Meta::CPAN
my $break = '';
my $errorMessage;
# ***************************************************************************
# The 400 series of Web error codes indicate an error with your Web browser *
# ***************************************************************************
if ($statusMessage =~ /400 Bad Request/ ) {
$errorMessage = 'The request could not be understood by the server due to incorrect syntax';
} elsif ($statusMessage =~ /401 Unauthorized User/ ) {
$errorMessage = 'The client does not have access to this resource, authorization is needed';
} elsif ($statusMessage =~ /402 Payment Required/ ) {
$errorMessage = 'Payment is required. Reserved for future use';
} elsif ($statusMessage =~ /403 Forbidden Connection/ ) {
$errorMessage = 'The server understood the request, but is refusing to fulfill it. Access to a resource is not allowed. The most frequent case of this occurs when directory listing access is not allowed';
} elsif ($statusMessage =~ /404 Page Not Found/ ) {
$errorMessage = 'The resource request was not found. This is the code returned for missing pages or graphics. Viruses will often attempt to access resources that do not exist, so the error does not necessarily represent a problem';
} elsif ($statusMessage =~ /405 Method Not Allowed/ ) {
$errorMessage = 'The access method (GET, POST, HEAD) is not allowed on this resource';
} elsif ($statusMessage =~ /406 Not Acceptable/ ) {
$errorMessage = 'None of the acceptable file types (as requested by client) are available for this resource';
} elsif ($statusMessage =~ /407 Proxy Authentication Required/ ) {
$errorMessage = 'The client does not have access to this resource, proxy authorization is needed';
} elsif ($statusMessage =~ /408 Request Timeout/ ) {
$errorMessage = 'The client did not send a request within the required time period';
} elsif ($statusMessage =~ /409 Conflict/ ) {
$errorMessage = 'The request could not be completed due to a conflict with the current state of the resource';
} elsif ($statusMessage =~ /410 Gone/ ) {
$errorMessage = 'The requested resource is no longer available at the server and no forwarding address is known. This condition is similar to 404, except that the 410 error condition is expected to be permanent. Any robot seeing this response sho...
} elsif ($statusMessage =~ /411 Length Required/ ) {
$errorMessage = 'The request requires the Content-Length HTTP request field to be specified';
} elsif ($statusMessage =~ /412 Precondition Failed/ ) {
$errorMessage = 'The precondition given in one or more of the request-header fields evaluated to false when it was tested on the server';
} elsif ($statusMessage =~ /413 Request Entity Too Large/ ) {
$errorMessage = 'The server is refusing to process a request because the request entity is larger than the server is willing or able to process';
} elsif ($statusMessage =~ /414 Request URL Too Large/ ) {
$errorMessage = 'The server is refusing to service the request because the Request-URI is longer than the server is willing to interpret The URL is too long (possibly too many query keyword/value pairs)';
} elsif ($statusMessage =~ /415 Unsupported Media Type/ ) {
$errorMessage = 'The server is refusing to service the request because the entity of the request is in a format not supported by the requested resource for the requested method';
} elsif ($statusMessage =~ /416 Requested Range Invalid/ ) {
$errorMessage = 'The portion of the resource requested is not available or out of range';
} elsif ($statusMessage =~ /417 Expectation Failed/ ) {
$errorMessage = 'The Expect specifier in the HTTP request header can not be met';
# ***************************************************************************
# The 500 series of Web error codes indicate an error with the Web server *
# ***************************************************************************
} elsif ($statusMessage =~ /500 Can't connect to proxy/ ) {
$errorMessage = 'The server had some sort of internal error trying to fulfil the request. The client may see a partial page or error message';
} elsif ($statusMessage =~ /500 Connect failed/ ) {
$errorMessage = 'The server had some sort of internal error trying to fulfil the request. The client may see a partial page or error message';
} elsif ($statusMessage =~ /500 Internal Server Error/ ) {
$errorMessage = 'The server had some sort of internal error trying to fulfil the request. The client may see a partial page or error message (client certificate maybe needed)';
} elsif ($statusMessage =~ /500 Proxy connect failed/ ) {
$errorMessage = 'The server had some sort of internal error trying to fulfil the request. The client may see a partial page or error message';
} elsif ($statusMessage =~ /500 Server Error/ ) {
$errorMessage = 'The server had some sort of internal error trying to fulfil the request. The client may see a partial page or error message';
} elsif ($statusMessage =~ /500 SSL read timeout/ ) {
$errorMessage = 'The server had some sort of internal error trying to fulfil the request. The client may see a partial page or error message';
} elsif ($statusMessage =~ /501 Not Implemented/ ) {
$errorMessage = 'Function not implemented in Web server software. The request needs functionality not available on the server';
} elsif ($statusMessage =~ /502 Bad Gateway/ ) {
$errorMessage = 'Bad Gateway: a server being used by this Web server has sent an invalid response. The response by an intermediary server was invalid. This may happen if there is a problem with the DNS routing tables';
} elsif ($statusMessage =~ /503 Service Unavailable/ ) {
$errorMessage = 'Service temporarily unavailable because of currently/temporary overload or maintenance';
} elsif ($statusMessage =~ /504 Gateway Timeout/ ) {
$errorMessage = 'The server did not respond back to the gateway within acceptable time period';
} elsif ($statusMessage =~ /505 HTTP Version Not Supported/ ) {
$errorMessage = 'The server does not support the HTTP protocol version that was used in the request message';
# ***************************************************************************
# Error codes indicate an error with the ... *
# ***************************************************************************
} elsif ($statusMessage =~ /Failure of server APACHE bridge/ ) {
$errorMessage = 'Weblogic Bridge Message: Failure of server APACHE bridge';
if ($statusMessage =~ /No backend server available for connection/ ) {
$errorMessage .= ' - No backend server available for connection';
applications/display.pl view on Meta::CPAN
print "Usage: $PROGNAME -H <MySQL hostname> [-C <Checklist>] [-P <pagedir>] [-L <loop>] [-t <trigger>] [-c <YYYY-MM-DD HH:MM:SS> ] [-T <displayTime>] [-l <lockMySQL>] [-D <debug>] [-V version] [-h help]\n";
}
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
sub print_help () {
print_revision($PROGNAME, $version);
print "ASNMTAP Display for the '$APPLICATION'
-H, --hostname=<HOSTNAME>
HOSTNAME : hostname/address from the MySQL server
-C, --checklist=<FILENAME>
FILENAME : filename from the checklist for the html output loop (default 'DisplayCT')
-P, --pagedir=<PAGEDIR>
PAGEDIR : sub directory name for the html output (default 'index')
-L, --loop=F|T
F(alse) : loop off (default)
T(rue) : loop on
-t, --trigger=F|T
F(alse) : trigger off (default)
T(rue) : trigger on
applications/htmlroot/AnchorPosition.js view on Meta::CPAN
// ===================================================================
// Author: Matt Kruse <matt@mattkruse.com>
// WWW: http://www.mattkruse.com/
//
// NOTICE: You may use this code for any purpose, commercial or
// private, without any further permission from the author. You may
// remove this notice from your final code if you wish, however it is
// appreciated by the author if at least my web site address is kept.
//
// You may *NOT* re-distribute this code in any way except through its
// use. That means, you can include it in your product, or your web
// site, or any other form where the code is actually being used. You
// may not put the plain javascript up on your site for download or
// include it in your javascript libraries for download.
// If you wish to share this code with others, please just point them
// to the URL instead.
// Please DO NOT link directly to my .js files from your site. Copy
// the files to your server and use them there. Thank you.
applications/htmlroot/CalendarPopup.js view on Meta::CPAN
// ===================================================================
// Author: Matt Kruse <matt@mattkruse.com>
// WWW: http://www.mattkruse.com/
//
// NOTICE: You may use this code for any purpose, commercial or
// private, without any further permission from the author. You may
// remove this notice from your final code if you wish, however it is
// appreciated by the author if at least my web site address is kept.
//
// You may *NOT* re-distribute this code in any way except through its
// use. That means, you can include it in your product, or your web
// site, or any other form where the code is actually being used. You
// may not put the plain javascript up on your site for download or
// include it in your javascript libraries for download.
// If you wish to share this code with others, please just point them
// to the URL instead.
// Please DO NOT link directly to my .js files from your site. Copy
// the files to your server and use them there. Thank you.
// ===================================================================
function CalendarPopup(){var c;if(arguments.length>0){c = new PopupWindow(arguments[0]);}else{c = new PopupWindow();c.setSize(150,175);}c.offsetX = -152;c.offsetY = 25;c.autoHide();c.monthNames = new Array("January","February","March","April","May","...
function CP_copyMonthNamesToWindow(){if(typeof(window.MONTH_NAMES)!="undefined" && window.MONTH_NAMES!=null){window.MONTH_NAMES = new Array();for(var i=0;i<this.monthNames.length;i++){window.MONTH_NAMES[window.MONTH_NAMES.length] = this.monthNames[i]...
function CP_tmpReturnFunction(y,m,d){if(window.CP_targetInput!=null){var dt = new Date(y,m-1,d,0,0,0);if(window.CP_calendarObject!=null){window.CP_calendarObject.copyMonthNamesToWindow();}window.CP_targetInput.value = formatDate(dt,window.CP_dateForm...
function CP_tmpReturnMonthFunction(y,m){alert('Use setReturnMonthFunction() to define which function will get the clicked results!\nYou clicked: year='+y+' , month='+m);}
function CP_tmpReturnQuarterFunction(y,q){alert('Use setReturnQuarterFunction() to define which function will get the clicked results!\nYou clicked: year='+y+' , quarter='+q);}
function CP_tmpReturnYearFunction(y){alert('Use setReturnYearFunction() to define which function will get the clicked results!\nYou clicked: year='+y);}
function CP_setReturnFunction(name){this.returnFunction = name;}
function CP_setReturnMonthFunction(name){this.returnMonthFunction = name;}
function CP_setReturnQuarterFunction(name){this.returnQuarterFunction = name;}
function CP_setReturnYearFunction(name){this.returnYearFunction = name;}
function CP_setMonthNames(){for(var i=0;i<arguments.length;i++){this.monthNames[i] = arguments[i];}this.copyMonthNamesToWindow();}
function CP_setMonthAbbreviations(){for(var i=0;i<arguments.length;i++){this.monthAbbreviations[i] = arguments[i];}this.copyMonthNamesToWindow();}
function CP_setDayHeaders(){for(var i=0;i<arguments.length;i++){this.dayHeaders[i] = arguments[i];}}
function CP_setWeekStartDay(day){this.weekStartDay = day;}
function CP_showYearNavigation(){this.isShowYearNavigation =(arguments.length>0)?arguments[0]:true;}
function CP_setDisplayType(type){if(type!="date"&&type!="week-end"&&type!="month"&&type!="quarter"&&type!="year"){alert("Invalid display type! Must be one of: date,week-end,month,quarter,year");return false;}this.displayType=type;}
function CP_setYearSelectStartOffset(num){this.yearSelectStartOffset=num;}
function CP_setDisabledWeekDays(){this.disabledWeekDays = new Object();for(var i=0;i<arguments.length;i++){this.disabledWeekDays[arguments[i]] = true;}}
function CP_addDisabledDates(start, end){if(arguments.length==1){end=start;}if(start==null && end==null){return;}if(this.disabledDatesExpression!=""){this.disabledDatesExpression+= "||";}if(start!=null){start = parseDate(start);start=""+start.getFull...
function CP_setTodayText(text){this.todayText = text;}
function CP_setCssPrefix(val){this.cssPrefix = val;}
function CP_showNavigationDropdowns(){this.isShowNavigationDropdowns =(arguments.length>0)?arguments[0]:true;}
function CP_showYearNavigationInput(){this.isShowYearNavigationInput =(arguments.length>0)?arguments[0]:true;}
function CP_hideCalendar(){if(arguments.length > 0){window.popupWindowObjects[arguments[0]].hidePopup();}else{this.hidePopup();}}
function CP_refreshCalendar(index){var calObject = window.popupWindowObjects[index];if(arguments.length>1){calObject.populate(calObject.getCalendar(arguments[1],arguments[2],arguments[3],arguments[4],arguments[5]));}else{calObject.populate(calObject....
function CP_showCalendar(anchorname){if(arguments.length>1){if(arguments[1]==null||arguments[1]==""){this.currentDate=new Date();}else{this.currentDate=new Date(parseDate(arguments[1]));}}this.populate(this.getCalendar());this.showPopup(anchorname);}
function CP_select(inputobj, linkname, format){var selectedDate=(arguments.length>3)?arguments[3]:null;if(!window.getDateFromFormat){alert("calendar.select: To use this method you must also include 'date.js' for date formatting");return;}if(this.disp...
function getCalendarStyles(){var result = "";var p = "";if(this!=null && typeof(this.cssPrefix)!="undefined" && this.cssPrefix!=null && this.cssPrefix!=""){p=this.cssPrefix;}result += "<STYLE>\n";result += "."+p+"cpYearNavigation,."+p+"cpMonthNavigat...
function CP_getCalendar(){var now = new Date();if(this.type == "WINDOW"){var windowref = "window.opener.";}else{var windowref = "";}var result = "";if(this.type == "WINDOW"){result += "<HTML><HEAD><TITLE>Calendar</TITLE>"+this.getStyles()+"</HEAD><BO...
applications/htmlroot/JSFX_Fireworks.js view on Meta::CPAN
if(Math.random() > 0.95)
{
var x=Math.floor(Math.random()*(JSFX.Browser.getMaxX()-100) );
var y=Math.floor(Math.random()*(JSFX.Browser.getMaxY()-100) );
this.moveTo(x,y);
this.show();
this.state="ON";
}
}
}
/*** If no other script has added it yet, add the ns resize fix ***/
if(navigator.appName.indexOf("Netscape") != -1 && !document.getElementById)
{
if(!JSFX.ns_resize)
{
JSFX.ow = outerWidth;
JSFX.oh = outerHeight;
JSFX.ns_resize = function()
{
if(outerWidth != JSFX.ow || outerHeight != JSFX.oh )
location.reload();
}
}
window.onresize=JSFX.ns_resize;
}
applications/htmlroot/JSFX_Fireworks2.js view on Meta::CPAN
//Call the superclass constructor
this.superC = JSFX.Layer;
this.superC(htmlStr);
this.frame = 0;
this.state = "OFF";
this.fwImages = theImages;
this.imgName = imgName;
this.ay = 0.2;
this.resizeTo(2,2);
}
JSFX.Firework.prototype = new JSFX.Layer;
JSFX.Firework.prototype.getMaxDy = function()
{
var ydiff = JSFX.Browser.getMaxY() - JSFX.Browser.getMinY() - 30;
var dy = 1;
var dist = 0;
var ay = this.ay;
while(dist<ydiff)
applications/htmlroot/JSFX_Fireworks2.js view on Meta::CPAN
this.state = "ON";
this.setBgColor(null);
this.clip(0,0,100,100);
this.x -=50;
this.y -=50;
this.moveTo(this.x, this.y);
}
}
}
/*** If no other script has added it yet, add the ns resize fix ***/
if(navigator.appName.indexOf("Netscape") != -1 && !document.getElementById)
{
if(!JSFX.ns_resize)
{
JSFX.ow = outerWidth;
JSFX.oh = outerHeight;
JSFX.ns_resize = function()
{
if(outerWidth != JSFX.ow || outerHeight != JSFX.oh )
location.reload();
}
}
window.onresize=JSFX.ns_resize;
}
applications/htmlroot/JSFX_Layer.js view on Meta::CPAN
if(ns4)
JSFX.Layer.prototype.clip = function(x1,y1, x2,y2)
{
this.style.clip.top =y1;
this.style.clip.left =x1;
this.style.clip.bottom =y2;
this.style.clip.right =x2;
}
/**********************************************************************************/
/*** Resize ***/
JSFX.Layer.prototype.resizeTo = function(w,h)
{
this.style.width =w + "px";
this.style.height =h + "px";
}
if(ns4)
JSFX.Layer.prototype.resizeTo = function(w,h)
{
this.style.clip.width =w;
this.style.clip.height =h;
}
/**********************************************************************************/
/*** getX/Y ***/
JSFX.Layer.prototype.getX = function() { return parseInt(this.style.left); }
JSFX.Layer.prototype.getY = function() { return parseInt(this.style.top); }
if(ns4)
{
applications/htmlroot/JSFX_Layer.js view on Meta::CPAN
/**************************************************************************/
/*** Event Handling - Start ***/
/*** NS4 ***/
if(ns4)
{
JSFX.eventmasks = {
onabort:Event.ABORT, onblur:Event.BLUR, onchange:Event.CHANGE,
onclick:Event.CLICK, ondblclick:Event.DBLCLICK,
ondragdrop:Event.DRAGDROP, onerror:Event.ERROR,
onfocus:Event.FOCUS, onkeydown:Event.KEYDOWN,
onkeypress:Event.KEYPRESS, onkeyup:Event.KEYUP, onload:Event.LOAD,
onmousedown:Event.MOUSEDOWN, onmousemove:Event.MOUSEMOVE,
onmouseout:Event.MOUSEOUT, onmouseover:Event.MOUSEOVER,
onmouseup:Event.MOUSEUP, onmove:Event.MOVE, onreset:Event.RESET,
onresize:Event.RESIZE, onselect:Event.SELECT, onsubmit:Event.SUBMIT,
onunload:Event.UNLOAD
};
JSFX.Layer.prototype.addEventHandler = function(eventname, handler)
{
this.elem.captureEvents(JSFX.eventmasks[eventname]);
var xl = this;
this.elem[eventname] = function(event) {
event.clientX = event.pageX;
event.clientY = event.pageY;
event.button = event.which;
applications/htmlroot/PopupWindow.js view on Meta::CPAN
// ===================================================================
// Author: Matt Kruse <matt@mattkruse.com>
// WWW: http://www.mattkruse.com/
//
// NOTICE: You may use this code for any purpose, commercial or
// private, without any further permission from the author. You may
// remove this notice from your final code if you wish, however it is
// appreciated by the author if at least my web site address is kept.
//
// You may *NOT* re-distribute this code in any way except through its
// use. That means, you can include it in your product, or your web
// site, or any other form where the code is actually being used. You
// may not put the plain javascript up on your site for download or
// include it in your javascript libraries for download.
// If you wish to share this code with others, please just point them
// to the URL instead.
// Please DO NOT link directly to my .js files from your site. Copy
// the files to your server and use them there. Thank you.
// ===================================================================
function PopupWindow_getXYPosition(anchorname){var coordinates;if(this.type == "WINDOW"){coordinates = getAnchorWindowPosition(anchorname);}else{coordinates = getAnchorPosition(anchorname);}this.x = coordinates.x;this.y = coordinates.y;}
function PopupWindow_setSize(width,height){this.width = width;this.height = height;}
function PopupWindow_populate(contents){this.contents = contents;this.populated = false;}
function PopupWindow_setUrl(url){this.url = url;}
function PopupWindow_setWindowProperties(props){this.windowProperties = props;}
function PopupWindow_refresh(){if(this.divName != null){if(this.use_gebi){document.getElementById(this.divName).innerHTML = this.contents;}else if(this.use_css){document.all[this.divName].innerHTML = this.contents;}else if(this.use_layers){var d = do...
function PopupWindow_showPopup(anchorname){this.getXYPosition(anchorname);this.x += this.offsetX;this.y += this.offsetY;if(!this.populated &&(this.contents != "")){this.populated = true;this.refresh();}if(this.divName != null){if(this.use_gebi){docum...
function PopupWindow_hidePopup(){if(this.divName != null){if(this.use_gebi){document.getElementById(this.divName).style.visibility = "hidden";}else if(this.use_css){document.all[this.divName].style.visibility = "hidden";}else if(this.use_layers){docu...
function PopupWindow_isClicked(e){if(this.divName != null){if(this.use_layers){var clickX = e.pageX;var clickY = e.pageY;var t = document.layers[this.divName];if((clickX > t.left) &&(clickX < t.left+t.clip.width) &&(clickY > t.top) &&(clickY < t.top+...
function PopupWindow_hideIfNotClicked(e){if(this.autoHideEnabled && !this.isClicked(e)){this.hidePopup();}}
function PopupWindow_autoHide(){this.autoHideEnabled = true;}
function PopupWindow_hidePopupWindows(e){for(var i=0;i<popupWindowObjects.length;i++){if(popupWindowObjects[i] != null){var p = popupWindowObjects[i];p.hideIfNotClicked(e);}}}
function PopupWindow_attachListener(){if(document.layers){document.captureEvents(Event.MOUSEUP);}window.popupWindowOldEventListener = document.onmouseup;if(window.popupWindowOldEventListener != null){document.onmouseup = new Function("window.popupWin...
function PopupWindow(){if(!window.popupWindowIndex){window.popupWindowIndex = 0;}if(!window.popupWindowObjects){window.popupWindowObjects = new Array();}if(!window.listenerAttached){window.listenerAttached = true;PopupWindow_attachListener();}this.in...
applications/htmlroot/cgi-bin/admin/countries.pl view on Meta::CPAN
<tr><td><b>Country ID: </b></td><td>
<input type="text" name="countryID" value="$CcountryID" size="2" maxlength="2" $formDisabledPrimaryKey>
</td></tr><tr><td><b>Country Name: </b></td><td>
<input type="text" name="countryName" value="$CcountryName" size="45" maxlength="45" $formDisabledAll>
</td></tr><tr><td><b>Activated: </b></td><td>
<input type="checkbox" name="activated" $activatedChecked $formDisabledAll>
</td></tr>
HTML
print " <tr><td> </td><td><br>Please enter all required information before committing the required information. Required fields are marked in bold.</td></tr>\n" if ($action eq 'duplicateView' or $action eq 'editView' or $action eq '...
print " <tr align=\"left\"><td align=\"right\"><br><input type=\"submit\" value=\"$submitButton\"></td><td><br><input type=\"reset\" value=\"Reset\"></td></tr>\n" if ($action ne 'displayView');
print " </table>\n";
} elsif ($action eq 'delete' or $action eq 'edit' or $action eq 'insert') {
print " <tr><td align=\"center\"><br><br><h1>Country: $htmlTitle</h1></td></tr>";
print " <tr><td align=\"center\">$matchingCountries</td></tr>" if (defined $matchingCountries and $matchingCountries ne '');
} else {
print " <tr><td align=\"center\"><br>$matchingCountries</td></tr>";
}
print " </table>\n";
applications/htmlroot/cgi-bin/admin/crontabs.pl view on Meta::CPAN
$navigationBar .= record_navigation_bar_alpha ($rv, $dbh, $SERVERTABLCRONTABS, 'uKey', "catalogID = '$CcatalogID'", $numberRecordsIntoQuery, $RECORDSONPAGE, $ENV{SCRIPT_NAME} . "?pagedir=$pagedir&pageset=$pageset&debug=$debug&CGISES...
my ($catalogID, $lineNumber, $uKey, $groupName, $minute, $hour, $dayOfTheMonth, $monthOfTheYear, $dayOfTheWeek, $noOffline, $activated, $title);
$sql = "select $SERVERTABLCRONTABS.catalogID, $SERVERTABLCRONTABS.lineNumber, $SERVERTABLCRONTABS.uKey, $SERVERTABLCLLCTRDMNS.groupName, $SERVERTABLCRONTABS.minute, $SERVERTABLCRONTABS.hour, $SERVERTABLCRONTABS.dayOfTheMonth, $SERVERTABLCRONTAB...
$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;
$sth->bind_columns( \$catalogID, \$lineNumber, \$uKey, \$groupName, \$minute, \$hour, \$dayOfTheMonth, \$monthOfTheYear, \$dayOfTheWeek, \$noOffline, \$activated, \$title ) or $rv = error_trap_DBI(*STDOUT, "Cannot sth->bind_columns: $sql", $deb...
if ( $rv ) {
my $actionPressend = ($iconAdd or $iconDelete or $iconDetails or $iconEdit) ? 1 : 0;
my $actionHeader = ($actionPressend) ? "<th>Action</th>" : '';
$urlWithAccessParameters = $ENV{SCRIPT_NAME} . "?pagedir=$pagedir&pageset=$pageset&debug=$debug&CGISESSID=$sessionID&pageNo=1&pageOffset=0&action=$nextAction$urlWithAccessParametersQuery";
$matchingCrontabs = "\n <table align=\"center\" border=0 cellpadding=1 cellspacing=1 bgcolor='$COLORSTABLE{TABLE}'>\n <tr><th><a href=\"$urlWithAccessParameters&action=listView&orderBy=catalogID desc, lineNumber asc, uKey ...
$matchingCrontabs .= "<th><a href=\"$urlWithAccessParameters&action=listView&orderBy=title desc, groupName asc\"><IMG SRC=\"$IMAGESURL/$ICONSRECORD{up}\" ALT=\"Up\" BORDER=0></a> Title <a href=\"$urlWithAccessParameters&action=lis...
$urlWithAccessParameters = $ENV{SCRIPT_NAME} . "?pagedir=$pagedir&pageset=$pageset&debug=$debug&CGISESSID=$sessionID&pageNo=$pageNo&pageOffset=$pageOffset";
if ( $sth->rows ) {
while( $sth->fetch() ) {
my $actionSkip = ( ( $catalogID eq $CATALOGID ) ? 0 : 1 );
my $actionItem = ($actionPressend) ? "<td align=\"left\"> " : '';
my $urlWithAccessParametersAction = "$urlWithAccessParameters&catalogID=$CcatalogID&lineNumber=$lineNumber&uKey=$uKey&orderBy=$orderBy&action";
$actionItem .= "<a href=\"$urlWithAccessParametersAction=displayView\"><img src=\"$IMAGESURL/$ICONSRECORD{details}\" title=\"Display Crontabs\" alt=\"Display Crontabs\" border=\"0\"></a> " if ($iconDetails);
$actionItem .= "<a href=\"$urlWithAccessParametersAction=duplicateView\"><img src=\"$IMAGESURL/$ICONSRECORD{duplicate}\" title=\"Duplicate Crontabs\" alt=\"Duplicate Crontabs\" border=\"0\"></a> " if ($iconAdd);
unless ( $actionSkip ) {
$actionItem .= "<a href=\"$urlWithAccessParametersAction=editView\"><img src=\"$IMAGESURL/$ICONSRECORD{edit}\" title=\"Edit Crontabs\" alt=\"Edit Crontabs\" border=\"0\"></a> " if ($iconEdit);
$actionItem .= "<a href=\"$urlWithAccessParametersAction=deleteView\"><img src=\"$IMAGESURL/$ICONSRECORD{delete}\" title=\"Delete Crontabs\" alt=\"Delete Crontabs\" border=\"0\"></a> " if ($iconDelete);
}
$actionItem .= "</td>" if ($actionPressend);
$matchingCrontabs .= " <tr bgcolor=\"$COLORSTABLE{STARTBLOCK}\"><td>$catalogID-$lineNumber-$uKey</td><td>$groupName</td><td>$title</td><td>$minute $hour $dayOfTheMonth $monthOfTheYear $dayOfTheWeek</td><td>$noOffline</td><td>$activ...
}
$urlWithAccessParameters = $ENV{SCRIPT_NAME} . "?pagedir=$pagedir&pageset=$pageset&debug=$debug&CGISESSID=$sessionID&pageNo=1&pageOffset=0&catalogID=$CcatalogID";
} else {
$matchingCrontabs .= " <tr><td colspan=\"7\">No records found for any crontab</td></tr>\n";
}
$matchingCrontabs .= " <tr><td colspan=\"7\">$navigationBar</td></tr>\n" if ($navigationBar);
$matchingCrontabs .= " </table>\n";
applications/htmlroot/cgi-bin/admin/crontabs.pl view on Meta::CPAN
my $crontabFormatDigits = '(?:[0-9]{1,2})';
my $crontabValueDigitsMin = '(?:[0-9]|[1-5][0-9])';
my $crontabValueDigitsHour = '(?:[0-9]|1[0-9]|2[0-3])';
my $crontabValueDigitsDayOfMonth = '(?:[1-9]|[1-2][0-9]|3[0-1])';
my $crontabValueDigitsMonthOfYear = '(?:[1-9]|1[0-2])';
my $crontabValueDigitsDayOfWeek = '(?:[0-6])';
print <<HTML;
<script language="JavaScript1.2" type="text/javascript">
function validateForm() {
var objectRegularExpressionLineNumberFormat = /\^\\d\\d\$/;
// example: 1,2,5-9,12-16/n,19|*|*/n
var objectRegularExpressionCrontabFormat = /\^(?:(?:\\*\\/$crontabFormatDigits){1,1}|$crontabFormatDigits(?:[,-]$crontabFormatDigits(?:\\/$crontabFormatDigits)?)\*){1,1}\$/;
// min (0-59)
var objectRegularExpressionMinuteValue = /\^(?:(?:\\*\\/$crontabValueDigitsMin){1,1}|$crontabValueDigitsMin(?:[,-]$crontabValueDigitsMin(?:\\/$crontabValueDigitsMin)?)\*){1,1}\$/;
// hour (0-23)
var objectRegularExpressionHourValue = /\^(?:(?:\\*\\/$crontabValueDigitsHour){1,1}|$crontabValueDigitsHour(?:[,-]$crontabValueDigitsHour(?:\\/$crontabValueDigitsHour)?)\*){1,1}\$/;
// day of month (1-31)
var objectRegularExpressionDayOfTheMontValue = /\^(?:(?:\\*\\/$crontabFormatDigits){1,1}|$crontabFormatDigits(?:[,-]$crontabFormatDigits(?:\\/$crontabFormatDigits)?)\*){1,1}\$/;
// month of year (1-12)
var objectRegularExpressionMontOfTheYearValue = /\^(?:(?:\\*\\/$crontabValueDigitsMonthOfYear){1,1}|$crontabValueDigitsMonthOfYear(?:[,-]$crontabValueDigitsMonthOfYear(?:\\/$crontabValueDigitsMonthOfYear)?)\*){1,1}\$/;
// day of week (0-6)
var objectRegularExpressionDayOfTheWeekValue = /\^(?:(?:\\*\\/$crontabValueDigitsDayOfWeek){1,1}|$crontabValueDigitsDayOfWeek(?:[,-]$crontabValueDigitsDayOfWeek(?:\\/$crontabValueDigitsDayOfWeek)?)\*){1,1}\$/;
HTML
if ( $action ne 'crontabView' ) {
print <<HTML;
if ( document.crontabs.collectorDaemon.options[document.crontabs.collectorDaemon.selectedIndex].value == 'none' ) {
document.crontabs.collectorDaemon.focus();
alert('Please create/select a crontab collectorDaemon!');
return false;
}
applications/htmlroot/cgi-bin/admin/crontabs.pl view on Meta::CPAN
}
if ($action eq 'duplicateView' or $action eq 'insertView') {
print <<HTML;
if ( document.crontabs.lineNumber.value == null || document.crontabs.lineNumber.value == '' ) {
document.crontabs.lineNumber.focus();
alert('Please enter a line number!');
return false;
} else {
if ( ! objectRegularExpressionLineNumberFormat.test(document.crontabs.lineNumber.value) ) {
document.crontabs.lineNumber.focus();
alert('Please re-enter line number: Bad line number format!');
return false;
}
}
if( document.crontabs.uKey.options[document.crontabs.uKey.selectedIndex].value == 'none' ) {
document.crontabs.uKey.focus();
alert('Please create/select one of the applications!');
return false;
applications/htmlroot/cgi-bin/admin/crontabs.pl view on Meta::CPAN
if ( $action ne 'crontabView' ) {
print <<HTML;
if ( document.crontabs.minute.value == null || document.crontabs.minute.value == '' ) {
document.crontabs.minute.focus();
alert('Please enter minute!');
return false;
} else {
if ( document.crontabs.minute.value != '*' ) {
if ( ! objectRegularExpressionCrontabFormat.test(document.crontabs.minute.value) ) {
document.crontabs.minute.focus();
alert('Please re-enter minute: Bad minute format!');
return false;
}
if ( ! objectRegularExpressionMinuteValue.test(document.crontabs.minute.value) ) {
document.crontabs.minute.focus();
alert('Please re-enter minute: Bad minute value!');
return false;
}
}
}
if ( document.crontabs.hour.value == null || document.crontabs.hour.value == '' ) {
document.crontabs.hour.focus();
alert('Please enter hour!');
return false;
} else {
if ( document.crontabs.hour.value != '*' ) {
if ( ! objectRegularExpressionCrontabFormat.test(document.crontabs.hour.value) ) {
document.crontabs.hour.focus();
alert('Please re-enter hour: Bad hour format!');
return false;
}
if ( ! objectRegularExpressionHourValue.test(document.crontabs.hour.value) ) {
document.crontabs.hour.focus();
alert('Please re-enter hour: Bad hour value!');
return false;
}
}
}
if ( document.crontabs.dayOfTheMonth.value == null || document.crontabs.dayOfTheMonth.value == '' ) {
document.crontabs.dayOfTheMonth.focus();
alert('Please enter day of the month!');
return false;
} else {
if ( document.crontabs.dayOfTheMonth.value != '*' ) {
if ( ! objectRegularExpressionCrontabFormat.test(document.crontabs.dayOfTheMonth.value) ) {
document.crontabs.dayOfTheMonth.focus();
alert('Please re-enter day of the month: Bad day of the month format!');
return false;
}
if ( ! objectRegularExpressionDayOfTheMontValue.test(document.crontabs.dayOfTheMonth.value) ) {
document.crontabs.dayOfTheMonth.focus();
alert('Please re-enter day of the month: Bad day of the month value!');
return false;
}
}
}
if ( document.crontabs.monthOfTheYear.value == null || document.crontabs.monthOfTheYear.value == '' ) {
document.crontabs.monthOfTheYear.focus();
alert('Please enter month of the year!');
return false;
} else {
if ( document.crontabs.monthOfTheYear.value != '*' ) {
if ( ! objectRegularExpressionCrontabFormat.test(document.crontabs.monthOfTheYear.value) ) {
document.crontabs.monthOfTheYear.focus();
alert('Please re-enter month of the year: Bad month of the year format!');
return false;
}
if ( ! objectRegularExpressionMontOfTheYearValue.test(document.crontabs.monthOfTheYear.value) ) {
document.crontabs.monthOfTheYear.focus();
alert('Please re-enter month of the year: Bad month of the year value!');
return false;
}
}
}
if ( document.crontabs.dayOfTheWeek.value == null || document.crontabs.dayOfTheWeek.value == '' ) {
document.crontabs.dayOfTheWeek.focus();
alert('Please enter day of the week!');
return false;
} else {
if ( document.crontabs.dayOfTheWeek.value != '*' ) {
if ( ! objectRegularExpressionCrontabFormat.test(document.crontabs.dayOfTheWeek.value) ) {
document.crontabs.dayOfTheWeek.focus();
alert('Please re-enter day of the week: Bad day of the week format!');
return false;
}
if ( ! objectRegularExpressionDayOfTheWeekValue.test(document.crontabs.dayOfTheWeek.value) ) {
document.crontabs.dayOfTheWeek.focus();
alert('Please re-enter day of the week: Bad day of the week value!');
return false;
}
}
}
HTML
}
print <<HTML;
applications/htmlroot/cgi-bin/admin/crontabs.pl view on Meta::CPAN
HTML
}
print <<HTML;
<tr><td><b>Activated: </b></td><td>
<input type="checkbox" name="activated" $activatedChecked $formDisabledAll>
</td></tr>
HTML
print " <tr><td> </td><td><br>Please enter all required information before committing the required information. Required fields are marked in bold.</td></tr>\n" if ($action eq 'duplicateView' or $action eq 'editView' or $action eq '...
print " <tr align=\"left\"><td align=\"right\"><br><input type=\"submit\" value=\"$submitButton\"></td><td><br><input type=\"reset\" value=\"Reset\"></td></tr>\n" if ($action ne 'displayView');
print " </table>\n";
} elsif ($action eq 'delete' or $action eq 'edit' or $action eq 'insert') {
print " <tr><td align=\"center\"><br><br><h1>Unique Key: $htmlTitle</h1></td></tr>";
print " <tr><td align=\"center\">$matchingCrontabs</td></tr>" if (defined $matchingCrontabs and $matchingCrontabs ne '');
} else {
print " <tr><td><br><table align=\"center\" border=0 cellpadding=1 cellspacing=1 bgcolor='#333344'><tr><td align=\"left\"><b>Catalog ID: </b></td><td>$catalogIDSelect</td></tr></table></td></tr>" if ($action ne 'crontab');
print " <tr><td align=\"center\"><br>$matchingCrontabs</td></tr>";
}
print " </table>\n";
applications/htmlroot/cgi-bin/admin/generateConfig.pl view on Meta::CPAN
} elsif ($action eq 'updateView') {
$htmlTitle = "Update Configuration";
} elsif ($action eq 'update') {
$htmlTitle = "Configuration Updated";
} else {
$action = "menuView";
$htmlTitle = "Configuration Menu";
}
# HTML - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
my $onload = ( ( $action =~ /^(check|generate|compare|install)View$/ ) ? "ONLOAD=\"if (document.images) document.Progress.src='".$IMAGESURL."/spacer.gif';\"" : '' );
print_header (*STDOUT, $pagedir, $pageset, $htmlTitle, $subTitle, 3600, $onload, 'F', '', $sessionID);
print " <br>\n";
print "<IMG SRC=\"".$IMAGESURL."/gears.gif\" HSPACE=\"0\" VSPACE=\"0\" BORDER=\"0\" NAME=\"Progress\" title=\"Please Wait ...\" alt=\"Please Wait ...\">" if ( $onload );
$rv = 1;
if ($action eq 'checkView' or $action eq 'generateView') {
# open connection to database and query data
$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 and $rv) {
my ($serverID, $displayDaemon, $collectorDaemon, $resultsdir, $groupTitle, $pagedirs, $catalogID, $uKey, $test, $interval, $title, $helpPluginFilename, $environment, $trendline, $minute, $hour, $dayOfTheMonth, $monthOfTheYear, $dayOfTheWeek, $a...
my ($prevServerID, $prevTypeMonitoring, $prevTypeServers, $prevTypeActiveServer, $prevMasterFQDN, $prevMasterASNMTAP_PATH, $prevMasterRSYNC_PATH, $prevMasterSSH_PATH, $prevSlaveFQDN, $prevSlaveASNMTAP_PATH, $prevSlaveRSYNC_PATH, $prevSlaveSSH_P...
my ($centralServerID, $centralTypeMonitoring, $centralTypeServers, $centralTypeActiveServer, $centralMasterFQDN, $centralMasterASNMTAP_PATH, $centralMasterRSYNC_PATH, $centralMasterSSH_PATH, $centralMasterDatabaseFQDN, $centralSlaveFQDN, $centr...
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
my ($warning, $error, $count, $sqlTmp, $sthTmp, $actionItem);
$matchingWarnings .= "<table width=\"100%\" border=\"0\" cellpadding=\"1\" cellspacing=\"1\" bgcolor=\"$COLORSTABLE{TABLE}\"><tr><th colspan=\"3\">Warnings:</th></tr>";
$matchingErrors .= "<table width=\"100%\" border=\"0\" cellpadding=\"1\" cellspacing=\"1\" bgcolor=\"$COLORSTABLE{TABLE}\"><tr><th colspan=\"3\">Errors:</th></tr>";
applications/htmlroot/cgi-bin/admin/generateConfig.pl view on Meta::CPAN
if ($count == 0) {
$countErrors++;
$matchingErrors .= "<tr bgcolor=\"$COLORSTABLE{NOBLOCK}\"><td>$error</td><td>still used into $SERVERTABLVIEWS but don't exist anymore into $SERVERTABLPLUGINS</td><td> </td></tr>";
}
}
}
$sth->finish() or $rv = error_trap_DBI(*STDOUT, "Cannot sth->finish: $sql", $debug, $pagedir, $pageset, $htmlTitle, $subTitle, -1, '', $sessionID);
}
# resultsdir <-> plugins - - - - - - - - - - - - - - - - - - - - -
$matchingWarnings .= "<tr bgcolor=\"$COLORSTABLE{ENDBLOCK}\"><td align=\"center\" colspan=\"3\">Resultsdir <-> Plugins</td></tr><tr bgcolor=\"$COLORSTABLE{STARTBLOCK}\"><td>Resultsdir</td><td>Message</td><td align=\"center\">Action</td></tr>";
$sql = "SELECT $SERVERTABLRESULTSDIR.resultsdir, count($SERVERTABLPLUGINS.resultsdir) FROM $SERVERTABLRESULTSDIR LEFT JOIN $SERVERTABLPLUGINS ON $SERVERTABLRESULTSDIR.catalogID = $SERVERTABLPLUGINS.catalogID and $SERVERTABLRESULTSDIR.resultsdi...
$sth = $dbh->prepare( $sql ) or $rv = error_trap_DBI(*STDOUT, "Cannot dbh->prepare: $sql", $debug, $pagedir, $pageset, $htmlTitle, $subTitle, -1, '', $sessionID);
$sth->execute() or $rv = error_trap_DBI(*STDOUT, "Cannot sth->execute: $sql", $debug, $pagedir, $pageset, $htmlTitle, $subTitle, -1, '', $sessionID) if $rv;
$sth->bind_columns( \$warning, \$count) or $rv = error_trap_DBI(*STDOUT, "Cannot sth->bind_columns: $sql", $debug, $pagedir, $pageset, $htmlTitle, $subTitle, -1, '', $sessionID) if $rv;
if ($rv) {
if ( $sth->rows ) {
while( $sth->fetch() ) {
if ($count == 0) {
$countWarnings++;
$matchingWarnings .= "<tr bgcolor=\"$COLORSTABLE{NOBLOCK}\"><td>$warning</td><td>exists into $SERVERTABLRESULTSDIR but is not used into $SERVERTABLPLUGINS</td><td> </td></tr>";
}
}
}
$sth->finish() or $rv = error_trap_DBI(*STDOUT, "Cannot sth->finish: $sql", $debug, $pagedir, $pageset, $htmlTitle, $subTitle, -1, '', $sessionID);
}
$matchingErrors .= "<tr bgcolor=\"$COLORSTABLE{ENDBLOCK}\"><td align=\"center\" colspan=\"3\">Resultsdir <-> Plugins</td></tr><tr bgcolor=\"$COLORSTABLE{STARTBLOCK}\"><td>Resultsdir</td><td>Message</td><td align=\"center\">Action</td></tr>";
$sql = "SELECT $SERVERTABLPLUGINS.resultsdir, count($SERVERTABLRESULTSDIR.resultsdir) FROM $SERVERTABLPLUGINS LEFT JOIN $SERVERTABLRESULTSDIR ON $SERVERTABLPLUGINS.catalogID = $SERVERTABLRESULTSDIR.catalogID and $SERVERTABLPLUGINS.resultsdir = ...
$sth = $dbh->prepare( $sql ) or $rv = error_trap_DBI(*STDOUT, "Cannot dbh->prepare: $sql", $debug, $pagedir, $pageset, $htmlTitle, $subTitle, -1, '', $sessionID);
$sth->execute() or $rv = error_trap_DBI(*STDOUT, "Cannot sth->execute: $sql", $debug, $pagedir, $pageset, $htmlTitle, $subTitle, -1, '', $sessionID) if $rv;
$sth->bind_columns( \$error, \$count) or $rv = error_trap_DBI(*STDOUT, "Cannot sth->bind_columns: $sql", $debug, $pagedir, $pageset, $htmlTitle, $subTitle, -1, '', $sessionID) if $rv;
if ($rv) {
if ( $sth->rows ) {
while( $sth->fetch() ) {
if ($count == 0) {
$countErrors++;
$matchingErrors .= "<tr bgcolor=\"$COLORSTABLE{NOBLOCK}\"><td>$error</td><td>still used into $SERVERTABLPLUGINS but don't exist anymore into $SERVERTABLRESULTSDIR</td><td> </td></tr>";
applications/htmlroot/cgi-bin/admin/generateConfig.pl view on Meta::CPAN
$initializeGenerateView .= system_call ("mkdir", "$APPLICATIONPATH/tmp/$CONFIGDIR/generated/CS-$centralTypeActiveServer-$centralSlaveFQDN/master", $debug);
}
}
$initializeGenerateView .= "<tr bgcolor=\"$COLORSTABLE{ENDBLOCK}\"><td><a href=\"/$CONFIGDIR/generated/\" target=\"_blank\">Browse directory list with all config files</a></td></tr>\n </table>";
my $configDateTime = get_csvfiledate .' '. get_csvfiletime;
$rvOpen = 0;
# ArchiveCT - - - - - - - - - - - - - - - - - - - - - - - - - - -
$sql = "select distinct $SERVERTABLSERVERS.serverID, $SERVERTABLSERVERS.typeMonitoring, $SERVERTABLSERVERS.typeServers, $SERVERTABLSERVERS.typeActiveServer, $SERVERTABLSERVERS.masterFQDN, $SERVERTABLSERVERS.masterASNMTAP_PATH, $SERVERTABLSERV...
$sth = $dbh->prepare( $sql ) or $rv = error_trap_DBI(*STDOUT, "Cannot dbh->prepare: $sql", $debug, $pagedir, $pageset, $htmlTitle, $subTitle, -1, '', $sessionID);
$sth->execute() or $rv = error_trap_DBI(*STDOUT, "Cannot sth->execute: $sql", $debug, $pagedir, $pageset, $htmlTitle, $subTitle, -1, '', $sessionID) if $rv;
$sth->bind_columns( \$serverID, \$typeMonitoring, \$typeServers, \$typeActiveServer, \$masterFQDN, \$masterASNMTAP_PATH, \$masterRSYNC_PATH, \$masterSSH_PATH, \$slaveFQDN, \$slaveASNMTAP_PATH, \$slaveRSYNC_PATH, \$slaveSSH_PATH, \$collectorDa...
if ( $rv ) {
$matchingArchiveCT .= "\n <table width=\"100%\" align=\"center\" border=\"0\" cellpadding=\"1\" cellspacing=\"1\" bgcolor=\"$COLORSTABLE{TABLE}\">";
if ( $sth->rows ) {
$prevTypeServers = $prevTypeActiveServer = 0;
$prevServerID = $prevMasterFQDN = $prevMasterASNMTAP_PATH = $prevMasterRSYNC_PATH = $prevMasterSSH_PATH = $prevSlaveFQDN = $prevSlaveASNMTAP_PATH = $prevSlaveRSYNC_PATH = $prevSlaveSSH_PATH = $prevResultsdir = '';
while( $sth->fetch() ) {
if ($prevServerID ne $serverID) {
applications/htmlroot/cgi-bin/admin/generateConfig.pl view on Meta::CPAN
if ($typeServers) {
$matchingArchiveCT .= system_call ("mkdir", "$APPLICATIONPATH/tmp/$CONFIGDIR/generated/" .$typeMonitoringCharDorC. "S-$typeActiveServer-$slaveFQDN", $debug);
$matchingArchiveCT .= system_call ("mkdir", "$APPLICATIONPATH/tmp/$CONFIGDIR/generated/" .$typeMonitoringCharDorC. "S-$typeActiveServer-$slaveFQDN/etc", $debug);
}
$rvOpen = open(ArchiveCT, ">$APPLICATIONPATH/tmp/$CONFIGDIR/generated/" .$typeMonitoringCharDorC. "M-$typeActiveServer-$masterFQDN/etc/ArchiveCT");
if ($rvOpen) {
$matchingArchiveCT .= "\n <tr bgcolor=\"$COLORSTABLE{ENDBLOCK}\"><td><a href=\"/$CONFIGDIR/generated/" .$typeMonitoringCharDorC. "M-$typeActiveServer-$masterFQDN/etc/ArchiveCT\" target=\"_blank\">ArchiveCT</a></td></tr>";
print ArchiveCT "# ArchiveCT - $serverID, generated on $configDateTime, ASNMTAP v$version or higher\n#\n# <resultsdir>#[<catalogID>_]<uniqueKey>#check_nnn[|[<catalogID>_]<uniqueKey>#check_mmm]\n#\n# # # # # # # # # # # # # # # # # #...
}
}
if ($rvOpen) {
print ArchiveCT "#\n" if ( $prevResultsdir ne $resultsdir );
my $catalogID_uKey = ( ( $catalogID eq 'CID' ) ? '' : $catalogID .'_' ) . $uKey;
print ArchiveCT "$resultsdir#$catalogID_uKey#$test\n";
}
$prevServerID = $serverID;
$prevTypeMonitoring = $typeMonitoring;
$prevTypeServers = $typeServers;
$prevTypeActiveServer = $typeActiveServer;
$prevMasterFQDN = $masterFQDN;
$prevMasterASNMTAP_PATH = $masterASNMTAP_PATH;
$prevMasterRSYNC_PATH = $masterRSYNC_PATH;
$prevMasterSSH_PATH = $masterSSH_PATH;
$prevSlaveFQDN = $slaveFQDN;
$prevSlaveASNMTAP_PATH = $slaveASNMTAP_PATH;
$prevSlaveRSYNC_PATH = $slaveRSYNC_PATH;
$prevSlaveSSH_PATH = $slaveSSH_PATH;
$prevResultsdir = $resultsdir;
}
if ($rvOpen) {
print ArchiveCT "#\n# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #\n# Einde ArchiveCT - $serverID\n";
close(ArchiveCT);
$rvOpen = 0;
if ($typeServers) {
$typeMonitoringCharDorC = ($typeMonitoring) ? 'D' : 'C';
$matchingArchiveCT .= system_call ("cp", "$APPLICATIONPATH/tmp/$CONFIGDIR/generated/" .$typeMonitoringCharDorC. "M-$typeActiveServer-$masterFQDN/etc/ArchiveCT $APPLICATIONPATH/tmp/$CONFIGDIR/generated/" .$typeMonitoringCharDorC. "S-$t...
applications/htmlroot/cgi-bin/admin/generateConfig.pl view on Meta::CPAN
# DisplayCT - - - - - - - - - - - - - - - - - - - - - - - - - - -
$sql = "select distinct $SERVERTABLSERVERS.serverID, $SERVERTABLSERVERS.typeMonitoring, $SERVERTABLSERVERS.typeServers, $SERVERTABLSERVERS.typeActiveServer, $SERVERTABLSERVERS.masterFQDN, $SERVERTABLSERVERS.masterASNMTAP_PATH, $SERVERTABLSERV...
$sth = $dbh->prepare( $sql ) or $rv = error_trap_DBI(*STDOUT, "Cannot dbh->prepare: $sql", $debug, $pagedir, $pageset, $htmlTitle, $subTitle, -1, '', $sessionID);
$sth->execute() or $rv = error_trap_DBI(*STDOUT, "Cannot sth->execute: $sql", $debug, $pagedir, $pageset, $htmlTitle, $subTitle, -1, '', $sessionID) if $rv;
$sth->bind_columns( \$serverID, \$typeMonitoring, \$typeServers, \$typeActiveServer, \$masterFQDN, \$masterASNMTAP_PATH, \$masterRSYNC_PATH, \$masterSSH_PATH, \$slaveFQDN, \$slaveASNMTAP_PATH, \$slaveRSYNC_PATH, \$slaveSSH_PATH ) or $rv = err...
if ( $rv ) {
$sth->fetch();
$sth->finish() or $rv = error_trap_DBI(*STDOUT, "Cannot sth->finish: $sql", $debug, $pagedir, $pageset, $htmlTitle, $subTitle, -1, '', $sessionID);
$sql = "select distinct $SERVERTABLDISPLAYDMNS.displayDaemon, $SERVERTABLDISPLAYDMNS.pagedir, $SERVERTABLDISPLAYDMNS.loop, $SERVERTABLDISPLAYDMNS.trigger, $SERVERTABLDISPLAYDMNS.displayTime, $SERVERTABLDISPLAYDMNS.lockMySQL, $SERVERTABLDISP...
$sql .= "where $SERVERTABLSERVERS.catalogID = $SERVERTABLCATALOG.catalogID and $SERVERTABLCATALOG.activated = 1 and $SERVERTABLSERVERS.catalogID = $SERVERTABLDISPLAYDMNS.catalogID and $SERVERTABLSERVERS.serverID = $SERVERTABLDISPLAYDMNS.ser...
$sth = $dbh->prepare( $sql ) or $rv = error_trap_DBI(*STDOUT, "Cannot dbh->prepare: $sql", $debug, $pagedir, $pageset, $htmlTitle, $subTitle, -1, '', $sessionID);
$sth->execute() or $rv = error_trap_DBI(*STDOUT, "Cannot sth->execute: $sql", $debug, $pagedir, $pageset, $htmlTitle, $subTitle, -1, '', $sessionID) if $rv;
$sth->bind_columns( \$displayDaemon, \$pagedirs, \$loop, \$trigger, \$displayTime, \$lockMySQL, \$debugDaemon, \$interval, \$groupTitle, \$resultsdir, \$catalogID, \$uKey, \$title, \$test, \$environment, \$trendline, \$helpPluginFilename ) ...
if ( $rv ) {
$matchingDisplayCT .= "\n <table width=\"100%\" align=\"center\" border=\"0\" cellpadding=\"1\" cellspacing=\"1\" bgcolor=\"$COLORSTABLE{TABLE}\">";
if ( $sth->rows ) {
$prevDisplayDaemon = $prevGroupTitle = '';
while( $sth->fetch() ) {
if ( $prevDisplayDaemon ne $displayDaemon ) {
if ( $prevDisplayDaemon ne '' ) {
applications/htmlroot/cgi-bin/admin/generateConfig.pl view on Meta::CPAN
if ( $typeServers ) {
$matchingDisplayCT .= system_call ("mkdir", "$APPLICATIONPATH/tmp/$CONFIGDIR/generated/" .$typeMonitoringCharDorC. "S-$typeActiveServer-$slaveFQDN", $debug);
$matchingDisplayCT .= system_call ("mkdir", "$APPLICATIONPATH/tmp/$CONFIGDIR/generated/" .$typeMonitoringCharDorC. "S-$typeActiveServer-$slaveFQDN/slave", $debug);
$matchingDisplayCT .= createDisplayCTscript ($typeMonitoringCharDorC, 'S', $typeActiveServer, $slaveFQDN, $slaveASNMTAP_PATH, $slaveRSYNC_PATH, $slaveSSH_PATH, $centralSlaveDatabaseFQDN, "slave", $displayDaemon, $pagedirs, $loop, ...
}
$rvOpen = open(DisplayCT, ">$APPLICATIONPATH/tmp/$CONFIGDIR/generated/" .$typeMonitoringCharDorC. "M-$typeActiveServer-$masterFQDN/etc/DisplayCT-$displayDaemon");
if ($rvOpen) {
$matchingDisplayCT .= "\n <tr bgcolor=\"$COLORSTABLE{ENDBLOCK}\"><td><a href=\"/$CONFIGDIR/generated/" .$typeMonitoringCharDorC. "M-$typeActiveServer-$masterFQDN/etc/DisplayCT-$displayDaemon\" target=\"_blank\">DisplayCT-$d...
print DisplayCT "# DisplayCT-$displayDaemon - $serverID, generated on $configDateTime, ASNMTAP v$version or higher\n#\n# <interval>#<groep title>#<resultsdir>#[<catalogID>_]<uniqueKey>#<titel nnn>#check_nnn#<help 0|1>[|[<catalogID...
}
} else {
print DisplayCT "#\n" if ( $prevGroupTitle ne $groupTitle and $prevGroupTitle ne '' );
}
if ($rvOpen) {
my $catalogID_uKey = ( ( $catalogID eq 'CID' ) ? '' : $catalogID .'_' ) . $uKey;
print DisplayCT "$interval#$groupTitle#$resultsdir#$catalogID_uKey#$title#$test --environment=$environment --trendline=$trendline#";
(! defined $helpPluginFilename or $helpPluginFilename eq '<NIHIL>') ? print DisplayCT "0" : print DisplayCT "1";
print DisplayCT "\n";
}
$prevDisplayDaemon = $displayDaemon;
$prevGroupTitle = $groupTitle;
}
if ($rvOpen) {
print DisplayCT "#\n# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #\n# Einde DisplayCT-$displayDaemon - $serverID\n";
applications/htmlroot/cgi-bin/admin/generateConfig.pl view on Meta::CPAN
$matchingAsnmtapDisplayCTscript .= "\n <tr bgcolor=\"$COLORSTABLE{NOBLOCK}\"><td>Display Start/Stop scripts - $serverID, generated on $configDateTime, ASNMTAP v$version or higher</td></tr>";
} else {
$matchingAsnmtapDisplayCTscript .= " <tr><td>No records found for any DisplayCT</td></tr>\n";
}
$matchingAsnmtapDisplayCTscript .= " </table>\n";
$sth->finish() or $rv = error_trap_DBI(*STDOUT, "Cannot sth->finish: $sql", $debug, $pagedir, $pageset, $htmlTitle, $subTitle, -1, '', $sessionID);
}
# CollectorCT - - - - - - - - - - - - - - - - - - - - - - - - - -
$sql = "select $SERVERTABLSERVERS.serverID, $SERVERTABLSERVERS.typeMonitoring, $SERVERTABLSERVERS.typeServers, $SERVERTABLSERVERS.typeActiveServer, $SERVERTABLSERVERS.masterFQDN, $SERVERTABLSERVERS.masterASNMTAP_PATH, $SERVERTABLSERVERS.maste...
$sth = $dbh->prepare( $sql ) or $rv = error_trap_DBI(*STDOUT, "Cannot dbh->prepare: $sql", $debug, $pagedir, $pageset, $htmlTitle, $subTitle, -1, '', $sessionID);
$sth->execute() or $rv = error_trap_DBI(*STDOUT, "Cannot sth->execute: $sql", $debug, $pagedir, $pageset, $htmlTitle, $subTitle, -1, '', $sessionID) if $rv;
$sth->bind_columns( \$serverID, \$typeMonitoring, \$typeServers, \$typeActiveServer, \$masterFQDN, \$masterASNMTAP_PATH, \$masterRSYNC_PATH, \$masterSSH_PATH, \$slaveFQDN, \$slaveASNMTAP_PATH, \$slaveRSYNC_PATH, \$slaveSSH_PATH, \$collectorDa...
if ( $rv ) {
$matchingCollectorCT .= "\n <table width=\"100%\" align=\"center\" border=\"0\" cellpadding=\"1\" cellspacing=\"1\" bgcolor=\"$COLORSTABLE{TABLE}\">";
if ( $sth->rows ) {
$prevTypeServers = $prevTypeActiveServer = 0;
$prevServerID = $prevMasterFQDN = $prevMasterASNMTAP_PATH = $prevMasterRSYNC_PATH = $prevMasterSSH_PATH = $prevSlaveFQDN = $prevSlaveASNMTAP_PATH = $prevSlaveRSYNC_PATH = $prevSlaveSSH_PATH = $prevCollectorDaemon = $prevUniqueKey = '';
while( $sth->fetch() ) {
if ( $prevServerID ne $serverID or $prevCollectorDaemon ne $collectorDaemon ) {
applications/htmlroot/cgi-bin/admin/generateConfig.pl view on Meta::CPAN
if ( $typeServers ) { # Failover
$matchingCollectorCT .= system_call ("mkdir", "$APPLICATIONPATH/tmp/$CONFIGDIR/generated/" .$typeMonitoringCharDorC. "S-$typeActiveServer-$slaveFQDN", $debug);
$matchingCollectorCT .= system_call ("mkdir", "$APPLICATIONPATH/tmp/$CONFIGDIR/generated/" .$typeMonitoringCharDorC. "S-$typeActiveServer-$slaveFQDN/slave", $debug);
$matchingCollectorCT .= createCollectorCTscript ($typeMonitoringCharDorC, 'S', $typeActiveServer, $slaveFQDN, $masterFQDN, $slaveASNMTAP_PATH, $slaveRSYNC_PATH, $slaveSSH_PATH, $centralSlaveDatabaseFQDN, "slave", $collectorDaemon, $...
}
$rvOpen = open(CollectorCT, ">$APPLICATIONPATH/tmp/$CONFIGDIR/generated/" .$typeMonitoringCharDorC. "M-$typeActiveServer-$masterFQDN/etc/CollectorCT-$collectorDaemon");
if ($rvOpen) {
$matchingCollectorCT .= "\n <tr bgcolor=\"$COLORSTABLE{ENDBLOCK}\"><td><a href=\"/$CONFIGDIR/generated/" .$typeMonitoringCharDorC. "M-$typeActiveServer-$masterFQDN/etc/CollectorCT-$collectorDaemon\" target=\"_blank\">Collecto...
print CollectorCT "# CollectorCT-$collectorDaemon - $serverID, generated on $configDateTime, ASNMTAP v$version or higher\n#\n# <minute (0-59)> <hour (0-23)> <day of the month (1-31)> <month of the year (1-12)> <day of the week (0-6 ...
}
} else {
print CollectorCT "#\n" if ( $prevUniqueKey ne $uKey and $prevUniqueKey ne '');
}
if ($rvOpen) {
my $catalogID_uKey = ( ( $catalogID eq 'CID' ) ? '' : $catalogID .'_' ) . $uKey;
print CollectorCT "$minute $hour $dayOfTheMonth $monthOfTheYear $dayOfTheWeek $interval $catalogID_uKey#$resultsdir#$title#$test";
print CollectorCT " --environment=$environment --trendline=$trendline";
print CollectorCT " $argumentsCommon" if ( $argumentsCommon ne '' );
print CollectorCT " $argumentsCrontab" if ( $argumentsCrontab ne '' );
print CollectorCT "#$noOffline" if ( $noOffline ne '' );
print CollectorCT "\n";
}
$prevServerID = $serverID;
$prevTypeMonitoring = $typeMonitoring;
$prevTypeServers = $typeServers;
applications/htmlroot/cgi-bin/admin/generateConfig.pl view on Meta::CPAN
$matchingAsnmtapCollectorCTscript .= "\n <tr bgcolor=\"$COLORSTABLE{NOBLOCK}\"><td>Collector Start/Stop scripts - $serverID, generated on $configDateTime, ASNMTAP v$version or higher</td></tr>";
} else {
$matchingAsnmtapCollectorCTscript .= " <tr><td>No records found for any CollectorCT</td></tr>\n";
}
$matchingAsnmtapCollectorCTscript .= " </table>\n";
$sth->finish() or $rv = error_trap_DBI(*STDOUT, "Cannot sth->finish: $sql", $debug, $pagedir, $pageset, $htmlTitle, $subTitle, -1, '', $sessionID);
}
# rsync-mirror - - - - - - - - - - - - - - - - - - - - - - - - -
$sql = "select distinct $SERVERTABLSERVERS.serverID, $SERVERTABLSERVERS.typeMonitoring, $SERVERTABLSERVERS.typeServers, $SERVERTABLSERVERS.typeActiveServer, $SERVERTABLSERVERS.masterFQDN, $SERVERTABLSERVERS.masterASNMTAP_PATH, $SERVERTABLSERV...
$sth = $dbh->prepare( $sql ) or $rv = error_trap_DBI(*STDOUT, "Cannot dbh->prepare: $sql", $debug, $pagedir, $pageset, $htmlTitle, $subTitle, -1, '', $sessionID);
$sth->execute() or $rv = error_trap_DBI(*STDOUT, "Cannot sth->execute: $sql", $debug, $pagedir, $pageset, $htmlTitle, $subTitle, -1, '', $sessionID) if $rv;
$sth->bind_columns( \$serverID, \$typeMonitoring, \$typeServers, \$typeActiveServer, \$masterFQDN, \$masterASNMTAP_PATH, \$masterRSYNC_PATH, \$masterSSH_PATH, \$slaveFQDN, \$slaveASNMTAP_PATH, \$slaveRSYNC_PATH, \$slaveSSH_PATH, \$collectorDa...
if ( $rv ) {
$matchingRsyncMirror .= "\n <table width=\"100%\" align=\"center\" border=\"0\" cellpadding=\"1\" cellspacing=\"1\" bgcolor=\"$COLORSTABLE{TABLE}\">";
if ( $sth->rows ) {
my ($matchingRsyncMirrorConfigFailover, $matchingRsyncMirrorConfigDistributedMaster, $matchingRsyncMirrorConfigDistributedSlave);
$matchingRsyncMirrorConfigFailover = $matchingRsyncMirrorConfigDistributedMaster = $matchingRsyncMirrorConfigDistributedSlave = '';
my ($sameServerID, $firstCollectorDaemon) = (0, 0);
$prevTypeMonitoring = $prevTypeServers = $prevTypeActiveServer = 0;
applications/htmlroot/cgi-bin/admin/generateConfig.pl view on Meta::CPAN
$matchingRsyncMirrorConfigFailover = $matchingRsyncMirrorConfigDistributedMaster = $matchingRsyncMirrorConfigDistributedSlave = '';
}
$matchingRsyncMirror .= "\n <tr><th>Rsync Mirroring Setup - $serverID</th></tr>" unless ($sameServerID);
}
if ($typeServers) {
my ($hostnameAdminCollector, undef) = split (/\./, $slaveFQDN, 2);
if ( $collectorDaemon eq $hostnameAdminCollector ) {
$matchingRsyncMirrorConfigFailover .= "$SSHLOGONNAME\@$slaveFQDN:$slaveASNMTAP_PATH/results/$resultsdir/ $masterASNMTAP_PATH/results/$resultsdir/ -v -c -z --exclude=*-all.txt --exclude=*-nok.txt --exclude=*-KnownError --exclude=*.tm...
} else {
$matchingRsyncMirrorConfigFailover .= "$SSHLOGONNAME\@$masterFQDN:$masterASNMTAP_PATH/results/$resultsdir/ $slaveASNMTAP_PATH/results/$resultsdir/ -v -c -z --exclude=*-all.txt --exclude=*-nok.txt --exclude=*-KnownError --exclude=*.t...
}
}
if ($typeMonitoring) {
$matchingRsyncMirrorConfigDistributedMaster .= "$masterASNMTAP_PATH/results/$resultsdir/ $SSHLOGONNAME\@$centralMasterFQDN:$centralMasterASNMTAP_PATH/results/$resultsdir/ -v -c -z --exclude=*-all.txt --exclude=*-nok.txt --exclude=*-Kn...
$matchingRsyncMirrorConfigDistributedSlave .= "$slaveASNMTAP_PATH/results/$resultsdir/ $SSHLOGONNAME\@$centralMasterFQDN:$centralMasterASNMTAP_PATH/results/$resultsdir/ -v -c -z --exclude=*-all.txt --exclude=*-nok.txt --exclude=*-Kno...
if ( defined $centralSlaveFQDN and $centralSlaveFQDN ) { # and $centralTypeServers ?
$matchingRsyncMirrorConfigDistributedMaster .= "$masterASNMTAP_PATH/results/$resultsdir/ $SSHLOGONNAME\@$centralSlaveFQDN:$centralSlaveASNMTAP_PATH/results/$resultsdir/ -v -c -z --exclude=*-all.txt --exclude=*-nok.txt --exclude=*-Kn...
$matchingRsyncMirrorConfigDistributedSlave .= "$slaveASNMTAP_PATH/results/$resultsdir/ $SSHLOGONNAME\@$centralSlaveFQDN:$centralSlaveASNMTAP_PATH/results/$resultsdir/ -v -c -z --exclude=*-all.txt --exclude=*-nok.txt --exclude=*-Kno...
}
}
$prevServerID = $serverID;
$prevTypeMonitoring = $typeMonitoring;
$prevTypeServers = $typeServers;
$prevTypeActiveServer = $typeActiveServer;
$prevMasterFQDN = $masterFQDN;
$prevMasterASNMTAP_PATH = $masterASNMTAP_PATH;
$prevMasterRSYNC_PATH = $masterRSYNC_PATH;
$prevMasterSSH_PATH = $masterSSH_PATH;
$prevSlaveFQDN = $slaveFQDN;
$prevSlaveASNMTAP_PATH = $slaveASNMTAP_PATH;
$prevSlaveRSYNC_PATH = $slaveRSYNC_PATH;
$prevSlaveSSH_PATH = $slaveSSH_PATH;
$prevCollectorDaemon = $collectorDaemon;
$prevResultsdir = $resultsdir;
}
$matchingRsyncMirror .= createRsyncMirrorScriptsFailover ($serverID, $typeMonitoring, $typeServers, $typeActiveServer, $masterFQDN, $masterASNMTAP_PATH, $masterRSYNC_PATH, $masterSSH_PATH, $slaveFQDN, $slaveASNMTAP_PATH, $slaveRSYNC_PATH,...
$matchingRsyncMirror .= createRsyncMirrorScriptsDistributed ($serverID, $typeMonitoring, $typeServers, $typeActiveServer, $masterFQDN, $masterASNMTAP_PATH, $masterRSYNC_PATH, $masterSSH_PATH, $slaveFQDN, $slaveASNMTAP_PATH, $slaveRSYNC_PA...
$matchingRsyncMirror .= "\n <tr bgcolor=\"$COLORSTABLE{NOBLOCK}\"><td>Rsync Mirror Scripts - $serverID, generated on $configDateTime, ASNMTAP v$version or higher</td></tr>";
} else {
$matchingRsyncMirror .= "\n <tr><td>No records found for any RsyncMirror</td></tr>";
}
applications/htmlroot/cgi-bin/admin/generateConfig.pl view on Meta::CPAN
if ( -e "$APPLICATIONPATH/tmp/$CONFIGDIR/generated" ) {
my $compareDiff = system_call ("$DIFFCOMMAND -braq -E 'generated on 20[0-9][0-9]/[0-9][0-9]/[0-9][0-9] [0-9][0-9]:[0-9][0-9]:[0-9][0-9]'", "$APPLICATIONPATH/tmp/$CONFIGDIR/generated $APPLICATIONPATH/tmp/$CONFIGDIR/installed", $debug);
if ($compareDiff eq '') {
$installView .= "\n <tr bgcolor=\"$COLORSTABLE{NOBLOCK}\"><td>The generated and installed configurations are identical.</td></tr>";
} else {
$installView .= "\n <tr><td align=\"center\"><b>Under construction:</b></td></tr>";
$installView .= "\n <tr bgcolor=\"$COLORSTABLE{ENDBLOCK}\"><td><table width=\"100%\" align=\"center\" border=\"0\" cellpadding=\"1\" cellspacing=\"1\" bgcolor=\"$COLORSTABLE{NOBLOCK}\">$compareDiff</table></td></tr>";
$installView .= "\n <tr><td align=\"center\"> </td></tr>";
$installView .= "\n <tr bgcolor=\"$COLORSTABLE{STARTBLOCK}\"><td>We only are allowed to press the <b>MOVE</b> button when all commands are successfully executed!</td></tr>" if ( $Cauto == 1 );
$installView .= "\n <tr align=\"left\"><td align=\"right\"><input type=\"submit\" value=\"". ( ( $Cauto == 1 ) ? 'MOVE' : 'INSTALL' ) ."\"> <input type=\"reset\" value=\"Reset\"></td></tr>\n";
}
} else {
$installView .= "\n <tr><td>The generated configuration doesn't exist.</td></tr>";
}
$installView .= "\n </table>";
} elsif ($action eq 'install') {
$installView .= "\n <table width=\"100%\" align=\"center\" border=\"0\" cellpadding=\"1\" cellspacing=\"1\" bgcolor=\"$COLORSTABLE{TABLE}\">";
$installView .= "\n <tr><th>Configuration Installed</th></tr>";
applications/htmlroot/cgi-bin/admin/generateConfig.pl view on Meta::CPAN
# ---------------------------------------------------------------
# This shell script takes care of starting and stopping
AMNAME=\"All ASNMTAP Collectors\"
AMPATH=$serverASNMTAP_PATH/applications/$subdir
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
STARTUPFILE
foreach my $choise ('start', 'stop', 'reload', 'restart', 'status') {
print AsnmtapCollectorCTscript <<STARTUPFILE;
$choise() {
# $choise daemons
echo "\u$choise: '\$AMNAME' ..."
cd \$AMPATH
STARTUPFILE
my ($hostname, undef) = split (/\./, $serverFQDN, 2);
my ($hostnameAdminCollector, undef) = split (/\./, $serverAdminCollectorFQDN, 2);
applications/htmlroot/cgi-bin/admin/generateConfig.pl view on Meta::CPAN
case "\$1" in
start)
start
;;
stop)
stop
;;
reload)
reload
;;
restart)
restart
;;
status)
status
;;
*)
echo "Usage: '\$AMNAME' {start|stop|reload|restart|status}"
exit 1
esac
exit 0
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
STARTUPFILE
close (AsnmtapCollectorCTscript);
}
applications/htmlroot/cgi-bin/admin/generateConfig.pl view on Meta::CPAN
# ---------------------------------------------------------------
# This shell script takes care of starting and stopping
AMNAME=\"All ASNMTAP Displays\"
AMPATH=$serverASNMTAP_PATH/applications/$subdir
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
STARTUPFILE
foreach my $choise ('start', 'stop', 'reload', 'restart', 'status') {
print AsnmtapDisplayCTscript <<STARTUPFILE;
$choise() {
# $choise daemons
echo "\u$choise: '\$AMNAME' ..."
cd \$AMPATH
STARTUPFILE
if ($typeServersCharMorS eq $typeActiveServer or $choise eq 'stop') {
foreach my $matchingAsnmtapDisplayCTscript (@matchingAsnmtapDisplayCTscript) { print AsnmtapDisplayCTscript " ./$matchingAsnmtapDisplayCTscript $choise\n"; }
}
applications/htmlroot/cgi-bin/admin/generateConfig.pl view on Meta::CPAN
case "\$1" in
start)
start
;;
stop)
stop
;;
reload)
reload
;;
restart)
restart
;;
status)
status
;;
*)
echo "Usage: '\$AMNAME' {start|stop|reload|restart|status}"
exit 1
esac
exit 0
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
STARTUPFILE
close (AsnmtapDisplayCTscript);
}
applications/htmlroot/cgi-bin/admin/generateConfig.pl view on Meta::CPAN
# ------------------------------------------------------------------------------
# Step-by-step instructions for installation:
# $masterASNMTAP_PATH/applications/tools/templates/master/rsync-wrapper-failover-example.sh
# $masterASNMTAP_PATH/applications/tools/templates/slave/rsync-mirror-failover-example.sh
# $masterASNMTAP_PATH/applications/tools/templates/slave/rsync-mirror-failover-example.conf
# ------------------------------------------------------------------------------
use strict;
# Chroot Dir
my \$chrootDir = ( \$ENV{ASNMTAP_PATH} ? \$ENV{ASNMTAP_PATH} : '$masterASNMTAP_PATH' ) . '/results/';
# Where to log successes and failures to set to /dev/null to turn off logging.
my \$filename = ( \$ENV{ASNMTAP_PATH} ? \$ENV{ASNMTAP_PATH} : '$masterASNMTAP_PATH' ) . '/log/rsync-wrapper-failover-$masterFQDN.log';
# What you want sent if access is denied.
my \$denyString = 'Access Denied! Sorry';
# The real path of rsync.
my \$rsyncPath = '$masterRSYNC_PATH/rsync'; # master
# 1 = rsync version 2.6.7 or higher or 0 = otherwise
my \$rsync_version_2_6_7_or_higher = 1;
applications/htmlroot/cgi-bin/admin/generateConfig.pl view on Meta::CPAN
# ------------------------------------------------------------------------------
# © Copyright $COPYRIGHT Alex Peeters [alex.peeters\@citap.be]
# ------------------------------------------------------------------------------
# rsync-wrapper-failover.sh for asnmtap, v$version, wrapper script for rsync
# execution via ssh key for use with rsync-mirror-failover.sh
# ------------------------------------------------------------------------------
use strict;
# Chroot Dir
my \$chrootDir = ( \$ENV{ASNMTAP_PATH} ? \$ENV{ASNMTAP_PATH} : '$slaveASNMTAP_PATH' ) . '/results/';
# Where to log successes and failures to set to /dev/null to turn off logging.
my \$filename = ( \$ENV{ASNMTAP_PATH} ? \$ENV{ASNMTAP_PATH} : '$slaveASNMTAP_PATH' ) . '/log/rsync-wrapper-failover-$slaveFQDN.log';
# What you want sent if access is denied.
my \$denyString = 'Access Denied! Sorry';
# The real path of rsync.
my \$rsyncPath = '$slaveRSYNC_PATH/rsync'; # slave
# 1 = rsync version 2.6.7 or higher or 0 = otherwise
my \$rsync_version_2_6_7_or_higher = 1;
applications/htmlroot/cgi-bin/admin/generateConfig.pl view on Meta::CPAN
# ------------------------------------------------------------------------------
# Step-by-step instructions for installation:
# $centralMasterASNMTAP_PATH/applications/tools/templates/master/rsync-wrapper-distributed-example.sh
# $centralMasterASNMTAP_PATH/applications/tools/templates/slave/rsync-mirror-distributed-example.sh
# $centralMasterASNMTAP_PATH/applications/tools/templates/slave/rsync-mirror-distributed-example.conf
# ------------------------------------------------------------------------------
use strict;
# Chroot Dir
my \$chrootDir = ( \$ENV{ASNMTAP_PATH} ? \$ENV{ASNMTAP_PATH} : '$centralMasterASNMTAP_PATH' ) . '/results/';
# Where to log successes and failures to set to /dev/null to turn off logging.
my \$filename = ( \$ENV{ASNMTAP_PATH} ? \$ENV{ASNMTAP_PATH} : '$centralMasterASNMTAP_PATH' ) . '/log/rsync-wrapper-distributed-$centralMasterFQDN.log';
# What you want sent if access is denied.
my \$denyString = 'Access Denied! Sorry';
# The real path of rsync.
my \$rsyncPath = '$centralMasterRSYNC_PATH/rsync'; # central master
# 1 = rsync version 2.6.7 or higher or 0 = otherwise
my \$rsync_version_2_6_7_or_higher = 1;
applications/htmlroot/cgi-bin/admin/generateConfig.pl view on Meta::CPAN
# ------------------------------------------------------------------------------
# Step-by-step instructions for installation:
# $centralSlaveASNMTAP_PATH/applications/tools/templates/master/rsync-wrapper-distributed-example.sh
# $centralSlaveASNMTAP_PATH/applications/tools/templates/slave/rsync-mirror-distributed-example.sh
# $centralSlaveASNMTAP_PATH/applications/tools/templates/slave/rsync-mirror-distributed-example.conf
# ------------------------------------------------------------------------------
use strict;
# Chroot Dir
my \$chrootDir = ( \$ENV{ASNMTAP_PATH} ? \$ENV{ASNMTAP_PATH} : '$centralSlaveASNMTAP_PATH' ) . '/results/';
# Where to log successes and failures to set to /dev/null to turn off logging.
my \$filename = ( \$ENV{ASNMTAP_PATH} ? \$ENV{ASNMTAP_PATH} : '$centralSlaveASNMTAP_PATH' ) . '/log/rsync-wrapper-distributed-$centralSlaveFQDN.log';
# What you want sent if access is denied.
my \$denyString = 'Access Denied! Sorry';
# The real path of rsync.
my \$rsyncPath = '$centralSlaveRSYNC_PATH/rsync'; # central slave
# 1 = rsync version 2.6.7 or higher or 0 = otherwise
my \$rsync_version_2_6_7_or_higher = 1;
applications/htmlroot/cgi-bin/admin/generateConfig.pl view on Meta::CPAN
} elsif (($filename =~ /^(slave|master)\/asnmtap-display.sh$/) or ($filename =~ /^(slave|master)\/asnmtap-collector.sh$/)) {
$commands {$server} {TODO} {++$_id} {auto} = 0;
$commands {$server} {TODO} {$_id} {label} = '=c';
$commands {$server} {TODO} {$_id} {active} = $active;
$commands {$server} {TODO} {$_id} {command} = "'$filename' ?";
$compareText .= '<br><FONT COLOR="yellow"> ['. $_id .'] '. $commands {$server} {TODO} {$_id} {command} .'</FONT>' if ( $debug eq 'T' );
} elsif (($filename =~ /^(slave|master)\/DisplayCT-[\w-]+\.sh$/) or ($filename =~ /^(slave|master)\/CollectorCT-[\w-]+\.sh$/)) {
$commands {$server} {START} {++$_id} {auto} = 0;
$commands {$server} {START} {$_id} {label} = '=d';
$commands {$server} {START} {$_id} {active} = $active;
$commands {$server} {START} {$_id} {command} = "$SSHCOMMAND $connectArguments $SSHLOGONNAME\@$server ". $ASNMTAP_PATH { substr ($type, -1, 1) } { $server } .'/applications/'. ( ($type eq 'CM' or $type eq 'DM') ? 'master' : 'slave' ) ."/$f...
$compareText .= '<br><FONT COLOR="#99CC99"> ['. $_id .'] '. $commands {$server} {START} {$_id} {command} .'</FONT>' if ( $debug eq 'T' );
# } elsif ( $filename =~ /^master\/rsync-mirror-failover-[\w\-.]+.conf$/ or $filename =~ /^slave\/rsync-mirror-failover-[\w\-.]+.conf$/) {
# deze bestanden worden reeds gecopieerd door middel van bovenstaande SCP in deze sectie
}
}
} elsif ( $compareView =~ /^diff: installed: No such file or directory/ ) {
$compareText = "The installed configuration doesn't exist.";
} elsif ( $compareView =~ /^diff: generated: No such file or directory/ ) {
$compareText = "The generated configuration doesn't exist.";
} else {
applications/htmlroot/cgi-bin/admin/holidays.pl view on Meta::CPAN
}
function validateForm() {
if ( document.holidays.formule.value == null || document.holidays.formule.value == '' ) {
document.holidays.formule.focus();
alert('Please select a formule!');
return false;
} else {
if ( document.holidays.formule.value == 0 ) {
// month of year (1-12)
var objectRegularExpressionMonthValue = /\^([1-9]|1[0-2])\$/;
if ( document.holidays.month.value == null || document.holidays.month.value == '' ) {
document.holidays.month.focus();
alert('Please enter month of year!');
return false;
} else {
if ( ! objectRegularExpressionMonthValue.test(document.holidays.month.value) ) {
document.holidays.month.focus();
alert('Please re-enter month of the year: Bad month of the year value!');
return false;
}
}
// day of month (1-31)
var objectRegularExpressionDayValue = /\^([1-9]|[1-2][0-9]|3[0-1])\$/;
if ( document.holidays.day.value == null || document.holidays.day.value == '' ) {
document.holidays.day.focus();
alert('Please enter day of the month!');
return false;
} else {
if ( ! objectRegularExpressionDayValue.test(document.holidays.day.value) ) {
document.holidays.day.focus();
alert('Please re-enter day of the month: Bad day of the month value!');
return false;
}
}
}
}
// offset (0-364)
var objectRegularExpressionOffsetValue = /\^([0-9]|[0-9][0-9]|[1-2][0-9][0-9]|[3][0-5][0-9]|[3][6][0-4])\$/;
if ( document.holidays.offset.value == null || document.holidays.offset.value == '' ) {
document.holidays.offset.focus();
alert('Please enter offset!');
return false;
} else {
if ( ! objectRegularExpressionOffsetValue.test(document.holidays.offset.value) ) {
document.holidays.offset.focus();
alert('Please re-enter offset: Bad offset value!');
return false;
}
}
if ( document.holidays.countryID.value == null || document.holidays.countryID.value == 'none' ) {
document.holidays.countryID.focus();
alert('Please create/select a country!');
return false;
applications/htmlroot/cgi-bin/admin/holidays.pl view on Meta::CPAN
</td></tr>
<tr><td><b>Holiday: </b></td><td>
<input type="text" name="holiday" value="$Choliday" size="64" maxlength="64" $formDisabledAll>
</td></tr>
<tr><td><b>Activated: </b></td><td>
<input type="checkbox" name="activated" $activatedChecked $formDisabledAll>
</td></tr>
HTML
print " <tr><td> </td><td><br>Please enter all required information before committing the required information. Required fields are marked in bold.</td></tr>\n" if ($action eq 'duplicateView' or $action eq 'editView' or $action eq '...
print " <tr align=\"left\"><td align=\"right\"><br><input type=\"submit\" value=\"$submitButton\"></td><td><br><input type=\"reset\" value=\"Reset\"></td></tr>\n" if ($action ne 'displayView');
print " </table>\n";
} elsif ($action eq 'delete' or $action eq 'edit' or $action eq 'insert') {
print " <tr><td align=\"center\"><br><br><h1>Holiday: $htmlTitle</h1></td></tr>";
print " <tr><td align=\"center\">$matchingHolidays</td></tr>" if (defined $matchingHolidays and $matchingHolidays ne '');
} else {
print " <tr><td><br><table align=\"center\" border=0 cellpadding=1 cellspacing=1 bgcolor='#333344'><tr><td align=\"left\"><b>Catalog ID: </b></td><td>$catalogIDSelect</td></tr></table></td></tr>";
print " <tr><td align=\"center\"><br>$matchingHolidays</td></tr>";
}
print " </table>\n";
applications/htmlroot/cgi-bin/admin/holidaysBundle.pl view on Meta::CPAN
</td></tr>
<tr><td><b>Holidays: </b></td><td>
$holidaysSelect
</td></tr>
<tr><td><b>Activated: </b></td><td>
<input type="checkbox" name="activated" $activatedChecked $formDisabledAll>
</td></tr>
HTML
print " <tr><td> </td><td><br>Please enter all required information before committing the required information. Required fields are marked in bold.</td></tr>\n" if ($action eq 'duplicateView' or $action eq 'editView' or $action eq '...
print " <tr align=\"left\"><td align=\"right\"><br><input type=\"submit\" value=\"$submitButton\"></td><td><br><input type=\"reset\" value=\"Reset\"></td></tr>\n" if ($action ne 'displayView');
print " </table>\n";
} elsif ($action eq 'delete' or $action eq 'edit' or $action eq 'insert') {
print " <tr><td align=\"center\"><br><br><h1>Holiday Bundle: $htmlTitle</h1></td></tr>";
print " <tr><td align=\"center\">$matchingHolidaysBundle</td></tr>" if (defined $matchingHolidaysBundle and $matchingHolidaysBundle ne '');
} else {
print " <tr><td><br><table align=\"center\" border=0 cellpadding=1 cellspacing=1 bgcolor='#333344'><tr><td align=\"left\"><b>Catalog ID: </b></td><td>$catalogIDSelect</td></tr></table></td></tr>";
print " <tr><td align=\"center\"><br>$matchingHolidaysBundle</td></tr>";
}
print " </table>\n";