Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The ARCHIVE keyword creates a file named device_id-1.log for each device. The files can be viewed in the Files tab of NetMRI's Job Viewer.

The keyword can be followed by an optional file name and should precede all commands for the archived output:

...

If a job runs against two or more devices and the script specifies a static file name, all iterations will use the same file name and only one set of data will be present in the Zip archive, containing the last device's output, which will have overwritten all previous output. At the end of the job, the Zip file contains a file with a single set of data from one device (e.g. the last device that the script was run against). This is not particularly helpful.

Use variables to dynamically specify the name of the file:

...

stores the output of the show interface summ command in a series of files representing each of the devices against which the script runs after the script-filter is applied.

Output from multiple commands can be stored in the same file:

...

Two successive ARCHIVE directives in the same attribute store the output of the commands show interface summ and show running-config in the series of files named <$ipaddress><$job_id-ipaddress>.txt.

At the end of a job, files created using the ARCHIVE keyword are placed in a Zip file. You can view the files and download the Zip file in the Files tab of the Job Viewer. If you use a variable to define the file names generated by the script, each device in the Job has its own separate output file which is present in the Zip file.