LMS 3.1/ Automate script for Syslog failed

Unanswered Question
Dec 2nd, 2008
User Badges:

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 [email protected]


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
  • 2
  • 3
  • 4
  • 5
Overall Rating: 0 (0 ratings)
Loading.
frankzehrer Tue, 12/02/2008 - 23:10
User Badges:
  • Silver, 250 points or more

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 [email protected] -subject "Syslog Message: $2" -from [email protected] -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



Actions

This Discussion