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. If you'd prefer to explore, try our test area to get started. And see here for current known issues.

New Member

Define automated action on RME 4.0.3

Hi everibody, I read on bug tool that in this version of RME is fixed the bug ID CSCsa95946, Now dou you know how to use %M and %D on email option, any idea about that ?

And in the workaround of fixed bug, its mentioned that we use sampleEmailscript, but i dont know how to create the file *.bat, so would you like to tell me who to make it ?

thanks

Manuel

  • Network Management
3 REPLIES
Silver

Re: Define automated action on RME 4.0.3

RME has an Automated Action that uses syslog messages to trigger email. RME

comes with a perl script for email. Here's an example of how to configure

your server and test sending email through SMTP mail relay server (Windows)

or Sendmail (Solaris).

RME > Administration > Syslog Analyzer > Define Automated Action > Add

SYS-*-5-CONFIG

SYS-*-5-CONFIG_I

Add the following command with the correct email address and email relay

server. It's easy to make a typo error here, so you might want to make the

changes to this and then copy it.

C:\PROGRA~1\CSCOpx\bin\perl

C:\PROGRA~1\CSCOpx\cgi-bin\sysloga\sampleEmailScript.pl -text_message $M

-email_id caguama@cisco.com -subject $D -from cw2000 -smtp rooster.cisco.com

Please make sure you follow the above format (no typo please) and use the

full email address and SMTP server name. Make sure you have:

RME > Admin > System Admin > System Configuration > SMTP

SMTP Server: your_email_server_full_name (ie: rooter.cisco.com) *not* IP

address

Then from the DOS prompt:

pdterm SyslogAnalyzer

pdexec SyslogAnalyzer

Make sure your router has this line configured:

logging your_rme_ip_address

Make a change on your router. Can take up to a few minutes and see if you

get an email. If it works, you should get an email something like:

"Dear CW2K User,

This email is generated by the sampleEmailScript.pl program.

The syslog message that was configured for this automated action is:

2001-1-9 8:30:51 10.2.200.13 %SYS-5-CONFIG_I: Configured from console by

vty0 (10.160.2.49)"

---------

Following are the Syslog messages that trigger config fetch in RME:

Facility-Severity-Mnemonic description

RESTART-*-*

SYS-5-* ONLINE

*-*-RESTART

*-*-CONFIG_I

CONFIG-*-*

*-*-CONFIG

OIR-6-INSCARD

*-*-OIR

SYS-6-CFG_CHG *telnet*

SYS-6-CFG_CHG *Console*

SNMP-5-COLDSTART

PIX-5-111005

SYS-5-RELOAD

CPU_REDUN-6-RUNNING_CONFIG_CHG

CPU_REDUN-5-RCSF_SYNCED

CPU_REDUN-6-STARTUP_CONFIG_CHG

CPU_REDUN-5-STARTUP_CONFIG_SYNCED

CPU_REDUN-6-BOOTED_AS_ACTIVE

CPU_REDUN-5-SWITCHOVER

Nodemgr-5-CE *REBOOT*

-----------------------------------------------

SECOND PROCEDURE:

You can also go to RME > Admin > Syslog Analysis > Define Automated Action

RME - Syslog Email

Procedure

Note The program that performs the email function is called sampleEmailScript.pl. This

program is provided as an example and can be modified.

Select Resource Manager Essentials > Administration > Syslog Analysis > Define

Automated Action. The Automated Action Configuration dialog box appears.

Click Add. The Define Automated Action dialog box is refreshed.

Enter the name of the action in the Action Name text box.

Select message SYS-*-5-CONFIG_I from the Syslog Message Types list, then click Add.

Enter the following script and its arguments in the Command Line edit box:

For UNIX systems enter:

/opt/CSCOpx/cgi-bin/sysloga/sampleEmailScript.pl -text_message $M -email_ids < your

e-mail address>-subject "testing" -from < your name>

For Windows NT systems enter:

Note The Perl script must be run using the interpreter and you must specify the SMTP

server.

drive: \%NMSROOT%\bin\perl

drive: \%NMSROOT%\cgi-bin\sysloga\sampleEmailScript.pl -text_message $M -email_ids your

e-mail address -subject "testing" -from your name -smtp your smtp server name

where NMSROOT is the Essentials installation directory, and $M means that the entire

message is passed to the script. The $M can be replaced with $D, which means that the

device name is passed to the script.

Note If this does not work, precede the script and its arguments by entering Perl.

check out the following link for configuring automated action :

http://www.cisco.com/en/US/products/sw/cscowork/ps2073/products_user_guide_chapter09186a0080567959.html#wp1034685

New Member

Re: Define automated action on RME 4.0.3

Thanks for your response a-vazquez, but now in the newest RME 4.0 , has two option, first using email template and second using scrip, I remembered that solution it used on RME 3.5.

My problem is with rme 4.0.3, I don´t understand who create *.bat file, according the information on mentioned ID bug

Best Regards

Re: Define automated action on RME 4.0.3

I currently cannot check if the my file really works, but it should look something like this... Open notepad and copy the following to it:

------------

@echo off

"C:\Prgramm Files\CSCOpx\bin\perl" "C:\Program Files\CSCOpx\files\scripts\syslog\sampleEmailScript.pl -text_message "Message: %2 form device: %1" -email_ids nobody@nowhere.com -subject "Syslog Message: %2" -from RME4.x@CiscoWorks_LMS_2.5 -smtp mail-server-name.nowhere.com

----------------

Change -email_ids and -smtp according to your site (and the path) and save it as RMEmail.bat. Call it in RME as an automated action (script) with $D and $M. This line should look like

"full_path_to_the_script"\RMEmail.bat $D $M

As a prerequesite you must have the perl script sampleEmailScript.pl in %NMSROOT%\files\scripts\syslog\

I am not sure with the quotation marks in the RMEmail.bat file. Perhaps you have to change them or leave them completely away.

223
Views
0
Helpful
3
Replies
This widget could not be displayed.