|
In the topic "Configuring Network Behavior", you learned to set up the desired network environment by defining the behavior of SNMP and TL1 devices in the network. This is done by configuring Jypthon scripts for each device in the network. In some cases, it is necessary to define the same Behavior across all the devices in the network. This can be achieved through Bulk Addition of Scripts. This feature enables you to configure the same script file to the specified range of IP address in the network.
|
|
Note: This feature is supported only for SNMP Devices. |
Configuring Bulk Addition of Scripts
The Network Designer provides an intuitive UI to configure bulk scripts. To invoke the dialog and configure bulk scripts, follow the steps given below:
Select the option Tools -> Bulk Script Addition from the menu bar or from the toolbar icon.
The Bulk Addition of Scripts dialog is displayed. Specify the following options in the dialog:
From IP Address : The starting IP Address of the device for which the script must be configured. Example : 192.168.1.10
To IP Address : The ending IP Address of the device in the network, till which the script is configured. Example: 192.168.1.20.
Script File Name : Browse and select the script file name to be configured in the network devices.
Condition to Execute the Script : Select the condition based on which the script is executed. The script can be executed when a request is made on a selected variable or at the specified time.
Request Based: If the script is request based, browse and select the MIB node based on which the script is executed. Specify the instance of the node, if the selected node is a columnar node. Specify the request based condition. The following conditions are supported :
Before Processing Get
Before Processing GetNext
Before Processing Set
After Processing Get
After Processing GetNext
After Processing Set
Timer Based: If the script is timer based, specify the following details: You can specify when you want the scripts to get executed. The following options are specified.
Execute scripts when agent starts: The configured script would get executed as soon as agent starts.
Execute scripts when agent stops: The configured script would get executed when the agent stops.
Execute scripts at specified time: You can specify the date and time of script execution. Choose the date and time using the spinner buttons provided. The scripts will get executed at the specified time.
Execute scripts after specified time after agent startup: You can specify the time in hours, minutes and seconds after which the script will get executed after the agent startup time.
Periodically execute (once in) : If scripts are to be executed at specified time or after specified time, periodically, you can check this option. Specify the duration as once in number of hour(s)/day(s).
Specify a Time interval between each script execution . For example, Timer interval 1000 milliseconds
The number of times you want the script to execute at the specified time. For example, Number of times 5.
Click Apply, to add the script.
Example for Request-Based Bulk Addition of Scripts
There are 20 devices in network_1 with IP address 192.168.1.1 to 192.168.1.20. The script file Sendv1Trap.py is configured for devices with ip address starting from 192.168.1.10 to 192.168.1.20. The condition to execute the script is "After processing a Get request on node sysUpTime of the RFC1213-Mib.
When a Get request is made on the node sysUpTime of RFC1213-MIB, the script file Sendv1Trap.py will be executed on the devices with IP address from 192.168.1.10 to 192.168.1.20.
Example for Timer-Based Bulk Addition of Scripts
There are 20 devices in network_1 with IP address 192.168.1.1 to 192.168.1.20. The script file Sendv1Trap.py is configured for devices with IP address starting from 192.168.1.10 to 192.168.1.20. The script is configured to be executed at the specified time. The option to execute the script on a periodical basis is selected with duration as once in 5 days.
The time interval is 5000 milliseconds and the number of times is 10.
Based on the above configuration, the script Sendv1trap.py will be executed at the specified time on the devices with ip address from 192.168.1.10 to 192.168.1.20. This configuration will generate 10 traps with a time interval of 5 seconds once in 5 days .
|