How to do it…

Take a structured approach to event script debugging. Don't let the disassociation between the execution of the code and the actions of the user frustrate you. Work through these check items step-by-step to help find where your code is diverging from expected behavior and why. Apply patience.

  1. First of all, start with the event policy configuration that is supposed to be firing your event. Is it configured correctly? It must define the event to match and the action to take. If you want to capture the output then you also need to specify an output-filename and a destination. The events can be multiple in nature, in which case your event script should be called when any of the events fire.
  2. Next look at how your policy interacts ...

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.