Operation script overview, Scripts operation script overview – Juniper Networks J-Series User Manual
Page 114

commit complete
NOTE: You can later reactivate the commit script using the
activate system scripts
commit filename.xsl
command.
Automating Network Management and Troubleshooting with Operation Scripts
Operation scripts are scripts that you write to automate network management and
troubleshooting tasks. They can perform any function available through JUNOScript
remote procedure calls (RPCs).
This section contains the following topics:
■
Operation Script Overview on page 92
■
Enabling Operation Scripts on page 93
■
Executing Operation Scripts on page 93
■
Disabling Operation Scripts on page 94
Operation Script Overview
You can execute operation scripts from the JUNOS CLI or from within an event policy.
For information about event policies, see “Running Self-Diagnostics with Event
Policies” on page 94.
Operation scripts allow you to perform various actions, including the following:
■
Automatically diagnose and fix problems in your network by building and running
an operational mode command, receiving the command output, inspecting the
output, and determining the next appropriate action. This process can be repeated
until the source of the problem is determined and reported to the CLI.
■
Monitor the overall status of the router by creating a general operation script
that periodically checks network warning parameters, such as high CPU usage.
The general operation script can be overridden by user-defined scripts.
■
Customize the output of CLI operational mode commands using
printf
statements.
■
If there is a known problem in the JUNOS software, an operation script can
ensure your router is configured to avoid or work around the problem.
■
Change your router's configuration in response to a problem.
The scripting language you use for writing operation scripts is Extensible Stylesheet
Language Transformations (XSLT). XSLT operation scripts are based on JUNOScript
Extensible Markup Language (XML).
92
■
Automating Network Management and Troubleshooting with Operation Scripts
J-series™ Services Router Administration Guide