Hello:
I have seen this script the checks the OpenDeploy logs on the forum for alittle while and I want to modify this to check DataDeploy logs. Can you please suggest the proper coding changes. Thank you.
use strict;
my $name = "DevTeamsite_TO_DevPersServer";
my $def = "MYDEFINITIONNAME";
my $src="myserverone";
my $dest = "myservertwo";
my $oderrors = parse_appended_failed();
sub parse_appended_failed
{
#my ($name,$def,$src,$dest) =
@_;
my
@latest = ();
#------------------
#need log path here
my $IWODLOGPATH = "d:/iw-home/interwoven/opendeploy/OpenDeployNG/log";
#------------------
my $errors = "";
my $logfile = "$IWODLOGPATH/src." . $name . "." . $def . "." . $src . ".to." . $dest . ".log";
if (-e $logfile)
{
open LOG,"<$logfile";
while (<LOG>)
{
if (/Begin logfile/)
{
@latest = ();
}
push
@latest,$_;
}
foreach (
@latest) {
$errors .= "$_" if (/\*\*\*ERROR/ || /\*\*\*WARNING/ || /FAILED/);
}
}
else
{
$errors = "Could not open logfile: $logfile\n";
}
return $errors;
}
SendEmail($oderrors);
#
# Send Email Notification
#
sub SendEmail
{
my ($errors) =
@_;
my $mailserver = "myemailserver.domain.com";
my $user = "myemail@\domain.com";
my $emailTo = "myemail@\domain.com";
use Net:

MTP;
my $smtp = Net:

MTP->new($mailserver);
$smtp->mail('myemail@domain.com');
$smtp->to($emailTo);
$smtp->data();
$smtp->datasend("To: $user\n");
$smtp->datasend("From: INTERWOVEN ADMINISTRATOR\n");
$smtp->datasend("Subject: OPENDEPLOY ERRORS\n");
$smtp->datasend("$errors\n");
$smtp->datasend("\n");
$smtp->quit;
}