07-08-2015 12:49 PM
Is there a way to associate a script with a device or devices? I know you can do that with jobs, but jobs do not ask for input for variables when they are run. I would like to have a way for the script to be only for specific devices so the user does not have to select them each time.
07-08-2015 01:04 PM
Would you mind providing an example of what you're attempting to accomplish?
Jobs, I'm assuming a CCS here, will prompt for input on script execution if Script-Variables are used, so, you must be speaking about something else?
Specific Devices, or a Device Group, will always need to be selected for the script to run against, however, you can apply a Script-Filter directive to permit the script to run against specific devices only; via IPAddress, Vendor, Model, member of a specific device group, etc...
07-08-2015 01:23 PM
I would like to create a script for setting up new VLANs on switches - the same set of switches each time, with different VLAN numbers and IP addresses each time.
The only jobs I have created so far are scheduled jobs which require you to specify the script and the device and run one time or at specified times. Each time I run the job, it is for the same script variables set up the first time the job was created. If there is a differnet way to set up a job that will ask for variables each time, that would work.
07-09-2015 08:15 AM
You can use script variables as shown below.. You can provide values for these variables while you schedule your Job. If you use a Perl Script, you have to declare it again with a "our $your_variable" in the script.
To run on the same device, probably you can select a larger group, and then use a filter by "Hostname", "IP" etc.
# $your_variable_name "your default value"
hope it helps
07-09-2015 11:54 AM
Mike, can you explain how you get a job to prompt for input? Am I missing something? Is there another way to run a job other than scheduled jobs?
07-10-2015 06:28 AM
Could this become a feature enhancement request? We have lots of manual templates we apply to specific devices. I would like to turn them into scripts and make it as easy as possible for the user by preselecting the device the script is to be run against, yet still gather information from the user such as IP address, VLAN name, VLAN number, etc.
So far, I am not seeing that functionality within NetMRI.
07-14-2015 04:35 AM
You can use list to lookup the Device IP/Name and then pull your variables like VLAN Name/IP adress/etc..
But predefine list of devices can be done via Group/Config Search(Adhoc groups) and Script-Variables ie. $name like /(RTR1|RTR2|SW1|SW5)
There is a lot of different ways you can do this
I hope this helps
07-14-2015 06:48 AM
Sif, how to I connect to those devices in the list in the script? I know how to check device name variable match to tell it not to run a script, but how do I tell it to connnect if the name matches? I suppose I could tell it to run against all devices and then let it filter for just the names in the script, but that seems inefficient if NetMRI is going to cycle a check against all known devices.