Document toolboxDocument toolbox

Creating New Scripts (CCS, Perl, and Python)

Create and manage scripts at Configuration Management > Job Management tab > Scripts tab.

The following table describes user privileges required for scripts.

Run Level

Risk

User privilege required to run script

Low

Low

Scripts: Level 1

Medium

Medium

Scripts: Level 2

High

High

Scripts: Level 3

Note

You must have the Scripts: Author and Scripts: Level 3 privileges in a system administrator account to create and save scripts.

To create a script:

  1. At the top right of the page, click New. The Add New Script dialog appears.
  2. In the Add New Script dialog, type a Name for the script.
    • Specify a Run Level. Run Level controls who can run the script.
    • Specify an optional Category in which the script should be placed. (Use categories to organize scripts.
    • Type a Description of the script.
    • Select the Language of the script: CCS, Perl, or Python.
    • Type or paste in the script in the lowest field in the dialog.
  3. Click Save & Close or Save.

Note

Users are assigned roles/privileges to edit and run scripts based on risk. A user with Scripts: Level 1 privilege, for example, can run scripts having a Run Level of Low, but not those having a Run Level of Medium or High. A user with Scripts: Level 2 can run scripts having a Run Level of Low or Medium, but not High, and so forth. An organization might assign Scripts: Level 1 privileges to tier one NOC operators. Further, the organization might designate some scripts that perform simple tasks (such as running a show command to collect more data) as Run Level Low. As a result, their tier one NOC team members can have limited access to some devices, but are prevented from making radical changes.

To copy a script:

  1. Select a script and click Copy.
  2. In the Copy Script dialog, type a name for the script, then click OK.

To edit a script, click Edit.

To schedule a script for execution:

  1. Select a script and click Schedule. The Job Wizard opens.
  2. In the Fill out Job Details screen, type a Job Name.
  3. To allow the job to run, enable the Approved option. A job cannot be scheduled unless it is approved.
  4. Type a Description of the job.
  5. In the Scripts list, select a script. If required by the script, enter data and/or select options.
  6. Click Next.
  7. In the Select Device Groups or Devices screen, click the Add icon to select specific device groups and/or devices to which this job applies.
  8. Click Next.
  9. In the Schedule when Job should run screen, specify the schedule for the job.
  10. Click Next.
  11. In the Review and save screen, review the job specifications. If changes are needed, click < Previous to return to an earlier screen.
  12. Click Save.

Track scheduled jobs on the Job History tab.

You can also schedule a script on the Scheduled Jobs tab: Select a script and click Run Now. The Batch Status window displays the results of running the script.

To view batch details: Click a hyperlink in the Name column. The Job Viewer opens.

To view the entire script: Click a hyperlink in the Script column.

To delete a script: Click Delete, then confirm the deletion.

Note

Any single NetMRI instance can run a maximum of ten (10) active CLI sessions to network devices. This imposes a practical limit to the number of concurrent sessions that a script can run through CLI sessions to other devices in the network. This limit applies per NetMRI instance or per collector; for example, if you are running an Operations Center with three collectors, the Operations Center can run a script against up to 30 network devices at once.