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 ...

Get JUNOS Automation Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.