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 O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.