Need EEM script for write mem config details.

Looking for an EEM script that will send an email of config details when a write mem is performed.  
Any help would be appreciated as i'm new to EEM.

Something like this could work:
event manager applet email-write-mem
event cli pattern "^(write memory|write|copy running-config startup-config)*$" sync no skip no
action 0.5 info type routername
action 1.0 mail from [email protected] to [email protected] server 10.1.1.1 subject "Write mem on $_info_routername" body "A write mem was done on $_info_routername"

Similar Messages

  • Auto Email on event - EEM script for NxOS

    I generated EEM script for Duplicate IP address detection, but i do not know how to trigger email in NxOS.
    event manager environment emailto "[email protected]"
    event manager applet Duplicate_IP
      description "Detect Duplicate IP and Send Trap"
      event syslog pattern "%ARP-2-DUP_SRC_IP"
      action 1.0 snmp-trap strdata "Duplicate IP Detected on Host $hostname"
      action 2.0 cli sh logg last 100
      action 3.0 event-default
    Somebody know how to trigger email. There is no good document on EEM email triggering mechanism.

    Not sure if this would work in NxOS but I think it would go something like this;
    Specify the action of sending a short e-mail when the EEM applet is triggered via the event syslog pattern you already have defined:
         Router(config-applet)#  action label mail server server-address to to-address from from-address subject subject body body-text
    Remember to define the EEM environment variables first when setting up the applet as follows:
       event manager environment  _email_server
       event manager environment  _email_to
       event manager environment  _email_from

  • NX-OS EEM script for SVI

    Hello, 
    I'm looking for a simple eem script for enabling an SVI if its goes down. we have some issue is NX-OS running 6.0.2.(1) where we occure a SVI down for itself.
    Regard
    Adil

    Unfortunately, this is not possible on NX-OS.  EEM on NX-OS is EEM by name only.  The feature is very different than it is on IOS.  What you could do is use an IOS box as a proxy.  That is, send a trap using EEM from your NX-OS box, then have IOS do the telnet to the other NX-OS box to perform the necessary commands.

  • How to shut no shut interface of switch using(EEM) Script for 3560 switch

    Dear community experts,
    I'm new for creating scripting for EEM and below is my situation, need your support.
    Present I'm using 3560 switch, one of  the switch port(FA0/1) has added  Cisco Access point(PoE), actually what happening daily this Access point getting struct when I'M doing the switch port (FA0/1) shut  then no shut it is working fine .
    So my question is i need script, that should continuously ping the IP off the Access point if the IP will drop 4 packets the switch do shut  and then no shut for that I need the script, Please help me.
    if it is not possible please provide the batch file, which will ping the particular IP if 4 packet drops it will telnet the switch and go to the interface do shut no shut 
    Note: 
    instead of mentioned 3560, I mentioned 2960 now corrected it  please provide the script.

    This should work:
    ip sla 1
     icmp-echo 10.10.10.1
     frequency 15
    ip sla schedule 1 life forever start now
    ip sla enable reaction-alerts
    ip sla reaction-configuration 1 react timeout action-type trapOnly threshold-type consecutive 4
    event manager applet reset-ap
     event ipsla operation-id 1 reaction-type timeout
     action 1.0 cli command "enable"
     action 2.0 cli command "config t"
     action 3.0 cli command "int fa0/1"
     action 4.0 cli command "shut"
     action 5.0 cli command "no shut"
     action 6.0 cli command "end"

  • Basic traceroute EEM script (for hop-by-hop network analysis)

    I'd like to do a hop-by-hop analysis by running a traceroute script that runs on an interval (say every 5-15 minutes) and puts output to a file.
    The goal is to let the script run for a day, and see what kind of hop changes might occur over time, and also monitor for any latency increase or packetloss at certain times of day (peak hours).
    If I used an EEM script to do a basic traceroute from one endpoint of the network to a server in the core (for instance), this could show how a client's path may be impacted during peak hours.
    I'd want the output stored in a file on the router's flash disk, and then I'd have to find some way to parse and analyze the output later (not sure how I'd do that, perhaps with excel or another diff-like program).

    Something like this should work for you.  In config mode, specify three EEM environment variables:
    event manager environment traceroute_timer 600
    event manager environment traceroute_target 10.1.1.1
    event manager environment traceroute_file flash:/traceroute.txt
    Then register this EEM Tcl policy:
    ::cisco::eem::event_register_timer watchdog time $traceroute_timer
    namespace import ::cisco::eem::*
    namespace import ::cisco::lib::*
    array set arr_einfo [event_reqinfo]
    if [catch {cli_open} result] {
        error $result $errorInfo
    } else {
        array set cli1 $result
    if [catch {cli_exec $cli1(fd) "enable"} _cli_result] {
        error $_cli_result $errorInfo
    if [catch {cli_exec $cli1(fd) "traceroute $traceroute_target"} _cli_result] {
        error $_cli_result $errorInfo
    set fd [open $traceroute_file a]
    puts $fd [clock format [clock seconds]]
    puts $fd $_cli_result
    close $fd
    # Close open cli before exit.
    catch {cli_close $cli1(fd) $cli1(tty_id)} result

  • HELP!! Need a script for DUMMIES for a simple login/register feature

    I know very little html and am more of a designer, but my programmer has let me me down so I have to take this on myself.
    I want to include a very common feature where visitors register to my site, so I can collect some information and contact details from them, then they can access hidden pages of the site and receive some exclusive download links by email, allowing them to download content (only once). They can then login each time they visit with a userID or email and a password.
    My host supports almost every scripting language.
    I've been told PHP is what I need, but I know absolutley nothing about it. My host said there is templates for such a simple script out there on the net for free but I'm being passed from pillar to post with scripts for much more complicated and rarer scripts than I need.
    Hope you can help.
    LB

    Do I need to create a database to store users info first?
    Yes. Without a database, it won't work.
    Is this a basic html page with a table with lots and lots or rows and columns for each of the details they have entered (e.g Name, DOB, Address.....etc)??
    No, I'm afraid not. Dreamweaver's PHP server behaviors work in conjunction with the MySQL database. If your hosting company supports PHP, you will almost certainly have access to a MySQL database and phpMyAdmin, a web-based program that helps create and maintain MySQL databases. As a minimum, your users table in the database will need three columns:
    user_id (a number that acts as the primary key for each record)
    username
    password
    You can also have other columns to store other details, such as first name, family name, and any other information that you want to store.
    If you have never done any PHP or database development before, this is going to be a major undertaking for you. The Adobe Developer Centre has some articles that show you how to set up a PHP/MySQL testing environment (http://www.adobe.com/devnet/dreamweaver/articles/setting_up_php.html) and create your first database-driven pages (http://www.adobe.com/devnet/dreamweaver/articles/php_event_registration.html). The Dreamweaver help files also step you through the process of creating a login system (http://help.adobe.com/en_US/Dreamweaver/10.0_Using/WScbb6b82af5544594822510a94ae8d65-7883a .html).
    Working with PHP/MySQL isn't difficult, but there's a lot to absorb. If you're going to start working with login systems and other database-driven features, you might find it useful to take a look at one of my books about Dreamweaver and PHP. I have different editions for Dreamweaver 8, CS3, and CS4. You can find more details at my website (http://foundationphp.com/).
    Good luck.

  • Need VB script for getting the IIS certification information

    Hi guys,
    I have totally 1000 IIS servers  2003 & 2008
    windows and some of the  servers configured
    IIS 3rd party Security certificates. I need a script to get the certification information like expiry date & certificate vendor name.
    Regards,
    SreeM

    Post here:http://forums.iis.net/
    Look in Gallery for IIS scripts:http://gallery.technet.microsoft.com/
    ¯\_(ツ)_/¯

  • Need antispam script for my website guestbook entries... recommendations?

    My guestbook on my website got so slammed by spambots that i had to take it offline. I would like to get one of those scripts where the person has to fill in what they see in a box (letters, numbers, etc) in order to make an entry into my guestbook. My web designers says that i need to find a script for this. Any recommendations? I don't even know what these scripts are called, making them hard to look for!
    He does the website work in Dreamweaver in Tiger, if that makes any difference. This is a guestbook that forwards entries to me as emails (they are not diplayed on the site)

    Unless I'm misunderstanding what you're trying to do, you don't need a preloaded for embed movies.  The page will load without any delay.  It's not until the user chooses to play a movie will it begin downloading / streaming it from the server.  Even if the video is a large file, internet users are use to this type of scenario where they choose to play a movie, ala youtube and others, that if their connections are slow there may be delays in video playback.  With all that said, I have seen and used page loaders where visitors will be expecting to wait a while for a result to happen, I just don't think this scenario warrants it.

  • Need Booklet script for CS3

    My computer bombed -- have CS3 installed on another, now I need the booklet script for CS3. A google didn't bring it up for me. . .
    Thanks
    Lamar

    Both scripts have always worked flawlessly for me. BuildBooklet merely shuffles the pages, so it doesn't change the page size at all (you need to check the spreads box when you export or print), but it does not handle objects that cross the spine. Neither one handles the second script does cross-spine objects, but does not do bleed.
    Perhaps you'll find what you want at Steve Sterling legacy ID imposition scripts

  • Need Edwardian Script for CS5- anyone know where I can get it?

    I have a client that wants Edwardian Script for her wedding video. I don't have it on any of my Adobe CS5 products. I do not want to join the cloud. Anyone know how I can get the font and use it with CS5?

    I saved the font to my C drive, and then re- launched PP.
    Saving the font will not show up in PP. You need to "install" the font into your "Fonts" directory. Did you install it or just save it? If you did not install it you should just be able to right click on the font and select to install it from the contextual menu. Once the font has been "installed" in your Fonts directory all of the apps will read it. I have Edwardian Script installed on my machines and the Adobe apps read them fine.

  • Need a script for archive/copy IMAP Emails older than 25 days to local mailbox

    Hi there,
    I am really troubling with archiving my IMAP mails. So far I was using standard rules, which have a major drawback - they only work on incoming mails. But I want to copy only mails to my local mailbox that are older than 25 days. The reason is that by copying all incoming mails, mail also copies all spam and unimportant mails into the local mailbox. However I only want to copy the mails that I was able to read and consider to be important, which I am able to do within a couple of days. However, I am not able to to that on a daily basis and that is why I chose the 25 days window, because my hoster deletes them automatically after 30 days. I read in a lot of forums that rules wont help, since they only work for incoming mails, therefore I am guessing that I would need a script because I want this to be automated and only applied to mails that passed the 25 day timeframe. Is the anybody that could help me out? Thank you so much in advance.

    Hi adayzdone,
    thanks for your reply but I am not a Gmail user, I am using Strato. Therefore the handy Google Scripts won't help.
    I need a script in Apple, that only copies or moves the mail from my inbox to a local mailbox once they are past the 25 days line. Within those 25 day I have deleted all unnessecary mails, marks or higlighted the important once and know only the remaining once are worth keeping. But I still want them to be available in Mail and none of those archiving solutions that create pdfs or import them into their one database will help.

  • Need XML APIs for finding server status details

    Hi,
    Can any one help me with the XML API format for finding server status details like Admin State,Avail State,Assoc State,etc.
    Thanks and Regards
    -Prateek

    Here is a very basic example.  I pulled out all the extra error trapping / logging.  I have been building a module that simplifies  most of this .. will produce simple Dumper output for what you are generally looking to do.
    The below example will connect to a default UCSM emulator ( http://developer.cisco.com/web/unifiedcomputing/start ) .. just change IP to match.  If you want a significantly more detailed information ( hierarchical ) ... change inHierarchical="false" to  inHierarchical="true".
    Let me know if you want something more specific.
    #!/usr/local/bin/perl
    use strict;
    use warnings;
    use Data::Dumper;
    use LWP::UserAgent;
    use HTTP::Request::Common;
    use XML::Simple;
    use POSIX;
    $Data::Dumper::Purity = 1;
    $Data::Dumper::Useqq = 1;
    ### Configurables
    my $ucsm = "10.#.#.#";
    my $user = "config";
    my $pass = "config";
    my $proto = "http";
    my $cookie;
    my $xml = XML::Simple->new();
    my $xml_blade = XML::Simple->new(ForceArray => ['computeBlade']);
    ## Setup User Agent
    my $ContentType = "application/x-www-form-urlencode";
    my $userAgent = LWP::UserAgent->new(agent => 'perl post');
    $userAgent->timeout(5);
    &connect;
    my $blades = &getblade;
    print Dumper $blades;
    &disconnect;
    ### Subroutines
    sub connect {
       my $message = q();
       print 'http://'.$ucsm.'/nuova\n';
       my $response = $userAgent->request(POST $proto.'://'.$ucsm.'/nuova', Content_Type => $ContentType, Content => $message);
       my $xml_ref = $xml->XMLin($response->content);
       $cookie = $xml_ref->{outCookie};
    sub getblade {
       my $message = q();
       my $response = $userAgent->request(POST $proto.'://'.$ucsm.'/nuova', Content_Type => $ContentType, Content => $message);
       my $xml_ref = $xml_blade->XMLin($response->content, keyattr => []);
       return $xml_ref->{outConfigs};
    sub disconnect {
       my $message = q();
       my $response = $userAgent->request(POST $proto.'://'.$ucsm.'/nuova', Content_Type => $ContentType, Content => $message);

  • Help... Need a script for DVD@CCESS (DVDSP 4.0.3)

    Can anyone help me with a scripting question:
    I need a script that will allow me to search a windows pc for installed or missing DVD@CCESS, - promt for installation, and then install, - or pass on to play the DVD from first play. Obviously DVD@CCESS will be on the DVD in a directory ([email protected])
    Thank you....
    Verny

    Verny - welcome to the discussions.
    The person who I know has done this is Alex Alexzander. You can contact him over at http://www.editorsbin.com
    He is changing the site at the moment and may not have that particular tutorial online, but he definitely wrote it and created the scripts needed to get it working.

  • Need  Shell Script  for picking the files

    Hi,
        I want to write a shell script for piking the files in a sequence order (according to filename with time stamp)  from the sorce FTP server ..
                     Requirement is  in the source directory I'm getting files (Jain_1.xml  , Jjain_2.xml, Jain_3.xml .. ect..)  at  present my file adapter is picking all the files at a time  but  i want to pick  one by one... that to first i want to Jain_1.xml  after finish the processing of the file then only my file adapter should  pick the next file ( Jain_2.xml )  .
                  so..  all the forum mates suggest me to write a shell script..  but where  i have to write the s hell script. and where i have to deploy this script.... my Xi is running on UNIX ... so please sugest me  the procedure ...
    Regards
    Jain

    Hi,
    Why dont you use the option EOIO in which files will be picked up in order and will be proccessed in sequence....one after another....
    Regards,
    Sreeni.

  • Need shell Script for Invalid object

    Hi All,
    Can anyone post me a script for checking the invalid objects in 10g/11g database.
    The should should check for invalid objects,recompile and sent the email .

    I could think fo something like below(And applicable to multiple SID's running on the server) and i tested it it works(bash shell script)
    Assumptions:
    You have environmental file to set ORACLE_HOME ORACLE_SID
    say in this example
    /oracle/env
    ls -ltr
    env_ORCL.sh
    env_TEST.sh
    env_HR.sh
    You also have uuencode rpm installed to use along with mailx command(or else get it installed not big deal). uuencode is required
    to send as mail attachment
    1)I have kept SID list in file (/oracle/INVALID directory for eg)
    cat SID.lst
    ORCL
    TEST
    HR
    If you have lot of SID's you can populate the file using ( ps -ef|grep -i pmon | grep -v grep | awk '{print$9}' | sed 's/ora_pmon_//g' > SID.lst)
    2) Here are the list of SQL's(/oracle/INVALID directory
    cat invalid_pre.sql (For listing invalid objects per instance)
    set echo off
    set heading off
    set time off
    set timing off
    spool invalid.log append
    break on instance_name
    select instance_name , a.*
    from (select owner,count(*) from dba_objects where status='INVALID' group by owner) a, v$instance;
    spool off
    exit;
    cat invalid_compile.sql--to recompile invalid objects
    set echo off
    set termout off
    set feedback off
    @?/rdbms/admin/utlrp.sql 4; (Note you change degree 4 or 8 accordingly)
    exit;
    cat invalid_post.sql--to list post recompilation
    set echo off
    set heading off
    set time off
    set timing off
    spool invalid_post.log append
    break on instance_name
    select instance_name , a.*
    from (select owner,count(*) from dba_objects where status='INVALID' group by owner) a, v$instance;
    spool off
    exit;
    3)here is the shell script
    cat invalid.sh
    for i in `cat SID11g.lst`
    do
    cd /oracle/env/
    source env_$i.sh
    cd /oracle/INVALID
    sqlplus "/as sysdba" @invalid_pre.sql
    sqlplus "/as sysdba" @invalid_compile.sql
    sqlplus "/as sysdba" @invalid_post.sql
    done
    uuencode invalid.log invalid.log | mailx -s "Invalid" <your mail id>
    uuencode invalid_post.log invalid_post.log | mailx -s "Invalid" <your mail id>
    4) Finally run the shell script, hopefully you should receive email :-)
    I have tested it on bash
    ./invalid.sh
    Once tested you can schedule it in cron
    Edited by: vreddy on Jul 19, 2012 9:57 AM

Maybe you are looking for

  • How can I Display my Reports in Excel sheet?

    Hello, I have developed my reports using oracle report Developer 6i, I am getting output in PDF and HTML CSS by the the parameter DESTYPT=HTML CSS/PDF through web. 1.Now I want to show reports in Excel sheet also through web using 9 Internet Developm

  • RFC sender communication channel

    Hi, I am working on RFC->XI->SOAP scenario. In R/3, I maintainted an RFC destination with program id same as RFC sender CC  in XI, Gateway and host of XI server. But when i test connection the RFC destination, I am getting the following error. /CPIC-

  • Re compt to tv hook up

    I'm wanting to hook up my tv to my compt.  I want to use my big screen tv like a monitor and use the computer as normal, and i also want to be able to download movies to the computer and watch them on that screen?  My tv and my compt are compatible,

  • CMP2 Timestamp dbschema Oracle 9i release 2 problem in mapping

    Dears, I'm using SUN ONE 7 platform update 2. I have been getting ClassCastException in a timestamp field in the DB, I saw the dbschema, and I found the type is 1111 which is OTHER, not 93 which is timestamp, but when I changed it manually it didn't

  • Faulty wraping of a report

    Hi, We have a customized program for a material report. This program is working fine for all other plants except one. The report is not wrapped properly for one plant. the last column is going to 2nd row for each line. Can anyone please help to fix t