This script will grab the CDP neighbor name and add it to the interface that it's configured on.
Script-Filter: $vendor eq "Cisco" and $sysdescr like /IOS/ ######################################################################## Action: Execute Command Batch Action-Commands: sh int trunk | inc trunking Output-Triggers: Parse Output ######################################################################## Trigger: Parse Output Trigger-Variables: #This regex finds the interfaces $cdpport /((Gi|Fa)+\d+(\/\d{1,2}|\/\d{1,2}\/\d+|\/\d{1,2}\.\d+|\/\d{1,2}\:\d+)?|\w+-\w+\d{1,3})/ Trigger-Template: [[$cdpport]]\s.+on\s.+802.1q\s.+trunking\s.+ Trigger-Commands: sh cdp ne $cdpport Output-Triggers: Show CDP ##################### Trigger: Show CDP Trigger-Variables: $cdpname /\w.+/ Trigger-Template: Device.+ [[$cdpname]]\..+\..+ .+ Trigger-Commands: DEBUG: conf t DEBUG: int $cdpport DEBUG: desc $cdpname
File attachments:
Archived:
Select a category:
Section: