O'Reilly logo

JUNOS Automation Cookbook by Adam Chappell

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

JUNOS OS event policy

In order to get the JUNOS OS device to signal when a user has made a configuration change, we use the event policy framework to define rules and actions for when events occur. We trap the event that occurs when a commit operation has been completed:

adamc@router> help syslog ui_commit_completed Name:          UI_COMMIT_COMPLETEDMessage:       commit completeHelp:          'commit' operation completed successfullyDescription:   Changes to the candidate configuration were committed successfully.Type:          Event: This message reports an event, not an errorSeverity:      warningFacility:      ANY

We then use the execute-commands action in order to tell JUNOS that when the event occurs it should run a series of operational mode commands. In this case, we run two ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required