Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Announcements

Welcome to Cisco Support Community. We would love to have your feedback.

For an introduction to the new site, click here. And see here for current known issues.

New Member

LMS 3.1/ Automate script for Syslog failed

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

1 REPLY
Silver

Re: LMS 3.1/ Automate script for Syslog failed

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

176
Views
0
Helpful
1
Replies