Title: DNS Question - Conditional Forwarding or Secondary Zone Stub
I have alerts configured in Perfmon to alert me when certain thresholds are reached on our servers.  I can get the server to send me a net send message when the threshold is reached with no problem.  What I am having a problem with is having it run a specific program when the threshold is reached, namely a perl script that I have written that will email to a distro group of server monitor admins that can then track the server down and determine the reason for the threshold being reached.  I was wondering if anybody knows any kinks or specifics of the "Run this program" field in the Perfmon Alert Actions properties, or a better way to do this (other than buying some product that does it for me).  The script is short and is as follows:
 
use Net::SMTP;
$mailserver =  "mailserver.fully.qualified.domain.name";
$recipient =  '[EMAIL PROTECTED]';
$recipient =  '[EMAIL PROTECTED]';
$sender =  'Sender_Name';
$server = 'hostname';
my $smtp = Net::SMTP->new( $mailserver ) or die "Can\'t connect to SMTP host ($mailserver)\n";
$smtp->mail( $sender );
$smtp->to($recipient);
$smtp->data();
$smtp->datasend("To: $recipient");
$smtp->datasend("From: $sender");
$smtp->datasend("\n");
$smtp->datasend("Subject: Resource Threshold on $server reached\n");
$smtp->datasend();
$smtp->quit;
 
 
For troubleshooting purposes the Performance Monitor Logs and Alerts service runs with a domain admin account.  The Run this program block is checked and the path is C:\winnt\system32\perlscriptname.pl.  Also the Alert runs with a domain admin account that is verified unlocked and functional. 
 
The script runs fine when I launch it from a command prompt, it just will not launch from the Perfmon Alerts Action.
 
Any Ideas?
 
Nathaniel Bahta
General Dynamics
Network Systems
 
 

Reply via email to