11-20-2002 07:12 AM - edited 03-02-2019 03:02 AM
Hello,
I want to receive a mail when I receive a specific Syslog message.
So I have declared a Syslog action in RME, launching a file I have created : mail.bat. This file contains :
d:
cd \program files\cscopx\cgi-bin\sysloga
perl sampleEmailScript.pl -text_message $M -email_ids
mon.email@masociete.com -subject "Alerte CiscoWorks 2000" -from
mon.email@masociete.com -smtp my_smtp-server
I want to receive in the mail the content of the syslog, but instead I receive :
Dear CW2K User,
This email is generated by the sampleEmailScript.pl program. The syslog message that was configured for this automated action is :
$M
11-20-2002 07:27 AM
Don't use batch file, copy the content of your batch file into the specific command section (one line only) and try.
Andrea.
11-21-2002 02:01 AM
I thank you Andrea, I am going to try and I will tell you if it works.
11-22-2002 10:26 AM
Hi, would you mind to share this command line syntax with me. I am trying to do the same thing until we have DFM installed. Thanks in advance/Elsie
11-27-2002 07:13 AM
Yeah, could someone provide us with the correct line syntax? I would ike to use this because the mail notifier in DFM is way to limited.
thanks,
Patrick
11-29-2002 03:02 AM
Hi,
I have only this note for you.
Create a new autoaction, from the admin syslog analyzer menu.
Select the specific host and syslog message type and copy the following string in the command field of the new autoaction:
c:\progra~1\cscopx\bin\perl c:\progra~1\cscopx\cgi-bin\sysloga\sampleEmailScript.pl -text_message $D -email_ids pippo@pippo.com -subject "Link Up/Down" -smtp smtp.pippo.com
where pippo@pippo.com is the destination and smtp.pippo.com the smtp server.
Let me know.
Andrea.
12-11-2002 06:41 AM
Andrea,
Are you sure the D$ is the right way to get the parameters from CW?
Because then i just give me the D$ in the mail....
Thanks,
Patrick
12-12-2002 11:39 AM
I have this:
C:\PROGRA~1\CSCOpx\bin\perl C:\PROGRA~1\CSCOpx\cgi-bin\sysloga\sampleEmailScript.pl -text_message $M -email_ids jalonso@univision.net -subject "CW2K Warning !!!" -from CiscoAdmin -smtp 10.1.3.8
and it only worked for me when I used a SMTP server that is not a MS Exchange Server , I'm using a Linux SMTP Server.
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide