[Contents] [Prev] [Next] [Index] [Report an Error]

Installing Event Scripts

To install event scripts on the router, follow these steps:

  1. Write an event script.

    For more information on writing event scripts, see Introduction to Writing Automation Scripts. For event script examples, see Automation Script Examples.

  2. Copy the script to the /var/db/scripts/event directory for the hard drive or the /config/script/event directory for the flash drive. Only users in the superuser JUNOS login class can access and edit files in the /var/db/scripts/event or the /config/script/event directories.

    Note: If a platform has dual Routing Engines and you want the script to take effect on both Routing Engines, you must copy the script to the /var/db/scripts/event directory on each Routing Engine. The commit synchronize command does not automatically copy the scripts from one Routing Engine directory into the other Routing Engine directory.

  3. Add the event script to the [edit event-options event-script] hierarchy level by including the file statement. Only users in the superuser class can add event scripts to the configuration.
    [edit event-options event-script]
    file filename;
  4. Issue the commit command.

    The event script is now loaded into memory and ready for execution. The event script is executed automatically in response to system log events. For more information, see Executing Event Scripts in an Event Policy

The JUNOS software provides several tools to manage and monitor event script operations, including source control and tracing operations. For more information, see Configuring Automation Scripts.


[Contents] [Prev] [Next] [Index] [Report an Error]