Administering NetIM : Working with custom scripts
  
Working with custom scripts
The Custom Scripts feature supports adding custom processing during the NetIM model update process. Some use cases are as follows:
Copy reports exported from NetIM to an archive environment.
Move config files or data files collected by other tools to the import directory.
Run scripts and tools to manage NetIM processing.
The Custom Scripts page provides contextual help to describe the various steps available for script injection. Additionally, contextual help is provided for each attribute associated with a custom script’s configuration.
To configure custom scripts
1. Log in to the UI as admin.
2. Choose Configure > All Settings > Customize > Custom Scripts. The Custom Scripts page appears.
You can configure scripts to run:
Before the discovery and network model update starts.
After SNMP and CLI data collection has completed, but before the data is parsed and loaded into the database.
After the user-supplied network data files have been collected, but before data is parsed and loaded into the database.
After Report Export has completed.
After all functions performed as part of network model update have completed.
The custom scripts page provides default scripts which you can enable if they are relevant to your purposes.
3. When you determine when you want a script to run, define the following fields in the appropriate frame. (These fields define a Perl script; for examples of how to define an executable, see the OOTB scripts on the Custom Scripts page.)
Enabled—Check to enable the script, the default is disabled.
Command Name—Provide a name of the program you want invoked: for example, Save_Reports.
Command—Enter the name of the program you want to run: for example, perl.
Working Directory—Enter the absolute path to the directory where the program defined in Command resides: for example, /usr/bin/perl.
Arguments—The script you want to run and the file or directory to run against. For example:
<install_dir>/scripts/saveReports.pl /data1/riverbed/NetIM/op-admin/tmp/vne/Reports
Environment Variables—Enter any environment variables that need to be set.
Timeout—Set a timeout value in seconds for the command to exit if unsuccessful: for example, 5000.