02-12-2018 07:22 PM - edited 03-01-2019 02:57 AM
Hi Guys,
I have some doubts with the script , Actually I am trying to develop a script for auto port description update using EEM.
I found there is a old script in the forum already but i need to make some changes in them.
The below script seems to be the old one:
event manager applet update-port-description
event neighbor-discovery interface regexp GigabitEthernet.* cdp add
action 1.0 cli command "enable"
action 2.0 cli command "config t"
action 3.0 cli command "interface $_nd_local_intf_name"
action 4.0 cli command "description $_nd_cdp_entry_name:$_nd_port_id"
My requirements:
> I want to add Circuit ID information in the port description
> I want to add the clock time in the port description as well.
Please help me in completing the script.
Detailed View :::::::::::
This script provides neighbor device name and local port connected in the interface description:
event manager applet update-port-description
event neighbor-discovery interface regexp GigabitEthernet.* cdp add
action 1.0 cli command "enable"
action 2.0 cli command "config t"
action 3.0 cli command "interface $_nd_local_intf_name"
action 4.0 cli command "description $_nd_cdp_entry_name:$_nd_port_id"
Output :
description SDCC_IDF_1.11:TenGigabitEthernet0/1
For example we have 24 Interfaces in a switch
1> Along with the above obtained output I need to add Circuit ID only in certain Interfaces.
Example :
switch 11 # sh int gi1/0/6 description
Desxcription : switch 12 : gi1/0/12 : Circuit ID 12345XXX
2> Along with this I need to add time of the latest description updated to this interface.
Example :
switch 11 # sh int gi1/0/6 description
Desxcription : switch 12 : gi1/0/12 : Circuit ID 12345XXX : 8:31:40 11 Feb 2018
Can you help me modifying the script !
02-20-2018 03:18 PM
try to post on EEM Scripting - Cisco Support Community
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide