EEM script to check running-config startup-config changes after reloading

I'm trying to follow a bug that causes some CLIs to disappear from the running-config after you reload the router.

The LCIs were saved in the startup-config before reloading the router.

Is there an EEM to compare the running-config startup-config online with after reload of the router and syslog lines that are missing from the running-config?

You could do something simple like:

Event Manager applet config compare

event timer cron cron-entry "@reboot".

command action 1.0 cli 'enable '.

cli 2.0 action command "show archive config diff nvram:startup - config system: running-config.

post 3.0 action to "[email protected] / * /'from'[email protected] / * /" Server "10.1.1.1" topic "Config diffs" body "$_cli_result".

Tags: Cisco Network

Similar Questions

  • 'copy running-config startup-config' CCNP 300-115

    Hello everyone,

    The 'copy running-config startup-config' command does not work in the certification exam. What is the problem?

    Any help is welcome!

    Thank you!

    Just use "wr mem" instead, does it work?

  • How do I save a tech 'show' and a 'running config"of MDS switches

    Hi, guys

    I am a newbie of DMS switches.

    but I had a request this week asking me to actively save a tech 'show' and a 'running config"MDS switch...

    so my questions are:

    (1) if I want to save the configurations of MDS, including commnds should I launch? or simply 'see the tech' enough?

    (2) is that the MDS itself have the Save function? for example, you can ftp configuration somewhere?

    Please help point me in the right direction or y at - it of the official referece docs that I can refer?

    Thanks in advance!

    (1) the configuration of MDS backup that you want to run this command:

    copy running-config

    and then, you have several options where you can send in for example you could tftp it

    copy the running-config tftp://yourftpserver/mdsbackup.txt

    (2) I don't think there is a native solution that performs scheduled backups, but that is easy to write a small bash/perl script.

    @dynamoxxx

  • "Show running-config" to show the output as 'technical support Show.

    Hello

    I was wondering if there was a command (maybe hidden in IOS) which would allow the release of 'show running-config' to hide passwords and SNMP community strings, a bit like when you perform a command "show support"? I'm trying to limit what a customer sees (using a GANYMEDE server +) and I just want to give them another command that would accomplish this goal. Any clue?

    Thank you

    neocec

    a. Unfortunately not. You can use 'password encryption service' to encrypt your passwords. This way your passwords are not in clear text.

    b. you can then activate levels of privilege to different users and restrict access to what a user can execute commands. For example, that a user cannot perform "show tech" or "show run" at all.

    c. but in this way, you can view the output of a command completely, or restrict access to the command completely. We can not selectively display items of an output differently to different users.

    d. you can also explore using the Protocol. SNMPv3 SNMPv3 provides a security model defining new concepts to replace username - old authentication community-based and provide the privacy of communication through encryption.

    SID Chandrachud

    TAC security solutions

    Customer support engineer.

  • EEM Script works only with IP SLA

    I created script linked to SLA of intellectual property.  If the IP SLA is violated, we want the script to run and stop bgp peers and send syslog messages and can send by e-mail.  I get alert on ALS IP missed, but nothing else happens so screwed up the script in any way. This is the first time using EEM scripting if any help would be great.  Given that we have never used EEM scripting in this place the version that we would use is the default version provided with SRI 4451 in 2015. I do not know if what counts.

    Thank you

    ALS IP 1
    ICMP-echo 8.8.8.8 source-interface GigabitEthernet0/0/1
    threshold 2
    frequency 5
    IP SLA annex 1 point of life to always start-time now
    activate the IP sla response alerts

    track 1 accessibility of als 1 ip

    Event manager E-MAIL ISSUE INTERNET SERVICE PROVIDER environment
    Event Manager environment _email_server 10.1.1.3
    Event Manager environment _email_to [email protected] / * /
    Event Manager environment _email_from [email protected] / * /

    BGP_NEIGHBOR_DOWN event manager applet
    SHUTDWON BGP PEERING description IF IT IS PROVIDER of QUESTION
    event track 1 State
    command action 1.0 cli 'enable '.
    Action 1.1, «config t» cli command
    Action 1.2 cli command 'router bgp 10125 ".
    Action 1.3 cli command "neighbor x.x.x.x stop."
    Action 1.4 cli command "end".
    Action 1.5 syslog-msg 'PROVIDER NETWORK PROBLEM DETECTED, BGP PEERING SHUTDOWN. '
    EMAIL_BGP_PEER_DOWN event manager applet
    Description EMAIL BGP PEER DOWN
    event track 1 State
    action 1.1 mail server "$_email_server" to "$_email_t" of ' $_email_from ' topic ' vendor number: PING FAILED "body"Ping Google's failed. "
    Action 1.2 syslog msg ' EMAIL SENT to $_email_to.
    !

    Then configure:

    Event manager cli username USER session

    Where the USER is a user authorized to execute all CLI commands in your strategies of EEM.  Or add "auth bypass" at the end of each config applet.

  • script to check my current reserves of CPU and memory on the service console

    Hello

    I'm looking for a script to check that reserve is currently, we are running out of problems with vRanger connection, just need to make sure we have all the cpu and memory to the correct value.

    found a few scripts to change, that we guys do you use?

    Thank you

    The script required PowerShell v2.

    Try this if you use PowerShell v1.

    filter Get-ConsoleResource{
         param(
              $entity
         )
    
         begin{
              $result = $null
         }
         process{
              if($_.Key -eq "host/vim/console"){
                   $_
              }
              if($_.Child){
                   $_.Child | Get-ConsoleResource
              }
         }
         end{
         }
    }
    
    Get-View -ViewType HostSystem | %{
         $esx = $_
         $_.SystemResources.Child | Get-ConsoleResource | Select @{N="Name";E={$esx.Name}},
              @{N="Console Reservation CPU MHz";E={$_.Config.CpuAllocation.reservation}},
              @{N="Console Reservation Memory MB";E={$_.Config.MemoryAllocation.reservation}}
    }
    

    ____________

    Blog: LucD notes

    Twitter: lucd22

  • TCL EXEC command is not available in the EEM scripts

    Hi all

    I'm writing a script that checks the ip address assigned to an interface (assigned by PPPoE Dialer) verifies a FULL domain name resolution and if the two IP match not retrieve a URL so update a dynamic DNS (I know that there is a support built into IOS for DNS, dynamic but it does not always work and I make sure that I can reach the router remotely).

    The question is when I run the script from the CLI, it seems to work when I save in the infrastructure of the EEM it seems certain command failed

    as exec or using the standard library of http.tcl:

    Is there a limitation? I couldn't find anything, and I know that what works in the TCL CLI interpreter working in the scripts of the EEM.

    Any toughts?

    Fabio

    11 Dec 08: 12:00.275: % HA_EM-6-LOG: ddnsupdate.tcl: invalid command name "exec".

    11 Dec 08: 12:00.275: % HA_EM-6-LOG: ddnsupdate.tcl: when running

    11 Dec 08: 12:00.275: % HA_EM-6-LOG: ddnsupdate.tcl: "exec" show ip interface brief | "exclude not assigned.

    11 Dec 08: 12:00.275: % HA_EM-6-LOG: ddnsupdate.tcl: called from inside

    11 Dec 08: 12:00.275: % HA_EM-6-LOG: ddnsupdate.tcl: "$slave $Contents eval.

    11 Dec 08: 12:00.275: % HA_EM-6-LOG: ddnsupdate.tcl: (procedure "eval_script" line 7)

    11 Dec 08: 12:00.275: % HA_EM-6-LOG: ddnsupdate.tcl: called from inside

    11 Dec 08: 12:00.275: % HA_EM-6-LOG: ddnsupdate.tcl: "eval_script slave $scriptname.

    11 Dec 08: 12:00.275: % HA_EM-6-LOG: ddnsupdate.tcl: called from inside

    11 Dec 08: 12:00.275: % HA_EM-6-LOG: ddnsupdate.tcl: "If {$security_level == 1} {#untrusted script.

    11 Dec 08: 12:00.275: % HA_EM-6-LOG: ddnsupdate.tcl: create an interp - slave

    11 Dec 08: 12:00.275: % HA_EM-6-LOG: ddnsupdate.tcl: interp share {stdin slave

    11 Dec 08: 12:00.275: % HA_EM-6-LOG: ddnsupdate.tcl: interp share {} stdout slave

    11 Dec 08: 12:00.275: % HA_EM-6-LOG: ddnsupdate.tcl:... »

    11 Dec 08: 12:00.275: % HA_EM-6-LOG: ddnsupdate.tcl: (file 'tmpsys:/lib/tcl/base.tcl' line 50)

    11 Dec 08: 12:00.275: % HA_EM-6-LOG: ddnsupdate.tcl: Tcl run policy has failed:

    11 Dec 08: 12:00.275: % HA_EM-6-LOG: ddnsupdate.tcl: invalid command name "exec".

    11 Dec 08: 12:05.599: % PARSER-5-CFGLOG_LOGGEDCMD: user: fabio connected command:! exec: activate

    11 Dec 08: 12:24.823: % PARSER-5-CFGLOG_LOGGEDCMD: user: fabio connected command: no event handler political ddnsupdate.tcl

    Hi Fabio,.

    EEM manages TCL Safe-TCL mode.  It is documented here:

    http://www.Cisco.com/en/us/docs/iOS/NetMgmt/configuration/guide/nm_eem_policy_tcl.html#wp1174624

    Exec is not allowed Safe-Tcl.  The right way to do this from EEM is to use the cli EEM library, open an ATS with cli_open, send the commands you want and read the responses using cli_write/cli_read or cli_exec, and then close the CLI if you want using cli_close or leave the end of the script.

    Mike

  • 'Domain' or 'nameserver' record after reloading config

    Hello

    Anyone can please clarify.

    I have configured the domain/server details of names (1602i and 1042n) APs of a WLC (8500 series, through command not by the browser) and the APs take successfully the config. I checked this by telnet in the AP and takes a run "sh", which displays the details of domain/server names.

    However as soon as the AP is reloaded, the information is lost on the access point itself. Although the controller always indicates the configuration, information on the PA are gone. "Sh run" only displays no nameserver/estate details more.

    Anyone have any ideas why?

    I certainly saved the details of the access point after reload (including a wr mem) but nothing. I tried several APs and it happens with all.

    Thank you

    Matt

     I have configured the APs domain/nameserver details (1602i's and 1042n's) from a WLC (8500 series, through command not through the browser) and the APs successfully take the config. I've checked this by telnetting into the AP and inputting a 'sh run' command, which displays the domain/nameserver details.

    It is a 'normal' behavior  All the configuration is done on the WLC.  Any configuration made about to access is NOT stored by the AP.

    Information about the domain or server name is always made on the WLC.

  • Acrobat - if checkbox is enabled to run a javascript, if not checked run another

    I have two javascripts. I want one of them to run if a checkbox ("Start-up" form field) is enabled and the other to run if the box is unchecked. It would be great if someone could tell me if this is possible and how I need to change the javascript code to make it happen.

    It's the script 'Start-up' is not checked:

    var v = this.getField("PIF").value;

    If (v, '1') event.value = "";

    else if (v > = "1", v < = 1499) event.value = "1";

    else if (v > = '1500', v < = 2999) event.value = "2";

    else if (v > = "3000", v < = 5999) event.value = "3";

    else if (v > = "6000", v < = 8999) event.value = "4";

    else if (v > = "9000") event.value = "4B";

    etc.

    else event.value = "";

    And here's the javascript code if "Startup" is checked:


    If (v, '1') event.value = "";

    else if (v > = "1", v < = 300) event.value = "Start Up - S ';

    else if (v > = "301", v < = 700) event.value = "Start Up - M ';"

    else if (v > = "701") event.value = "Start Up - L";

    Any help with this issue is so appreciated!

    Try using this code:

    var v1 = getField("Start-up").value;

    var v2 = getField("PIF").value;

    If (v1 == 'Yes') {}

    Run the startup script

    If (v2 > = 0 & v2)<=300) event.value="Start Up-S">

    ElseIf (v2 > = 301 & v2)<=700) event.value="Start Up-M ">

    ElseIf (v2 > = 701) event.value = "Start Up - L";

    else event.value = "";

    }

    on the other

    {

    Run the regular script

    If (v2<1) event.value=" ">

    ElseIf (v2 > = 1 & v2)<=1499) event.value="1">

    ElseIf (v2 > = 1500 & v2)<=2999) event.value="2">

    ElseIf (v2 > = 3000 & v2)<=5999) event.value="3">

    ElseIf (v2 > = 6000 & v2)<=8999) event.value="4">

    ElseIf (v2 > = 9000) event.value = "4B";

    else event.value = "";

    }

    }

  • How to set the function key that you want to run at startup?

    Hello
    I have a problem until I realized that the special function working keys such as high brightness down
    but now, you must open the application feature keys to make it work. I tried the bios settings, but it wasn't the problem. I think the question is how can I get the program feature keys to run at startup.

    Also another problem, I noticed that my display setting is a bit. I tried calibration using the default windows application, but my only question is that when I get to the step of contrast, everything I do is brightness adjustment and nothing else is there another keyboard button on the device that I can use, rather than the keys of brightness, change contrast?

    Thanks I know I had a handful.

    I put t know which model of laptop and what OS you use and I assume that you are writing about the key features of FN and maps flash, right?

    By default, Toshiba flash cards must start with Windows and must be enabled in the boot options.
    If you want to check this option start run (Win + R key), put msconfig and click OK.
    When the configuration of the system is open, go to the Startup tab and check if there is a check mark before Toshiba Flash cards. If it isn't put there and confirm with OK.

    This problem with the display is really strange to me. If you use the right display driver everything should be OK and he didn't need a calibration or anything else.
    When you have bought this laptop and started to use it were there, everything is OK with the display? I think so.

    Your laptop factory settings or you use clean install of the OS?

  • Windows Installer running on startup

    How to stop windows running at startup Setup > it starts running as soon as I turn on the computer, and then request a disk etc cannot get rid of it. Also did a search on the computer to try to uninstall Cup could not know where he is. Thanks for any help!

    Hi TomiJB,

    You are facing this problem because of startup programs on your computer. Once your computer starts, the startup items are loaded. Among the startup items run a Setup. We need to perform a clean boot process to determine which startup item is causing the problem. Please follow the steps below to clean boot:

    1. sign the computer by using an account with administrator rights.

    2. click on start to reduce this includes this image, type msconfig.exe in the box Start Search and then press ENTER to start the System Configuration Utility.Collapse this includes this imIf that you are prompted for an administrator password or for confirmation, type your password or click continue.

    3. on the general tab, click Selective startup, and then clear the Load Startup items check box. (The box use the Boot file is not available.)

    Note Following this step lets services Microsoft continue to run. These services include networking, Plug-and-Play, record of events, error reporting, and other services. If you disable these services, you can permanently delete all restore points. Do not do this if you want to use to restore the system with the existing restore points.

    4. click OKand then click restart.

    Determine whether the problem returns

    Enable half of the startup items

    1. perform a clean boot by repeating step

    a. click on the Startup tab and then click to select half of the check boxes in the startup item list.

    b. click OKand then click restart.

    If the problem persists, repeat steps 1 and 4. In step 4, click to clear half of the check boxes that you have originally selected in the startup item list.

    If the problem does not occur, repeat steps 1 and 4. In step 4, select only half of the remaining check boxes that are cleared in the startup item list. Repeat these steps until you have selected all the check boxes.

    If only one startup item is selected in the startup item list, and you still experience the problem, start selected in the list element is the service that is causing the problem.

    Solve the problem

    After you determine the startup item or the service that is causing the problem, contact the manufacturer of the program to determine if the problem can be solved. Or, run the System Configuration utility, and then click to clear the check box of the element of the problem.

    Reset the computer to start as usual

    When you are finished troubleshooting, follow these steps to reset the computer to start as usual:

    a. click on start to reduce this includes this image, type msconfig.exe in the Start Search box and press ENTER. Collapse this includes this imageIf you're

    b. you are prompted for an administrator password or for confirmation, type your password, or click continue.

    On the general tab, click the Normal startup option, and then click OK.

    c. When you are prompted to restart the computer, click restart.

    You can also follow this link for the article:

    http://support.Microsoft.com/kb/929135

    Concerning
    Rehman - Microsoft Support

  • How can I stop CHKDSK from running on startup?

    CHKDSK turned on somehow and now every time I start my Pc it runs this program.  It is on my hard drive and takes a long time to startup!  How can I stop the program from running at startup?

    The next time your system starts and installs, you should check the bit of impurity of the volume as follows:

    Click Start, run and enter in the box:

    cmd

    Click OK to open the command prompt window.

    To query the bit of impurity on drive C, type:

    fsutil dirty query C:

    The sample output:
    Volume c is dirty
    Volume C: is dirty

    Type "exit" to close the command prompt window.

    Is your disc dirty or it is not dirty?    If you have more than one volume, check all out them.

    A volume is marked usually dirty of a power outage or something like using the power button to restart the system.  One of this kind of thing has happened before this problem?

    The command chkntfs /d to clear a chkdsk waiting you plan yourself, but it does not clear the dirty bit.

    The command chkntfs /X C: never say XP check the reader for inconsistencies again and perhaps not a good idea since the reader may really need that chkdsk to run on it.  If the dirty bit is just NOT clear, no matter what you do, your HARD disk may be failing / failed.

    The only way to clear the dirty bit is a success of chkdsk /r and if she will not clear at the start of your system, I would run it from the XP Recovery Console so you can watch it run and if you like, run it again until it runs its own.  You cannot check the good bit of impurity of the XP Recovery Console, but you can see what chkdsk/r.

    Since we don't know anything about your system, here are some instructions for making a CD of bootable XP Recovery Console and from there, you can run chkdsk/r until it comes clean.

    Boot into the Recovery Console Windows using an XP bootable installation CD.

    If you have no XP bootable media (or aren't sure you have) create a bootable XP Recovery CD of Console and do not forget.

    This is not the same as recovery disks that might have come with the acquisition of the system store.

    You can make a bootable Recovery Console CD by downloading an ISO file and burn it to a CD.

    The ISO bootable image file you need to download is called:

    xp_rec_con. ISO

    Download the ISO from here:

    http://www.mediafire.com/?ueyyzfymmig

    Use a new CD and this simple and free program to burn your ISO file and create your bootable CD:

    http://www.ImgBurn.com/

    When you install ImgBurn, DO NOT install the Ask toolbar.

    Here are some instructions for ImgBurn:

    http://Forum.ImgBurn.com/index.php?showtopic=61

    It would be a good idea to test your bootable CD on a computer running.

    You may need to adjust the computer BIOS settings to use the CD-ROM drive as the first device to boot instead of the hard drive.  These adjustments are made before Windows tries to load.  If you miss it, you will need to restart the system again.

    When you start on the CD, follow the instructions:

    Press any key to boot from CD...

    Installing Windows... going to pronounce.

    Press 'R' to enter the Recovery Console.

    Select the installation that you want to access (usually 1: C:\WINDOWS)

    You may be asked to enter the password (usually empty).

    You should be in the folder C:\WINDOWS.  It's the same as the

    C:\Windows folder that you see in Solution Explorer.

    The Recovery Console allows base as file commands: copy, rename, replace, delete, chkdsk, fixboot, fixmbr, cd, etc.

    For a list of the commands in the Recovery Console, type help at the prompt of commands or read on here XP Recovery Console:

    http://www.Microsoft.com/resources/documentation/Windows/XP/all/proddocs/en-us/recovery_console_cmds.mspx?mfr=true

    A good idea before you start things must first verify the integrity of your file system by using the chkdsk command.

    In the command prompt window, run the chkdsk command on the drive where Windows is installed to try to fix any problems on the afflicted player.

    Running chkdsk is fine, even if he finds no problem.  It won't hurt anything to run it.

    Assuming your boot drive is C, run the following command:

    CHKDSK C: /r

    Let chkdsk finish to correct the problems, he could find.

    It may take a long time for chkdsk complete or they seem to be "stuck".  Be patient.  If the HARD drive led blinks always, chkdsk is something.  Keep an eye on the amount of the percentage to be sure that it is still making progress.  It may even seem to go back sometime.

    You must run chkdsk/r again until it finds no error to correct.

    Remove the CD, and then type "exit" to exit the RC and restart the computer.

    You have not to set the BIOS to boot the disk HARD since the CD won't be.

  • Remove some programs from running at startup

    How can I remove some programs from running at startup? for example, Super Anti Spyware, automatically runs on startup and is listed in the lower right corner of my desk drawer, but it really slows my time to go on the internet. I only have access if necessary.

    You can click on start > run > msconfig

    then under the Startup tab, you will find a list of programs that launch at startup of windows.   they are activated by a check mark.

    In addition, you can check the services through the services tab.

    Select / check "hide microsoft services" and then what remains on the revised list are non-microsoft programs you have added to the system and are also expected to start automatically.

    don't forget to click 'apply' for the changes you make and then restart to see the effects.

  • Autoexec.bat does not run at startup.

    I have a file Autoexec.bat file which works fine when I run it, but does nothing, apparently, at startup.  It has orders to clear my recent documents folder.  It worked fine when starting until I had to format my hard drive and start all over again, and as I said, it works fine when operating manually.  No idea how to do so that he can run at startup?

    Hi bbran,.

    1. your computer is running on a domain?

    Autoexec.bat does not work on startup, but when the user connecting.
     
    The first thing to test when you are having problems with MS-DOS-based programs is the Windows BACK NTVDM (Virtual Machine) subsystem. You can use the Command.com utility to test whether the NTVDM subsystem works correctly. To start Command.com, follow these steps:
    a. click the Start button and then click Run.
    (b) in the Open box, type command.com, and then click OK.
     
    This should start a command prompt window. If this does not work, then there is a problem with the NTVDM subsystem.
    For more information, see programs running under MS-DOS in Windows XP

    We also recommend you to check if the program is configured to run automatically at startup.
    See related changes that run automatically at startup

    Visit our Microsoft answers feedback Forum and let us know what you think.

  • Error: "cannot open Volume for Direct access" is displayed when Chkdsk runs at startup

    Original title: Edit/Fix key in my registry

    CHKDSK keeps trying to run during startup, but "cannot open volume...". "If I can solve this problem, I want to put it in the manual, not automatic.      My registry key: "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\rchelp is missing.   Can I remedy this by creating a text file with an REG extension and if so, where can I find the exact measurements to do?  It is the DOS Cmd or in Notepad?

    Hi BarneyBear,

    1 did you allow that chkdsk runs successfully at the start of the system?

    Editing registry is not necessary here. We recommend you to check if the disk check is scheduled.

    This problem can be solved by installing the latest service pack Windows XP.
    See the error message "Impossible open Volume for Direct access" When Chkdsk runs at startup

    See also, Chkdsk.exe or Autochk.exe starts when you try to shut down or restart your computer

    Visit our Microsoft answers feedback Forum and let us know what you think.

Maybe you are looking for