Tools for Using CCS
NetMRI provides its own script editor, which can be found in the Configuration Management –> Job Management tab –> Scripts page by selecting the Action icon for a script and choosing Edit.
The Edit Script window is the primary NetMRI tool for script editing, but you are not limited to it. A standard text editor such as Notepad, Notepad++ or Notepad 2 may be used to write scripts. To see an indication of how to do so, open the Edit Script window and click Export. In the Windows file requester, you can select a preferred text editor to automatically open the script file.
Once you write the script, execute it by selecting Run Now from the Action menu.
You may run the script against any device group, or select one or more devices in the Script Run Now wizard. We advise strictly limiting the number of devices to run a script against until the script is verified to work without problems.
After the script runs, NetMRI automatically displays the Job History page with your current job at the top of the table.
Note: If any devices in the selected Device Group are skipped over during script execution, the Job History will show the job status as Skipped. This does not indicate the script failed to run; it simply indicates that the job didnot execute on one or more devices in the job run. This is expected behavior.
To view the job status, click the link in the Name column. The Job Viewer appears in a separate browser window, showing the Details page. Details lists all the devices participating in the job.
The Status column shows the broad result of the script’s execution of each device. It does not indicate whether the script’s results are what was desired during its run; a status of OK means that the script ran to completion on the device.
When a Skipped status appears, it indicates a device in the chosen Device Group has been skipped over during the script’s execution, most likely due to it being filtered out by a Script-Filter: attribute, which is discussed later in this document.
The Files tab provides access to any individual text output files defined in the CCS script. CCS uses specific command directives to send desired output from devices to an external text file. Each device may have its own external text file associated with it, and a script may append text multiple times to the same file.
Clicking on the Status link (which will read Skipped or OK in most cases) for any device in the Job Viewer, opens the Job Details Viewer in another browser window. The Job Details Viewer shows the results of the job run on the chosen device. After a script executes and you click a Status link, the Job Details Viewer displays the Process Log page. The Process Log shows, in graphic form, the execution sequence for all CCS sections, CCS attributes and automated CLI commands (see CCS Script Hierarchies for more information).
The process log highlights all successive matches for the script iteration that ran on the current device. Any successful pattern match against device command output in a script execution appears in green as shown here. A process log may be much longer than the illustrated example. (We return to a more-complete example later in this Guide.)
Along with the graphical Process Log, the Status Log page provides the raw-text version of the same information graphically shown in the Process Log, for all statements executed in the script, and their result (whether they matched or were not matched in the script):
+++ 1. Action: Execute Command Batch
+++ 1. [Action-Commands]
+++ 1. Command condition ............................................... MATCH
+++ 1. Sending 'show int summ' ......................................... OK
+++ 1. [Action-Commands]
+++ 1. Command condition ............................................... MATCH
+++ 1. Sending 'sh int' ................................................ OK
+++ 1.1. Trigger: Show Ethernet Interfaces
+++ 1.1. Trigger-Template .............................................. MATCH
The Job Details Viewer’s Custom Log page provides the logging information embedded into a script using LOG commands (see the LOG {-INFO, -WARNING, -ERROR, -DEBUG} topic for more information).
The Job Details Viewer’s Files page provides download links for any files associated with the device’s script execution. In CCS scripts, files are created and written using the ARCHIVE directive. Files can only be associated with each device in the script, and cannot be concatenated into a single large file encompassing the entire script run. Also see CCS Data Archive and Export for more information.