Explore the Types of Automation Scripts
There are four types of on-box automation scripts that you can leverage to automate your network operations:
-
Configuration (Config) scripts
-
Execution (Exec) scripts
-
Process scripts
-
EEM scripts
The following table provides the scope and benefit of on-box scripts:
Config Scripts |
Exec Scripts |
Process Scripts |
EEM Scripts |
|
---|---|---|---|---|
What is the scope of the script? |
Enforce contextual and conditional changes to configurations, validate configurations before committing the changes to detect and notify potential errors. If configuration does not comply with the rules that are defined in the script, an action can be invoked. For example, generate a warning, syslog message, or halt a commit operation. |
Run operational commands or RPCs, process the output, generate syslogs, configure system, perform system action commands such as system reload, process restarts, and collect logs for further evaluation. |
Daemonize to continuously run as an agent on the router to execute additional checks outside traditional ZTP. Daemonized scripts are similar to exec scripts but run continuously. The script executes operational commands on the router and analyzes the output. |
Run operational commands or RPCs, generate, and determine the next steps like logging the root cause or changing device configuration. Event policies can upload the output of event scripts to an on-box or off-box location for further analysis. |
How to invoke the script? |
All config scripts are processed automatically when commit command is executed on the router. |
Exec script is invoked manually via CLI command or RPC. |
Process script is activated via configuration CLI command. |
Event scripts are invoked by defined event policies in response to a system event and allow for immediate action to take effect. |
What are the main benefits of using the script? |
Simplifies complex configurations and averts potential errors before a configuration is committed. Ensures that the network configuration complies with rules and policies that are defined in the script. |
Collects operational information, and decreases the time that is involved in troubleshooting issues. Provides flexibility in changing the input parameters for every script run. This fosters dynamic automation of operational information. |
Runs scripts as a daemon to continuously perform tasks that are not transient. |
Automates log collection upon detecting error conditions that are defined by event policies. Uploads the output of event scripts to an on-box or off-box location for further analysis. |