cancel
Showing results for 
Search instead for 
Did you mean: 
Create Post
Level 8

Shutdown Interface using NCM, Powershell or Python?

Jump to solution

Is there a way to shutdown an interface after a certain amount of time being down? I'm trying to create an alert that will email stating it is down (this part works) then the escalation portion will then run an ncm script or external script to shutdown the interface. Is this possible?

pastedImage_0.png

1 Solution

It is not clear if you have the time period covered, but this will simply be part of the trigger filter using the 'Last Status Change' value.

Make sure in the Alert Object setting on Trigger tab you select Interface, so that the Interface variables are available to pass to the Execute NCM Action.

Write out your command to shut the interface eg.

conf t

interface ${N=SwisEntity;M=InterfaceName}

shut

end

Copy run start

View solution in original post

4 Replies

It is not clear if you have the time period covered, but this will simply be part of the trigger filter using the 'Last Status Change' value.

Make sure in the Alert Object setting on Trigger tab you select Interface, so that the Interface variables are available to pass to the Execute NCM Action.

Write out your command to shut the interface eg.

conf t

interface ${N=SwisEntity;M=InterfaceName}

shut

end

Copy run start

View solution in original post

Hi m_roberts

Could that action "be vendor agnostic" ?

Cisco/Juniper/HP...

0 Kudos

Yes, that is the beauty of NCM, in that the Execute Script function in the alert is simply a box you can type out the appropriate command syntax for the device you are applying the change to.

Therefore, when you are creating your alert, you may have an alert definition for devices that support Cisco IOS commands within the action of the alert and then a separate alert which will have the syntax for Junos. Each alert will simply need a filter on the Trigger Filter page so that the specific vendors are included only to match the alert action definition.

0 Kudos

This works, thank you Mark!