12-02-2008 07:08 AM
Hi,
When LMS on windows received a change cpnfiguration syslog, I would like to forward an email with the difference beetween running and startup config.
I have already create the automate action but the script action doesn't work:
I create a diff.bat script in CSCOpx\files\scripts\syslog folder.
diff.bat contains only one line:
c:\progra~1\CSCOpx\bin\cwcli config compare -u admin -p admin -device %~1 -m elbe@telindus.fr
But it failed, I don't received the mail, but I see that syslog is received by LMS.
When I launch the script in dos command, it works.
here you can find analysordebug.log file.
Thanks, Elisabeth
12-02-2008 11:10 PM
Hi Elizabeth,
try to customize the sampleemailscript.pl from RME 3.5 and earlier.
The RME 4.x help stated the following:
Guidelines for Writing Automated Script
To write an automated script:
Copy the sampleEmailScript.pl from RME 3.5 or older to the new RME 4.1 server and put this file in:
For Solaris:
/var/adm/CSCOpx/files/scripts/syslog directory
For Windows:
NSMROOT/files/scripts/syslog
Write a shell script for Solaris or .bat file for Windows in the same directory.
Here is an example shell script (called syslog-email.sh) for UNIX:
#!/bin/sh
/opt/CSCOpx/bin/perl /var/adm/CSCOpx/files/scripts/syslog/sampleEmailScript.pl -text_message "MEssage:
$2 from device: $1" -email_ids nobody@nowhere.com -subject "Syslog Message: $2" -from nobody@nowhere.com -smtp mail-server-name.nowhere.com
For Windows, replace $1 and $2 with %1 and %2 and change the directory accordingly.
I hope that helps a bit.
P.S. just remove the .txt extension from the attached file. Cisco Forum does not like pearl scripts as attachments.
;-D
Best regards,
Frank
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