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

The steps are as follows:

  1. On the JUNOS host, configure an event handling policy that should be run in response to the configuration commit completions and specify an archive repository for uploading files. Use the execute-commands mechanism to run a series of JUNOS OS commands in response to the event:
      adamc@router> show configuration event-options       policy CONFIG-DIFF {          events ui_commit_completed;          then {              execute-commands {                  commands {                      "show configuration | match Last\ commit:";                      "show configuration | compare rollback 1";                  }                  output-filename commit;                  destination NMS;                  output-format text;              }          }      }      
  1. Repeat this step for any and all JUNOS devices that you want to monitor in this manner.
  1. Optionally, make some test commit operations ...

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